Browse Source

fix:open_scada修改为open_canvas

zhongwei
haungxing 6 months ago
parent
commit
4f85176c37
  1. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java
  2. 24
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java
  3. 3
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java

@ -26,7 +26,7 @@ public enum FuncRouteEnum {
public static FuncRouteEnum getEnumByFuncCode(String funcCode) { public static FuncRouteEnum getEnumByFuncCode(String funcCode) {
Optional<FuncRouteEnum> FuncRoute = Arrays.stream(FuncRouteEnum.class.getEnumConstants()).filter(e -> funcCode.equals(e.getFuncCode())).findFirst(); Optional<FuncRouteEnum> FuncRoute = Arrays.stream(FuncRouteEnum.class.getEnumConstants()).filter(e -> funcCode.equals(e.getFuncCode())).findFirst();
return FuncRoute.get(); return FuncRoute.orElse(null);
} }
} }

24
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java

@ -50,17 +50,19 @@ 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);
switch (funcRouteEnum) { if(Func.isNotEmpty(funcRouteEnum)) {
case DIAGNOSE: switch (funcRouteEnum) {
return this.resolveDiagnose(extra); case DIAGNOSE:
case CHOOSE_STATION: return this.resolveDiagnose(extra);
return this.resolveChooseStation(extra); case CHOOSE_STATION:
case CHOOSE_VIDEO: return this.resolveChooseStation(extra);
return this.resolveChooseVideo(extra); case CHOOSE_VIDEO:
case CHOOSE_CANVAS: return this.resolveChooseVideo(extra);
return this.resolveChooseScada(extra); case CHOOSE_CANVAS:
default: return this.resolveChooseScada(extra);
break; default:
break;
}
} }
} }
return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class); return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class);

3
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java

@ -73,6 +73,9 @@ public class InteractiveServiceImpl implements IInteractiveService {
logger.info("interactive:resolve","开始解析大模型函数,函数内容为:" + JSON.toJSONString(req)); logger.info("interactive:resolve","开始解析大模型函数,函数内容为:" + JSON.toJSONString(req));
FunctionEntity function = functionService.getFunctionByCode(req.getFunctionName()); FunctionEntity function = functionService.getFunctionByCode(req.getFunctionName());
TypeEnum typeEnum = TypeEnum.getTypeEnumByType(function.getType()); TypeEnum typeEnum = TypeEnum.getTypeEnumByType(function.getType());
if(Func.isEmpty(typeEnum)) {
throw new ServiceException("函数解析失败!");
}
switch (typeEnum) { switch (typeEnum) {
// 页面跳转 // 页面跳转
case JUMP: case JUMP:

Loading…
Cancel
Save