Browse Source

fix:大模型结构调整

zhongwei
haungxing 5 months ago
parent
commit
09cf4b5536
  1. 3
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java
  2. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/data/service/HistoryDataService.java
  3. 11
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/datasource/service/DataSourceService.java
  4. 4
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java
  5. 1
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java
  6. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java

3
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java

@ -17,7 +17,7 @@ public class DataItemVO implements Serializable {
@JSONField(name = "id")
private String attrId;
@JSONField(name = "param_name")
@JSONField(name = "record_name")
private String attrName;
@JSONField(name = "device_name")
@ -32,6 +32,7 @@ public class DataItemVO implements Serializable {
@JSONField(name = "station_name")
private String projectName;
@JSONField(name = "record_id")
private String signage;
private String units;

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/data/service/HistoryDataService.java

@ -34,7 +34,7 @@ public class HistoryDataService {
private final DeviceDataClient deviceDataClient;
private final BladeLogger logger;
public static final int DATA_COUNT_MAX = 8000;
public static final int DATA_COUNT_MAX = 1000;
public Result<ReductionDataVO> getPolymerizationData(HistoryDataSearchVO searchVO) {
DataMethodEnum enumByMethod = DataMethodEnum.getEnumByMethod(searchVO.getMethod());

11
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/datasource/service/DataSourceService.java

@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/**
* @Author: huangxing
@ -20,6 +21,9 @@ public class DataSourceService {
private final JdbcTemplate jdbcTemplate;
private static final Pattern UPDATE_PATTERN = Pattern.compile("^UPDATE\\s", Pattern.CASE_INSENSITIVE);
private static final Pattern DELETE_PATTERN = Pattern.compile("^DELETE\\s", Pattern.CASE_INSENSITIVE);
/**
* 指定
* @param sql
@ -48,4 +52,11 @@ public class DataSourceService {
}
}
public static boolean isUpdateOrDelete(String sql) {
if (sql == null) {
return false;
}
return UPDATE_PATTERN.matcher(sql).find() || DELETE_PATTERN.matcher(sql).find();
}
}

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

@ -14,14 +14,14 @@ import java.util.Optional;
public enum FuncRouteEnum {
OPEN_CANVAS("open_canvas","打开实时画面",FunctionConstants.TypeEnum.JUMP),
OPEN_VIDEO("open_video","打开视频监控",FunctionConstants.TypeEnum.PARAMS),
DIAGNOSE("diagnose","智能诊断",FunctionConstants.TypeEnum.PARAMS),
DIAGNOSE("result_diagnose","智能诊断",FunctionConstants.TypeEnum.PARAMS),
CHOOSE_STATION("choose_station","选择站点",FunctionConstants.TypeEnum.CHOOSE),
CHOOSE_VIDEO("choose_video","选择视频",FunctionConstants.TypeEnum.CHOOSE),
CHOOSE_CANVAS("choose_canvas","选择画面",FunctionConstants.TypeEnum.CHOOSE),
CHOOSE_FAULT("choose_fault","选择故障",FunctionConstants.TypeEnum.CHOOSE),
CHOOSE_YK("choose_yk","选择遥控",FunctionConstants.TypeEnum.CHOOSE),
CONFIRM_YK("confirm_yk","遥控确认", FunctionConstants.TypeEnum.PARAMS),
SHOW_PARAM("show_param","设备参数查询", FunctionConstants.TypeEnum.PARAMS),
SHOW_PARAM("result_record","设备参数查询", FunctionConstants.TypeEnum.PARAMS),
CHOOSE_YC("choose_yc","选择遥测数据",FunctionConstants.TypeEnum.CHOOSE),
HISTORY_DATA("history_data","查询历史数据",FunctionConstants.TypeEnum.CHART),
;

1
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java

@ -46,6 +46,7 @@ import static com.hnac.hzims.bigmodel.schedule.XxlJobHandlerConstant.*;
*/
@Component
@AllArgsConstructor
@Deprecated
public class InteractiveSchedule {
private final InteractiveWsService wsService;

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java

@ -129,7 +129,7 @@ public class InteractiveHandler extends TextWebSocketHandler {
IHznlmInvokeService invokeService = SpringUtil.getBean(IHznlmInvokeService.class);
Map<String, Object> extra = messageContext.toJavaObject(Map.class);
extra.put("func",extra.get("func"));
extra.put("data",messageContext.getObject("selection", JSONObject.class));
extra.put("data",JSONObject.parseObject(JSON.toJSONString(extra.get("selection"))));
invokeService.specialAsk(sessionId, (String) extra.get("userId"),extra);
}

Loading…
Cancel
Save