Jelajahi Sumber

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

hanzhengyi 11 bulan lalu
induk
melakukan
428a23c32f

+ 6 - 1
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/PatrolInspectionEventServiceImpl.java

@@ -20,6 +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 com.usky.system.RemoteDictService;
 import com.usky.system.RemoteMceService;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -50,6 +51,8 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
     private RabbitMQConfig rabbitMQConfig;
     @Autowired
     private RemoteMceService remoteMceService;
+    @Autowired
+    private RemoteDictService remoteDictService;
 
 
     @Override
@@ -118,9 +121,11 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
 //        rabbitTemplate.convertAndSend(rabbitMQConfig.patrolEventExchange,rabbitMQConfig.patrolEventRoute,map);
         rabbitTemplate.convertAndSend(rabbitMQConfig.patrolFEventExchange,"", JSONObject.toJSONString(map));
         this.save(patrolInspectionEvent);
+        String eventTypeName = remoteDictService.selectNameById("patrol_event_type",
+                patrolInspectionEvent.getEventType().toString());
         JsonObject jsonObject = new JsonObject();
         jsonObject.addProperty("infoTitle", patrolInspectionEvent.getEventName());
-        jsonObject.addProperty("infoContent",patrolInspectionEvent.getEventType());
+        jsonObject.addProperty("infoContent",eventTypeName);
         jsonObject.addProperty("infoType",2);
         jsonObject.addProperty("id",patrolInspectionEvent.getId());
         remoteMceService.addMce(jsonObject.toString());