|
@@ -32,7 +32,6 @@ import io.grpc.ManagedChannelBuilder;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
@@ -2722,7 +2721,8 @@ public class AsyncTask {
|
|
|
//是否存在异常升高的问题
|
|
|
if(!CollectionUtils.isEmpty(tXinyiIndustries) && tXinyiIndustries.size() == INT_3){
|
|
|
//2025年02月21日14:33:37 这里要改成当前值和上个小时比较 上个小时和上上个小时比较
|
|
|
- BigDecimal exceedVal = existsYCSG(currentVal, category, tXinyiIndustries);
|
|
|
+ Map<String, BigDecimal> resultMap = existsYCSG(currentVal, category, tXinyiIndustries);
|
|
|
+ BigDecimal exceedVal = resultMap.get(EXCEEDVAL);
|
|
|
if(!Objects.isNull(exceedVal)){//这里不能只返回一个布尔类型的结果,因为还要获取百分比的值
|
|
|
//关闭同类型的其他报警
|
|
|
closeOtherWarningsByCategory(category, BusinessEnum.WarningSymbolEnum.SJYC_YCSG.getCode());
|
|
@@ -2743,7 +2743,7 @@ public class AsyncTask {
|
|
|
warningRecordYCSG.setCwrwxz(getCwrwxzByDetail(currentVal, normConfig, category, true));//根据当前值和类型以及是否超标处理
|
|
|
this.xinyiWarningRecordMapper.insertTXinyiWarningRecord(warningRecordYCSG);
|
|
|
//同时处理决策 不用调用大模型,本地处理问答
|
|
|
- addChatRecordByYCSG(warningRecordYCSG, tXinyiIndustry, normConfig, category, exceedVal);
|
|
|
+ addChatRecordByYCSG(warningRecordYCSG, tXinyiIndustry, normConfig, category, exceedVal, resultMap.get(LASTVAL));
|
|
|
}else{
|
|
|
log.info("工业库报警的时候,发现存在异常升高的报警,并且已经有该类型报警了,不做任何处理");
|
|
|
}
|
|
@@ -2924,6 +2924,7 @@ public class AsyncTask {
|
|
|
|
|
|
/**
|
|
|
* 计算超污染物限制的值: 需要判断进水还是出水;是超标准还是超管控 出水的标准值=进水的设计值
|
|
|
+ * 2025年03月19日10:25:45:逻辑调整:这里和以前不一样,以前是需要区分超标准还是超管控,现在全部都是超管控制。 不修改上层调用,这里默认都是false即可,防止以后再次修改回来。
|
|
|
* @param currentVal
|
|
|
* @param normConfig
|
|
|
* @param code
|
|
@@ -2931,6 +2932,7 @@ public class AsyncTask {
|
|
|
* @return
|
|
|
*/
|
|
|
private BigDecimal getCwrwxzByDetail(BigDecimal currentVal, TXinyiNormConfig normConfig, String code, boolean isBzz) {
|
|
|
+ isBzz = false;
|
|
|
if(BusinessEnum.WarningCategoryEnum.CS_COD.getCode().equals(code)){
|
|
|
if(isBzz)
|
|
|
return currentVal.divide(normConfig.getCscodBzz(), NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
@@ -3145,7 +3147,8 @@ public class AsyncTask {
|
|
|
//是否存在异常升高的问题
|
|
|
if(!CollectionUtils.isEmpty(tXinyiIndustries) && tXinyiIndustries.size() == INT_3){
|
|
|
//2025年02月21日14:33:37 这里要改成当前值和上个小时比较 上个小时和上上个小时比较
|
|
|
- BigDecimal exceedVal = existsYCSG(currentVal, category, tXinyiIndustries);
|
|
|
+ Map<String, BigDecimal> resultMap = existsYCSG(currentVal, category, tXinyiIndustries);
|
|
|
+ BigDecimal exceedVal = resultMap.get(EXCEEDVAL);
|
|
|
if(!Objects.isNull(exceedVal)){//这里不能只返回一个布尔类型的结果,因为还要获取百分比的值
|
|
|
//关闭同类型的其他报警
|
|
|
closeOtherWarningsByCategory(category, BusinessEnum.WarningSymbolEnum.SJYC_YCSG.getCode());
|
|
@@ -3165,7 +3168,7 @@ public class AsyncTask {
|
|
|
warningRecordYCSG.setCwrwxz(getCwrwxzByDetail(currentVal, normConfig, category, true));//根据当前值和类型以及是否超标处理
|
|
|
this.xinyiWarningRecordMapper.insertTXinyiWarningRecord(warningRecordYCSG);
|
|
|
//同时处理决策 不用调用大模型,本地处理问答
|
|
|
- addChatRecordByYCSG(warningRecordYCSG, tXinyiIndustry, normConfig, category, exceedVal);
|
|
|
+ addChatRecordByYCSG(warningRecordYCSG, tXinyiIndustry, normConfig, category, exceedVal, resultMap.get(LASTVAL));
|
|
|
}else{
|
|
|
log.info("工业库报警的时候,发现存在异常升高的报警,并且已经有该类型报警了,不做任何处理");
|
|
|
}
|
|
@@ -3441,12 +3444,13 @@ public class AsyncTask {
|
|
|
* 【工业库异常升高】先判断该指标是否超过最大值,如果超过了,返回对应的超过的值; 如果没有超标,返回null。
|
|
|
* 一个字段返回用作2个地方
|
|
|
* 2025年03月06日10:35:30 判断是否超标,不再获取最近3个小时;最近2个小时比较即可。
|
|
|
+ * 2025年03月19日10:47:18 返回逻辑调整:额外再返回一个上个小时同指标的值,决策力需要展示该值。
|
|
|
* @param currentVal
|
|
|
* @param category
|
|
|
* @param industryList
|
|
|
* @return
|
|
|
*/
|
|
|
- private BigDecimal existsYCSG(BigDecimal currentVal, String category, List<TXinyiIndustry> industryList) {
|
|
|
+ private Map<String, BigDecimal> existsYCSG(BigDecimal currentVal, String category, List<TXinyiIndustry> industryList) {
|
|
|
// BigDecimal result = null;//默认不超标
|
|
|
// TXinyiIndustry tXinyiIndustry1 = industryList.get(INDEX_1);
|
|
|
// TXinyiIndustry tXinyiIndustry2 = industryList.get(INDEX_2);
|
|
@@ -3545,84 +3549,105 @@ public class AsyncTask {
|
|
|
// log.error("暂时还不支持的报警类型~~~~");
|
|
|
// }
|
|
|
// return result;
|
|
|
-
|
|
|
- BigDecimal result = null;//默认不超标
|
|
|
+ //返回结果
|
|
|
+ Map<String, BigDecimal> resultMap = new HashMap<>();
|
|
|
+// BigDecimal result = null;//默认不超标
|
|
|
TXinyiIndustry tXinyiIndustry1 = industryList.get(INDEX_1);
|
|
|
BigDecimal compareVal = BigDecimal.valueOf(YCSG_VAL_CONF);
|
|
|
if(BusinessEnum.WarningCategoryEnum.CS_COD.getCode().equals(category)){
|
|
|
BigDecimal csCod1 = tXinyiIndustry1.getCsCod();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(csCod1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(csCod1).divide(csCod1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, csCod1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.CS_SS.getCode().equals(category)){
|
|
|
BigDecimal csSs1 = tXinyiIndustry1.getCsSs();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(csSs1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(csSs1).divide(csSs1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, csSs1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.CS_ZD.getCode().equals(category)){
|
|
|
BigDecimal csTn1 = tXinyiIndustry1.getCsTn();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(csTn1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(csTn1).divide(csTn1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, csTn1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.CS_ZL.getCode().equals(category)){
|
|
|
BigDecimal csTp1 = tXinyiIndustry1.getCsTp();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(csTp1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(csTp1).divide(csTp1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, csTp1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.CS_AD.getCode().equals(category)){
|
|
|
BigDecimal csNh31 = tXinyiIndustry1.getCsNh3();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(csNh31)){
|
|
|
BigDecimal divide1 = currentVal.subtract(csNh31).divide(csNh31, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, csNh31);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.JS_COD.getCode().equals(category)){
|
|
|
BigDecimal jsCod1 = tXinyiIndustry1.getJsCod();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(jsCod1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(jsCod1).divide(jsCod1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, jsCod1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.JS_SS.getCode().equals(category)){
|
|
|
BigDecimal jsSs1 = tXinyiIndustry1.getJsSs();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(jsSs1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(jsSs1).divide(jsSs1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, jsSs1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.JS_ZD.getCode().equals(category)){
|
|
|
BigDecimal jsTn1 = tXinyiIndustry1.getJsTn();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(jsTn1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(jsTn1).divide(jsTn1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, jsTn1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.JS_ZL.getCode().equals(category)){
|
|
|
BigDecimal jsTp1 = tXinyiIndustry1.getJsTp();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(jsTp1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(jsTp1).divide(jsTp1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, jsTp1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.JS_AD.getCode().equals(category)){
|
|
|
BigDecimal jsNh31 = tXinyiIndustry1.getJsNh3();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(jsNh31)){
|
|
|
BigDecimal divide1 = currentVal.subtract(jsNh31).divide(jsNh31, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, jsNh31);
|
|
|
+ }
|
|
|
}
|
|
|
}else{
|
|
|
log.error("暂时还不支持的报警类型~~~~");
|
|
|
}
|
|
|
- return result;
|
|
|
+ return resultMap;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -3633,12 +3658,13 @@ public class AsyncTask {
|
|
|
* 【化验室异常升高】先判断该指标是否超过最大值,如果超过了,返回对应的超过的值; 如果没有超标,返回null。
|
|
|
* 一个字段返回用作2个地方
|
|
|
* 2025年03月06日10:40:54 不再用连续2个小时超标,只判断当前值和上个小时的值比较
|
|
|
+ * 2025年03月19日10:47:18 返回逻辑调整:额外再返回一个上个小时同指标的值,决策力需要展示该值。
|
|
|
* @param currentVal
|
|
|
* @param category
|
|
|
* @param tXinyiRobots
|
|
|
* @return
|
|
|
*/
|
|
|
- private BigDecimal existsRobotYCSG(BigDecimal currentVal, String category, List<TXinyiRobot> tXinyiRobots) {
|
|
|
+ private Map<String, BigDecimal> existsRobotYCSG(BigDecimal currentVal, String category, List<TXinyiRobot> tXinyiRobots) {
|
|
|
// BigDecimal result = null;//默认不超标
|
|
|
// TXinyiRobot tXinyiRobot1 = tXinyiRobots.get(INDEX_1);
|
|
|
// TXinyiRobot tXinyiRobot2 = tXinyiRobots.get(INDEX_2);
|
|
@@ -3731,29 +3757,36 @@ public class AsyncTask {
|
|
|
// }
|
|
|
// return result;
|
|
|
|
|
|
- BigDecimal result = null;//默认不超标
|
|
|
+ Map<String, BigDecimal> resultMap = new HashMap<>();
|
|
|
+// BigDecimal result = null;//默认不超标
|
|
|
TXinyiRobot tXinyiRobot1 = tXinyiRobots.get(INDEX_1);
|
|
|
BigDecimal compareVal = BigDecimal.valueOf(YCSG_VAL_CONF);
|
|
|
if(BusinessEnum.WarningCategoryEnum.ROBOT_XSY_1.getCode().equals(category)){
|
|
|
BigDecimal no3Hlj1Jqr1 = tXinyiRobot1.getNo3Hlj1Jqr();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(no3Hlj1Jqr1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(no3Hlj1Jqr1).divide(no3Hlj1Jqr1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, no3Hlj1Jqr1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.ROBOT_XSY_2.getCode().equals(category)){
|
|
|
BigDecimal no3Hlj2Jqr1 = tXinyiRobot1.getNo3Hlj2Jqr();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(no3Hlj2Jqr1) ){
|
|
|
BigDecimal divide1 = currentVal.subtract(no3Hlj2Jqr1).divide(no3Hlj2Jqr1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, no3Hlj2Jqr1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.ROBOT_ECCZLSY.getCode().equals(category)){
|
|
|
BigDecimal tpRccJqr1 = tXinyiRobot1.getTpRccJqr();
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(tpRccJqr1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(tpRccJqr1).divide(tpRccJqr1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, tpRccJqr1);
|
|
|
+ }
|
|
|
}
|
|
|
}else if(BusinessEnum.WarningCategoryEnum.ROBOT_CS_AD.getCode().equals(category)){//2025年02月25日16:23:08 合并一个指标:出水氨氮 通过计算获得
|
|
|
//计算得到对应的值
|
|
@@ -3784,13 +3817,15 @@ public class AsyncTask {
|
|
|
|
|
|
if(!Objects.isNull(currentVal) && !Objects.isNull(anDan1)){
|
|
|
BigDecimal divide1 = currentVal.subtract(anDan1).divide(anDan1, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
- if(divide1.compareTo(compareVal) > 0)
|
|
|
- result = divide1;
|
|
|
+ if(divide1.compareTo(compareVal) > 0){
|
|
|
+ resultMap.put(EXCEEDVAL, divide1);
|
|
|
+ resultMap.put(LASTVAL, anDan1);
|
|
|
+ }
|
|
|
}
|
|
|
}else{
|
|
|
log.error("化验室暂时还不支持的报警类型~~~~");
|
|
|
}
|
|
|
- return result;
|
|
|
+ return resultMap;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -4161,7 +4196,7 @@ public class AsyncTask {
|
|
|
this.xinyiChatRecordMapper.insertTXinyiChatRecord(chatReq);
|
|
|
}
|
|
|
|
|
|
- private void addChatRecordByYCSG(TXinyiWarningRecord warningRecord, TXinyiIndustry tXinyiIndustry, TXinyiNormConfig normConfig, String category, BigDecimal exceedVal) {
|
|
|
+ private void addChatRecordByYCSG(TXinyiWarningRecord warningRecord, TXinyiIndustry tXinyiIndustry, TXinyiNormConfig normConfig, String category, BigDecimal exceedVal, BigDecimal lastVal) {
|
|
|
ChatReq chatReq = new ChatReq();
|
|
|
//保存聊天记录
|
|
|
//将问答更新到数据库中
|
|
@@ -4175,7 +4210,7 @@ public class AsyncTask {
|
|
|
chatReq.setShowVal(showVal);//前端展示的数据和提问的数据不一致
|
|
|
chatReq.setQuestion(BusinessEnum.WarningSymbolEnum.SJYC_YCSG.getMsg());//本地问题
|
|
|
// chatReq.setAnswer(category + YCSG_ANSWER_ONE + exceedVal.multiply(BigDecimal_100) + "%" + YCSG_ANSWER_TWO + warningRecord.getWarningVal() + YCSG_ANSWER_THREE);
|
|
|
- chatReq.setAnswer(YCSG_ANSWER_REPLACE.replaceAll("@@@0", category).replaceAll("@@@1", String.valueOf(DecimalUtils.getAbsAndScale(warningRecord.getWarningVal(), INT_2))).replaceAll("@@@2", DecimalUtils.getAbsAndScale(exceedVal.multiply(BigDecimal_100), INT_1) + "%"));
|
|
|
+ chatReq.setAnswer(YCSG_ANSWER_REPLACE.replaceAll("@@@0", category).replaceAll("@@@1", String.valueOf(DecimalUtils.getAbsAndScale(warningRecord.getWarningVal(), INT_2))).replaceAll("@@@2", DecimalUtils.getAbsAndScale(exceedVal.multiply(BigDecimal_100), INT_1) + "%").replace("@@@3", String.valueOf(lastVal)));
|
|
|
chatReq.setWarningId(String.valueOf(warningRecord.getId()));
|
|
|
chatReq.setCounts(1);//问答次数
|
|
|
|
|
@@ -4895,7 +4930,9 @@ public class AsyncTask {
|
|
|
//是否存在异常升高的问题
|
|
|
if(!CollectionUtils.isEmpty(tXinyiRobots) && tXinyiRobots.size() == INT_3){
|
|
|
//2025年02月21日14:33:37 这里要改成当前值和上个小时比较 上个小时和上上个小时比较
|
|
|
- BigDecimal exceedVal = existsRobotYCSG(currentVal, category, tXinyiRobots);
|
|
|
+// BigDecimal exceedVal = existsRobotYCSG(currentVal, category, tXinyiRobots);
|
|
|
+ Map<String, BigDecimal> resultMap = existsRobotYCSG(currentVal, category, tXinyiRobots);
|
|
|
+ BigDecimal exceedVal = resultMap.get(EXCEEDVAL);
|
|
|
if(!Objects.isNull(exceedVal)){//这里不能只返回一个布尔类型的结果,因为还要获取百分比的值
|
|
|
//关闭同类型的其他报警
|
|
|
closeOtherWarningsByCategory(category, BusinessEnum.WarningSymbolEnum.SJYC_YCSG.getCode());
|
|
@@ -4916,7 +4953,7 @@ public class AsyncTask {
|
|
|
warningRecordYCSG.setCwrwxz(getCwrwxzByDetail(currentVal, normConfig, category, false));//根据当前值和类型以及是否超标处理
|
|
|
this.xinyiWarningRecordMapper.insertTXinyiWarningRecord(warningRecordYCSG);
|
|
|
//同时处理决策 不用调用大模型,本地处理问答
|
|
|
- addChatRecordByYCSG(warningRecordYCSG, tXinyiIndustry, normConfig, category, exceedVal);
|
|
|
+ addChatRecordByYCSG(warningRecordYCSG, tXinyiIndustry, normConfig, category, exceedVal, resultMap.get(LASTVAL));
|
|
|
}else{
|
|
|
log.info("化验室报警的时候,发现存在异常升高的报警,并且已经有该类型报警了,不做任何处理");
|
|
|
}
|