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) {
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)) {
XxlJobLogger.log("函数编号为:" + functionCode);
FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(functionCode);
switch (funcRouteEnum) {
case DIAGNOSE:
return this.resolveDiagnose(extra);
case CHOOSE_STATION:
return this.resolveChooseStation(extra);
case CHOOSE_VIDEO:
return this.resolveChooseVideo(extra);
case CHOOSE_CANVAS:
return this.resolveChooseScada(extra);
default:
break;
if(Func.isNotEmpty(funcRouteEnum)) {
switch (funcRouteEnum) {
case DIAGNOSE:
return this.resolveDiagnose(extra);
case CHOOSE_STATION:
return this.resolveChooseStation(extra);
case CHOOSE_VIDEO:
return this.resolveChooseVideo(extra);
case CHOOSE_CANVAS:
return this.resolveChooseScada(extra);
default:
break;
}
}
}
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));
FunctionEntity function = functionService.getFunctionByCode(req.getFunctionName());
TypeEnum typeEnum = TypeEnum.getTypeEnumByType(function.getType());
if(Func.isEmpty(typeEnum)) {
throw new ServiceException("函数解析失败!");
}
switch (typeEnum) {
// 页面跳转
case JUMP:

Loading…
Cancel
Save