diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java index 9ab95cd..3e5f6c6 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java @@ -13,6 +13,8 @@ import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzims.operational.station.feign.IStationVideoTypeClient; +import com.xxl.job.core.handler.annotation.XxlJob; +import com.xxl.job.core.log.XxlJobLogger; import lombok.AllArgsConstructor; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; @@ -44,8 +46,9 @@ public class ExtraResolveStrategyService { */ public ExtraVO resolve(String extraStr) { JSONObject extra = JSONObject.parseObject(extraStr); - String functionCode = Optional.ofNullable(extra.get("func")).map(String::valueOf).orElse("ttps"); + String functionCode = Optional.ofNullable(extra.get("func")).map(String::valueOf).orElse(""); if(StringUtil.isNotBlank(functionCode)) { + XxlJobLogger.log("函数编号为:" + functionCode); FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(functionCode); switch (funcRouteEnum) { case DIAGNOSE: diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java index 4d51428..d24a4c0 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java @@ -6,16 +6,17 @@ import com.hnac.hzims.bigmodel.entity.FunctionEntity; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants; import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; +import com.hnac.hzims.operational.station.entity.StationEntity; +import com.hnac.hzims.operational.station.feign.IStationClient; +import lombok.RequiredArgsConstructor; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Component; import org.springframework.util.Assert; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.stream.IntStream; /** @@ -23,8 +24,11 @@ import java.util.stream.IntStream; * @Date: 2024/04/30 11:38 */ @Component +@RequiredArgsConstructor public class JumpRouteJoinStrategy { + private final IStationClient stationClient; + public static String[] SCADA_PARAMS_SOLVE = new String[]{"picResource","context","stationNum","projectId","taskId","name","id"}; /** @@ -54,7 +58,8 @@ public class JumpRouteJoinStrategy { // 根据hz3000画面版本获取path Integer picResource = Integer.valueOf(params.get("picResource")); JSONObject pathObject = JSONObject.parseObject(function.getPath()); - extraVO.setLabel(params.get("name")); + R stationR = stationClient.getStationByCode(params.get("projectId")); + extraVO.setLabel(Optional.ofNullable(stationR).filter(r -> r.isSuccess()).map(R::getData).map(StationEntity::getName) + "_" + params.get("name")); // 云组态 if(picResource == 0) { String scada = pathObject.getString("scada");