|
@@ -9,11 +9,11 @@ import com.slibra.business.mapper.*;
|
|
|
import com.slibra.business.req.ChatReq;
|
|
|
import com.slibra.business.req.DecisionReq;
|
|
|
import com.slibra.business.req.PolicyReq;
|
|
|
-import com.slibra.business.res.ShowValueBasic;
|
|
|
+import com.slibra.business.res.ShowValueCSBasic;
|
|
|
+import com.slibra.business.res.ShowValueJSBasic;
|
|
|
import com.slibra.common.constant.MyConstants;
|
|
|
import com.slibra.common.enums.BusinessEnum;
|
|
|
import com.slibra.common.utils.DateUtils;
|
|
|
-import com.slibra.common.utils.StringUtils;
|
|
|
import com.slibra.common.utils.uuid.IdUtils;
|
|
|
import inference.InferenceAPIsServiceGrpc;
|
|
|
import inference.PredictionResponse;
|
|
@@ -1018,32 +1018,59 @@ public class AsyncTask {
|
|
|
//2024年5月27日14:04:22 额外返回2个字段 [管控值 和 告警级别] 返回的json没有数据是因为value没有值
|
|
|
// basic.put("管控值", tXinyiWarningRecord.getControlVal());
|
|
|
basic.put("告警级别", tXinyiWarningRecord.getLevel());*/
|
|
|
- ShowValueBasic showValueBasic = new ShowValueBasic();
|
|
|
- if("0".equals(remark)){//水质报警
|
|
|
- showValueBasic.setH("在线仪表");
|
|
|
- showValueBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
- }else if("1".equals(remark)){//生化报警
|
|
|
- showValueBasic.setH("在线仪表");
|
|
|
- }else if("2".equals(remark)){//预测报错
|
|
|
- showValueBasic.setH("预测");
|
|
|
- showValueBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
- }else {//机器人化验室报警
|
|
|
- showValueBasic.setH("化验室");
|
|
|
- showValueBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ //2024年6月25日16:00:18 进出水展示的不一样
|
|
|
+ if(tXinyiWarningRecord.getCategory().contains("出水")){//出水的展示
|
|
|
+ ShowValueCSBasic showValueCSBasic = new ShowValueCSBasic();
|
|
|
+ if("0".equals(remark)){//水质报警
|
|
|
+ showValueCSBasic.setH("在线仪表");
|
|
|
+ showValueCSBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ }else if("1".equals(remark)){//生化报警
|
|
|
+ showValueCSBasic.setH("在线仪表");
|
|
|
+ }else if("2".equals(remark)){//预测报警
|
|
|
+ showValueCSBasic.setH("预测");
|
|
|
+// showValueCSBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ }else {//机器人化验室报警(特殊的水质报警)
|
|
|
+ showValueCSBasic.setH("化验室");
|
|
|
+ showValueCSBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ }
|
|
|
+ //通用的
|
|
|
+ // showValueBasic.setA(tXinyiWarningRecord.getReason());
|
|
|
+ showValueCSBasic.setB(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM ,warningTime));
|
|
|
+ showValueCSBasic.setC(tXinyiWarningRecord.getWarningVal());
|
|
|
+ showValueCSBasic.setD(tXinyiWarningRecord.getControlVal());
|
|
|
+ showValueCSBasic.setE(tXinyiWarningRecord.getDesignVal());
|
|
|
+ showValueCSBasic.setG(Math.min(count, MAX_COUNT));
|
|
|
+ if(tXinyiWarningRecord.getType() != 2)
|
|
|
+ showValueCSBasic.setI(status == 0 ? "报警中" : status == 1 ? "用户关闭" : status == 2 ? "系统关闭" : "应急处理中");
|
|
|
+ else
|
|
|
+ showValueCSBasic.setI(status == 0 ? "预警中" : "已完成");
|
|
|
+ result.put("basic", showValueCSBasic);
|
|
|
+ }else{//进水的展示
|
|
|
+ ShowValueJSBasic showValueJSBasic = new ShowValueJSBasic();
|
|
|
+ if("0".equals(remark)){//水质报警
|
|
|
+ showValueJSBasic.setH("在线仪表");
|
|
|
+ showValueJSBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ }else if("1".equals(remark)){//生化报警
|
|
|
+ showValueJSBasic.setH("在线仪表");
|
|
|
+ }else if("2".equals(remark)){//预测报警
|
|
|
+ showValueJSBasic.setH("预测");
|
|
|
+// showValueCSBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ }else {//机器人化验室报警(特殊的 水质报警)
|
|
|
+ showValueJSBasic.setH("化验室");
|
|
|
+ showValueJSBasic.setF(tXinyiWarningRecord.getLevel());
|
|
|
+ }
|
|
|
+ //通用的
|
|
|
+ // showValueBasic.setA(tXinyiWarningRecord.getReason());
|
|
|
+ showValueJSBasic.setB(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM ,warningTime));
|
|
|
+ showValueJSBasic.setC(tXinyiWarningRecord.getWarningVal());
|
|
|
+ showValueJSBasic.setE(tXinyiWarningRecord.getDesignVal());
|
|
|
+ showValueJSBasic.setG(Math.min(count, MAX_COUNT));
|
|
|
+ if(tXinyiWarningRecord.getType() != 2)
|
|
|
+ showValueJSBasic.setI(status == 0 ? "报警中" : status == 1 ? "用户关闭" : status == 2 ? "系统关闭" : "应急处理中");
|
|
|
+ else
|
|
|
+ showValueJSBasic.setI(status == 0 ? "预警中" : "已完成");
|
|
|
+ result.put("basic", showValueJSBasic);
|
|
|
}
|
|
|
- //通用的
|
|
|
- // showValueBasic.setA(tXinyiWarningRecord.getReason());
|
|
|
- showValueBasic.setB(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM ,warningTime));
|
|
|
- showValueBasic.setC(tXinyiWarningRecord.getWarningVal());
|
|
|
- showValueBasic.setD(tXinyiWarningRecord.getControlVal());
|
|
|
- showValueBasic.setE(tXinyiWarningRecord.getDesignVal());
|
|
|
- showValueBasic.setG(Math.min(count, MAX_COUNT));
|
|
|
- if(tXinyiWarningRecord.getType() != 2)
|
|
|
- showValueBasic.setI(status == 0 ? "报警中" : status == 1 ? "用户关闭" : status == 2 ? "系统关闭" : "应急处理中");
|
|
|
- else
|
|
|
- showValueBasic.setI(status == 0 ? "预警中" : "已完成");
|
|
|
-
|
|
|
- result.put("basic", showValueBasic);
|
|
|
JSONObject jsData = getJsonObject(tXinyiIndustry, normConfig);//进水数据
|
|
|
result.put("jsData", jsData);
|
|
|
JSONObject csData = getCsonObject(tXinyiIndustry, normConfig);//出水数据
|