|
|
@ -5,10 +5,7 @@ import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.vo.ScadaSelectionVO; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.vo.*; |
|
|
|
import com.hnac.hzims.bigmodel.interactive.vo.StationSelectionVO; |
|
|
|
|
|
|
|
import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; |
|
|
|
|
|
|
|
import com.hnac.hzims.bigmodel.interactive.vo.VideoSelectionVO; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; |
|
|
|
import com.hnac.hzims.operational.station.feign.IStationClient; |
|
|
|
import com.hnac.hzims.operational.station.feign.IStationClient; |
|
|
@ -50,6 +47,7 @@ public class ExtraResolveStrategyService { |
|
|
|
if(StringUtil.isNotBlank(functionCode)) { |
|
|
|
if(StringUtil.isNotBlank(functionCode)) { |
|
|
|
XxlJobLogger.log("函数编号为:" + functionCode); |
|
|
|
XxlJobLogger.log("函数编号为:" + functionCode); |
|
|
|
FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(functionCode); |
|
|
|
FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(functionCode); |
|
|
|
|
|
|
|
if(Func.isNotEmpty(funcRouteEnum)) { |
|
|
|
switch (funcRouteEnum) { |
|
|
|
switch (funcRouteEnum) { |
|
|
|
case DIAGNOSE: |
|
|
|
case DIAGNOSE: |
|
|
|
return this.resolveDiagnose(extra); |
|
|
|
return this.resolveDiagnose(extra); |
|
|
@ -59,13 +57,29 @@ public class ExtraResolveStrategyService { |
|
|
|
return this.resolveChooseVideo(extra); |
|
|
|
return this.resolveChooseVideo(extra); |
|
|
|
case CHOOSE_CANVAS: |
|
|
|
case CHOOSE_CANVAS: |
|
|
|
return this.resolveChooseScada(extra); |
|
|
|
return this.resolveChooseScada(extra); |
|
|
|
|
|
|
|
case CHOOSE_FAULT: |
|
|
|
|
|
|
|
return this.resolveChooseFault(extra); |
|
|
|
default: |
|
|
|
default: |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class); |
|
|
|
return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ExtraVO resolveChooseFault(Map<String,Object> extra) { |
|
|
|
|
|
|
|
ExtraVO result = new ExtraVO(); |
|
|
|
|
|
|
|
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data"))); |
|
|
|
|
|
|
|
if(data.containsKey("faults")) { |
|
|
|
|
|
|
|
List<FaultSelectionVO> faults = JSONArray.parseArray(JSON.toJSONString(data.get("faults")), FaultSelectionVO.class); |
|
|
|
|
|
|
|
result.setSelection(faults); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
result.setFuncCode(FuncRouteEnum.CHOOSE_FAULT.getFuncCode()); |
|
|
|
|
|
|
|
result.setSpecial(true); |
|
|
|
|
|
|
|
result.setType(FunctionConstants.TypeEnum.CHOOSE.getType()); |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private ExtraVO resolveDiagnose(Map<String,Object> extra) { |
|
|
|
private ExtraVO resolveDiagnose(Map<String,Object> extra) { |
|
|
|
ExtraVO result = new ExtraVO(); |
|
|
|
ExtraVO result = new ExtraVO(); |
|
|
|
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data"))); |
|
|
|
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data"))); |
|
|
|