Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 8 months ago
parent
commit
9639f524d2
  1. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java
  2. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml

4
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java

@ -120,7 +120,7 @@ public class MessageServiceImpl implements MessageService {
.createUser(CommonConstant.SYSTEM_USER) .createUser(CommonConstant.SYSTEM_USER)
.params(new HashMap<String,String>(){{ .params(new HashMap<String,String>(){{
put("projectName",entity.getStationName()); put("projectName",entity.getStationName());
put("deviceName", Optional.ofNullable(entity.getDeviceName()).orElse("")); put("deviceName", Optional.ofNullable(entity.getDeviceName()).orElse("未知设备"));
put("ruleDefName",entity.getAlarmContext()); put("ruleDefName",entity.getAlarmContext());
put("ts", DateUtil.format(entity.getAlarmTime(),DateUtil.PATTERN_DATETIME)); put("ts", DateUtil.format(entity.getAlarmTime(),DateUtil.PATTERN_DATETIME));
}}) }})
@ -162,7 +162,7 @@ public class MessageServiceImpl implements MessageService {
// 微信参数键值对 // 微信参数键值对
HashMap<String,Object> map = new HashMap<>(); HashMap<String,Object> map = new HashMap<>();
map.put("thing18",entity.getStationName()); map.put("thing18",entity.getStationName());
map.put("thing5",entity.getDeviceCode()); map.put("thing5",Optional.ofNullable(entity.getDeviceCode()).orElse("未知设备"));
map.put("thing11",entity.getAlarmContext()); map.put("thing11",entity.getAlarmContext());
map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmType())); map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmType()));
map.put("time2",entity.getAlarmTime()); map.put("time2",entity.getAlarmTime());

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/FocusAttributeMapper.xml

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.operational.config.mapper.FocusAttributeMapper"> <mapper namespace="com.hnac.hzims.operational.config.mapper.FocusAttributeMapper">
<select id="getMainList" resultType="com.hnac.hzims.operational.config.entity.FocusAttributeEntity"> <select id="getMainList" resultType="com.hnac.hzims.operational.config.entity.FocusAttributeEntity">
select distinct group_id, group_name, domain_id, domain_name,model_id, status select distinct group_id, group_name, domain_id, domain_name,model_id, status,create_time,update_time
FROM hzims_focus_attribute FROM hzims_focus_attribute
<where> <where>
is_deleted = 0 AND tenant_id = '200000' is_deleted = 0 AND tenant_id = '200000'

Loading…
Cancel
Save