|
@@ -15,12 +15,16 @@ 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.rabbitmq.RabbitMQConfig;
|
|
|
import com.usky.fire.service.vo.PatrolInspectionPlanRequestVO;
|
|
|
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -36,6 +40,10 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
|
|
|
private PatrolInspectionPlanScheduleService patrolInspectionPlanScheduleService;
|
|
|
@Autowired
|
|
|
private PatrolInspectionPersonnelService patrolInspectionPersonnelService;
|
|
|
+ @Autowired
|
|
|
+ private RabbitTemplate rabbitTemplate;
|
|
|
+ @Autowired
|
|
|
+ private RabbitMQConfig rabbitMQConfig;
|
|
|
|
|
|
@Override
|
|
|
public CommonPage<PatrolInspectionEvent> patrolInspectionEventList(PatrolInspectionPlanRequestVO requestVO){
|
|
@@ -76,6 +84,23 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
|
|
|
patrolInspectionEvent.setCreateBy(SecurityUtils.getUsername());
|
|
|
patrolInspectionEvent.setCreateTime(LocalDateTime.now());
|
|
|
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
+ map.put("deviceId",patrolInspectionEvent.getDeviceId());
|
|
|
+ map.put("personnelId",patrolInspectionEvent.getPersonnelId());
|
|
|
+ map.put("personnelName",patrolInspectionEvent.getPersonnelName());
|
|
|
+ map.put("eventName",patrolInspectionEvent.getEventName());
|
|
|
+ map.put("eventType",patrolInspectionEvent.getEventType());
|
|
|
+ map.put("eventCategory",patrolInspectionEvent.getEventCategory());
|
|
|
+ map.put("eventImage",patrolInspectionEvent.getEventImage());
|
|
|
+ map.put("handleStatus",patrolInspectionEvent.getHandleStatus());
|
|
|
+ map.put("handleName",patrolInspectionEvent.getHandleName());
|
|
|
+ map.put("handleTime",patrolInspectionEvent.getHandleTime());
|
|
|
+ map.put("remark",patrolInspectionEvent.getRemark());
|
|
|
+ map.put("createBy",patrolInspectionEvent.getCreateBy());
|
|
|
+ map.put("createTime",patrolInspectionEvent.getCreateTime());
|
|
|
+
|
|
|
+ rabbitTemplate.convertAndSend(rabbitMQConfig.patrolEventExchange,rabbitMQConfig.patrolEventRoute,map);
|
|
|
+
|
|
|
this.save(patrolInspectionEvent);
|
|
|
}
|
|
|
|