Forráskód Böngészése

修复bug alarmCode 未删除{}, chnnaleCode未写入

Memory_LG 1 hete
szülő
commit
a96ae891e6

+ 2 - 1
src/main/java/com/sooka/sponest/event/centereventteventcatalogue/service/impl/AlarmEventServiceImpl.java

@@ -339,7 +339,8 @@ public class AlarmEventServiceImpl implements AlarmEventService {
         String reportor = infoVO.getDeviceName();
         Date reportTime = DateUtils.timestampToTime(infoVO.getAlarmDate());
         String address = centerdataTCamera.getCameraRegion();
-        CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue("1", null, eventName, eventDescription, longitude, latitude, reportor, reportTime, address, infoVO.getAlarmCode(), infoVO.getNodeCode());
+        String alarmCode = infoVO.getAlarmCode().replace("{", "").replace("}", "");
+        CentereventTEventcatalogue centereventTEventcatalogue = new CentereventTEventcatalogue("1", null, eventName, eventDescription, longitude, latitude, reportor, reportTime, address, alarmCode, infoVO.getNodeCode());
         centereventTEventcatalogue = this.insertEventCatalogue(centereventTEventcatalogue, centerdataTCamera, daHuaFireEventVO.getCreateTime());
         // 事件部门
         this.insertEventDept(centereventTEventcatalogue, listDept);

+ 2 - 0
src/main/resources/mapper/centereventteventcatalogue/CentereventTEventcatalogueMapper.xml

@@ -213,6 +213,7 @@
             <if test="deptName != null">dept_name,</if>
             <if test="address != null ">address,</if>
             <if test="alarmCode != null ">alarm_code,</if>
+            <if test="chnnaleCode != null ">chnnale_code,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -240,6 +241,7 @@
             <if test="deptName != null">#{deptName},</if>
             <if test="address != null ">#{address},</if>
             <if test="alarmCode != null ">#{alarmCode},</if>
+            <if test="chnnaleCode != null ">#{chnnaleCode},</if>
         </trim>
     </insert>