hanfucheng 3 ماه پیش
والد
کامیت
2f48bd7d7f

+ 1 - 3
src/main/java/com/sooka/sponest/data/other/patrolpoint/controller/CenterdataTEmergencyPatrolpointController.java

@@ -178,9 +178,7 @@ public class CenterdataTEmergencyPatrolpointController extends BaseController {
     @GetMapping(value = "editXungengState")
     public AjaxResult editXungengState(CenterdataTEmergencyPatrolpoint centerdataTEmergencyPatrolpoint) {
         List<CenterdataTEmergencyPatrolpoint> list = centerdataTEmergencyPatrolpointService.editXungengState(centerdataTEmergencyPatrolpoint);
-        for (CenterdataTEmergencyPatrolpoint center : list) {
-            this.edit(center);
-        }
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.EMERGENCY_PATROLPOINT,BusinessType.UPDATEALL, JSON.toJSONString(list)));
         return AjaxResult.success("修改成功");
     }
 

+ 1 - 0
src/main/java/com/sooka/sponest/data/other/patrolpoint/mapper/CenterdataTEmergencyPatrolpointMapper.java

@@ -3,6 +3,7 @@ package com.sooka.sponest.data.other.patrolpoint.mapper;
 import com.sooka.sponest.data.digitalemergency.domain.vo.CenterdataTEmergencyEarlywarning;
 import com.sooka.sponest.data.digitalemergency.domain.vo.DayBody;
 import com.sooka.sponest.data.other.patrolpoint.domain.CenterdataTEmergencyPatrolpoint;
+import org.apache.ibatis.annotations.Options;
 
 import java.util.List;
 import java.util.Map;

+ 4 - 1
src/main/java/com/sooka/sponest/data/other/patrolpoint/service/impl/CenterdataTEmergencyPatrolpointServiceImpl.java

@@ -154,7 +154,10 @@ public class CenterdataTEmergencyPatrolpointServiceImpl extends BaseServiceImpl
     */
     @Override
     public int editXungengTime(CenterdataTEmergencyPatrolpoint centerdataTEmergencyPatrolpoint) {
-        return centerdataTEmergencyPatrolpointMapper.editXungengTime(centerdataTEmergencyPatrolpoint);
+        centerdataTEmergencyPatrolpointMapper.editXungengTime(centerdataTEmergencyPatrolpoint);
+        List<CenterdataTEmergencyPatrolpoint> list = this.selectCenterdataTEmergencyPatrolpointList(centerdataTEmergencyPatrolpoint);
+        DataProducerUtil.getInstance().publish(new ESVo(DocumentNameConstants.EMERGENCY_PATROLPOINT,BusinessType.UPDATEALL, JSON.toJSONString(list)));
+        return 1;
     }
 
     /*

+ 1 - 1
src/main/resources/mapper/other/CenterdataTEmergencyPatrolpointMapper.xml

@@ -233,6 +233,6 @@
             WHEN NOW() &gt;= DATE_SUB(patrol_nexttime, INTERVAL alert_day DAY) AND NOW() &lt; patrol_nexttime THEN '预警'
             WHEN NOW() &gt; patrol_nexttime THEN '告警'
             END)
-        where enterprise_id = #{enterpriseId}
+        where enterprise_id = #{enterpriseId};
     </update>
 </mapper>