Browse Source

Merge branch 'server-165' of uskycloud/usky-modules into master

gez 11 months ago
parent
commit
29b2377eb1

+ 11 - 3
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionEventServiceImpl.java

@@ -20,7 +20,7 @@ import com.usky.fire.service.PatrolInspectionPersonnelService;
 import com.usky.fire.service.PatrolInspectionPlanScheduleService;
 import com.usky.fire.service.config.rabbitmq.RabbitMQConfig;
 import com.usky.fire.service.vo.PatrolInspectionPlanRequestVO;
-import org.apache.catalina.security.SecurityUtil;
+import com.usky.system.RemoteMceService;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -48,6 +48,9 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
     private RabbitTemplate rabbitTemplate;
     @Autowired
     private RabbitMQConfig rabbitMQConfig;
+    @Autowired
+    private RemoteMceService remoteMceService;
+
 
     @Override
     public CommonPage<PatrolInspectionEvent> patrolInspectionEventList(PatrolInspectionPlanRequestVO requestVO){
@@ -112,11 +115,16 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
         map.put("remark",patrolInspectionEvent.getRemark());
         map.put("createBy",patrolInspectionEvent.getCreateBy());
         map.put("createTime",patrolInspectionEvent.getCreateTime());
-
 //        rabbitTemplate.convertAndSend(rabbitMQConfig.patrolEventExchange,rabbitMQConfig.patrolEventRoute,map);
         rabbitTemplate.convertAndSend(rabbitMQConfig.patrolFEventExchange,"", JSONObject.toJSONString(map));
-
         this.save(patrolInspectionEvent);
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.addProperty("infoTitle", patrolInspectionEvent.getEventName());
+        jsonObject.addProperty("infoContent",patrolInspectionEvent.getEventType());
+        jsonObject.addProperty("infoType",2);
+        jsonObject.addProperty("id",patrolInspectionEvent.getId());
+        remoteMceService.addMce(jsonObject.toString());
+
     }
 
     @Override

+ 3 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionRecordServiceImpl.java

@@ -452,7 +452,9 @@ public class PatrolInspectionRecordServiceImpl extends AbstractCrudService<Patro
             for (int i = 0; i < idArray.length; i++) {
                 listId.add(Integer.parseInt(idArray[i]));
             }
-            queryWrapper.in(PatrolInspectionRecord::getId, listId);
+            if (!listId.isEmpty()){
+                queryWrapper.in(PatrolInspectionRecord::getId, listId);
+            }
         }
         queryWrapper.orderByDesc(PatrolInspectionRecord::getId);
         List<PatrolInspectionRecord> patrolInspectionRecordList = this.list(queryWrapper);