沙钢智慧能源系统后端代码
liriming
2024-12-11 9fd640a0efbeaa9f8161b3db858ad99596ed3015
content内容
已修改1个文件
14 ■■■■ 文件已修改
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelPredictFinishConsumer.java
@@ -85,13 +85,13 @@
                        alarmMessage.setAlarmType("2");//超上限
                    }
                    alarmMessage.setAlarmTime(DateUtils.parse(data[0].toString(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND));
                    JSONObject content = new JSONObject();
                    content.put("alarmObj", item.getAlarmObj());
                    content.put("alarmType", alarmMessage.getAlarmType());
                    content.put("unit", item.getUnit());
                    content.put("overLimitTime", data[0]);
                    content.put("overLimitValue", dataValue);
                    alarmMessage.setContent(JSONObject.toJSONString(content));
                    StringBuffer sb = new StringBuffer();
                    sb.append(data[0]);
                    sb.append(item.getAlarmObj());
                    sb.append(alarmMessage.getAlarmType());
                    sb.append(dataValue);
                    sb.append(item.getUnit());
                    alarmMessage.setContent(sb.toString());
                    System.out.println("预警消息=" + alarmMessage);
                    rabbitTemplate.convertAndSend(RoutingConstant.EXCHANGE, RoutingConstant.Iailab_Model_Alarm, alarmMessage);
                    break;