|
@@ -18,6 +18,7 @@ import com.usky.fire.service.PatrolInspectionEventService;
|
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
|
import com.usky.fire.service.PatrolInspectionPersonnelService;
|
|
|
import com.usky.fire.service.PatrolInspectionPlanScheduleService;
|
|
|
+import com.usky.fire.service.config.SyncPatrolInspectionEvent;
|
|
|
import com.usky.fire.service.config.mqtt.MqttOutConfig;
|
|
|
import com.usky.fire.service.config.rabbitmq.RabbitMQConfig;
|
|
|
import com.usky.fire.service.vo.PatrolInspectionPlanRequestVO;
|
|
@@ -61,10 +62,7 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
|
|
|
@Resource
|
|
|
private MqttOutConfig.MqttGateway mqttGateway;
|
|
|
@Autowired
|
|
|
- private RemoteMceService remoteMceService;
|
|
|
- @Autowired
|
|
|
- private RemoteDictService remoteDictService;
|
|
|
-
|
|
|
+ private SyncPatrolInspectionEvent syncPatrolInspectionEvent;
|
|
|
|
|
|
@Override
|
|
|
public CommonPage<PatrolInspectionEvent> patrolInspectionEventList(PatrolInspectionPlanRequestVO requestVO){
|
|
@@ -135,15 +133,8 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
|
|
|
// 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",eventTypeName);
|
|
|
- jsonObject.addProperty("infoType",2);
|
|
|
- jsonObject.addProperty("userName",SecurityUtils.getUsername());
|
|
|
- jsonObject.addProperty("id",patrolInspectionEvent.getId());
|
|
|
- remoteMceService.addMce(jsonObject.toString());
|
|
|
+
|
|
|
+ syncPatrolInspectionEvent.sendAsyncMessage(patrolInspectionEvent.getId(),patrolInspectionEvent.getEventName(),patrolInspectionEvent.getEventType());
|
|
|
|
|
|
}
|
|
|
|