瀏覽代碼

修复bug

Memory_LG 2 月之前
父節點
當前提交
12771c10ad

+ 3 - 0
src/main/java/com/sooka/sponest/event/eventDept/service/impl/EventDeptServiceImpl.java

@@ -18,6 +18,9 @@ public class EventDeptServiceImpl implements EventDeptService {
 
     @Override
     public void insertEventDept(String eventId, List<CenterdataTAidevicedept> listDept) {
+        if(listDept.isEmpty()){
+            return;
+        }
         List<EventDept> deptList = new ArrayList();
         listDept.forEach(dept -> {
             deptList.add(new EventDept(eventId, dept.getMapDeptId()));

+ 8 - 0
src/main/java/com/sooka/sponest/event/eventProcess/domain/EventInfo.java

@@ -128,8 +128,16 @@ public class EventInfo extends BaseBusinessEntity {
      */
     private List<EventLog> eventLogList = new ArrayList<>();
 
+    /**
+     * 上报事件所属部门
+     */
     private List<Long> deptIdList = new ArrayList<>();
 
+    /**
+     * 确认火情事件时, 传递事件类型的key
+     */
+    private String newEventType;
+
     public EventInfo(String eventId, String eventType, String eventName, String eventDescription, String reportSource, String longitude, String latitude, String reporter, Date reportTime, String cameraCode, String eventStatus, String address, String isUrged, String createBy, Date createTime) {
         this.eventId = eventId;
         this.eventType = eventType;

+ 157 - 74
src/main/java/com/sooka/sponest/event/eventProcess/service/impl/EventProcessServiceImpl.java

@@ -13,6 +13,7 @@ import com.ruoyi.system.api.RemoteDeptService;
 import com.ruoyi.system.api.RemoteFileService;
 import com.ruoyi.system.api.domain.SysDept;
 import com.ruoyi.system.api.domain.SysUser;
+import com.ruoyi.system.api.model.LoginUser;
 import com.sooka.sponest.event.base.service.impl.BaseServiceImpl;
 import com.sooka.sponest.event.eventAttach.domain.EventAttach;
 import com.sooka.sponest.event.eventAttach.service.EventAttachService;
@@ -100,8 +101,9 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
 
     /**
      * 事件中心 - 综合查询 - 详情
+     *
      * @author limeng
-     * */
+     */
     @Override
     public EventInfoBO getCompositeEventDetail(EventInfo eventInfo) {
         EventInfoBO eventInfoBO = new EventInfoBO();
@@ -226,7 +228,7 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
 
     @Override
     public void insertSensorEvent(SensorEventVo sensorEventVo) {
-        List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).listForCommandCenter(sensorEventVo.getSensorId(), "1", "1").getData();
+        List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).getAideviceDeptListByCode(sensorEventVo.getSensorId(), "1", "1").getData();
         if (StringUtils.isEmpty(listDept)) {
             logger.info("无法匹配相关部门!传感器为:{}", sensorEventVo.getReportor());
             return;
@@ -287,88 +289,88 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
     @DataScopeMutiDept(deptAlias = "d")
     public List<EventInfoBO> selectUnConfirmedList(EventInfo eventInfo) {
         setSookaDataBase(eventInfo);
-        List<EventInfoBO> eventInfoBOS = eventProcessMapper.selectUnConfirmedList(eventInfo);
-        listSetPath(eventInfoBOS);
-        return eventInfoBOS;
+        List<EventInfoBO> unconfirmedList = eventProcessMapper.selectUnConfirmedList(eventInfo);
+        listSetPath(unconfirmedList);
+        listSetEventStatusLabel(unconfirmedList);
+        return unconfirmedList;
     }
 
     @Override
     public EventInfo getUnconfirmedEventDetail(EventInfo eventInfo) {
-        EventInfo unconfirmedEventDetailById = eventProcessMapper.getUnconfirmedEventDetail(eventInfo);
-        detailSetPath(unconfirmedEventDetailById.getEventLogList());
-        return unconfirmedEventDetailById;
+        EventInfo unconfirmedEventDetail = eventProcessMapper.getUnconfirmedEventDetail(eventInfo);
+        detailSetPath(unconfirmedEventDetail.getEventLogList());
+        detailSetStatus(unconfirmedEventDetail);
+        return unconfirmedEventDetail;
     }
 
     @Override
     @DataScopeMutiDept(deptAlias = "d")
     public List<EventInfoBO> selectEventProcessList(EventInfo eventInfo) {
         setSookaDataBase(eventInfo);
-        List<EventInfoBO> eventInfoBOS = eventProcessMapper.selectEventProcessList(eventInfo);
-        listSetPath(eventInfoBOS);
-        return eventInfoBOS;
+        List<EventInfoBO> processList = eventProcessMapper.selectEventProcessList(eventInfo);
+        listSetPath(processList);
+        listSetEventStatusLabel(processList);
+        return processList;
     }
 
     @Override
     public EventInfo getProcessEventDetail(EventInfo eventInfo) {
-        EventInfo confirmedEventDetailById = eventProcessMapper.getProcessEventDetail(eventInfo);
-        detailSetPath(confirmedEventDetailById.getEventLogList());
-        return confirmedEventDetailById;
+        EventInfo processEventDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
+        detailSetPath(processEventDetail.getEventLogList());
+        detailSetStatus(processEventDetail);
+        return processEventDetail;
     }
 
     @Override
     @DataScopeMutiDept(deptAlias = "d")
     public List<EventInfoBO> selectUsualList(EventInfo eventInfo) {
         setSookaDataBase(eventInfo);
-        List<EventInfoBO> eventInfoBOS = eventProcessMapper.selectUsualList(eventInfo);
-        listSetPath(eventInfoBOS);
-        return eventInfoBOS;
+        List<EventInfoBO> usualList = eventProcessMapper.selectUsualList(eventInfo);
+        listSetPath(usualList);
+        listSetEventStatusLabel(usualList);
+        return usualList;
     }
 
     @Override
     public EventInfo getUsualEventDetail(EventInfo eventInfo) {
-        EventInfo usualEventDetailById = eventProcessMapper.getUsualEventDetail(eventInfo);
-        detailSetPath(usualEventDetailById.getEventLogList());
-        return usualEventDetailById;
+        EventInfo usualEventDetail = eventProcessMapper.getUsualEventDetail(eventInfo);
+        detailSetPath(usualEventDetail.getEventLogList());
+        detailSetStatus(usualEventDetail);
+        return usualEventDetail;
     }
 
     /**
      * 确认事件
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult confirm(EventInfo eventInfo) {
         if (lock.tryLock()) { //获取锁
             try {
+                LoginUser loginUser = SecurityUtils.getLoginUser();
                 //业务代码
-                SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-                if (null == sysUser) {
+                if (null == loginUser) {
                     return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
                 }
-
+                SysUser sysUser = loginUser.getSysUser();
+                setSookaDataBase(eventInfo);
                 //查询事件
                 List<EventInfoBO> unconfirmedEventList = eventProcessMapper.selectUnConfirmedList(eventInfo);
                 if (unconfirmedEventList.isEmpty()) {
                     return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
                 }
 
-                //获取事件详情
-                EventInfoBO unconfirmedEventDetail = unconfirmedEventList.get(0);
-                if (!EVENT_STATUS_1.equals(unconfirmedEventDetail.getEventStatus())) {
+                //获取事件信息
+                EventInfoBO unconfirmedEventInfo = unconfirmedEventList.get(0);
+                if (!EVENT_STATUS_1.equals(unconfirmedEventInfo.getEventStatus())) {
                     return AjaxResult.error(EventEnum.EVENT_NOT_FOUND.getDescribe());
                 }
 
-                // 验证是否配置摄像头通道
-                CenterdataTCamera centerdataTCamera = SpringUtils.getBean(RemoteMonitorService.class).getInfoByChannelCode(unconfirmedEventDetail.getCameraCode()).getData();
-                if (StringUtils.isNull(centerdataTCamera)) {
-                    logger.error("无法匹配相关设备!ChannelSn:{}", unconfirmedEventDetail.getCameraCode());
-                    return AjaxResult.error(EventEnum.CAMERA_NOT_FOUND.getDescribe());
-                }
-
-                // 验证是否配置指挥中心
-                List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).listForCommandCenter(unconfirmedEventDetail.getCameraCode(), "1", "0").getData();
+                // 根据deviceCode获取行管局集合
+                List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).getAideviceDeptListByCode(unconfirmedEventInfo.getCameraCode(), "1", "0").getData();
                 if (StringUtils.isEmpty(listDept)) {
-                    logger.info("无法匹配相关部门!摄像头编号为:{}", centerdataTCamera.getCameraCode());
-                    return AjaxResult.error(EventEnum.DEPT_NOT_FOUND.getDescribe());
+                    logger.info("无法匹配相关部门!摄像头编号为:{}", unconfirmedEventInfo.getCameraCode());
                 }
 
                 //插入行管局部门
@@ -378,14 +380,20 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
                 eventLogService.insertEventLog(eventInfo.getEventId(), sysUser.getDeptNames() + sysUser.getNickName() + EventEnum.EVENT_CONFIRM.getDescribe(), EVENT_LOG_TYPE_2, EVENT_LOG_SOURCE_99, String.valueOf(sysUser.getUserId()), DateUtils.getNowDate());
 
                 //下载附件到本地
-                moveAttach(unconfirmedEventDetail.getAttachList(), eventInfo.getEventId());
+                moveAttach(unconfirmedEventInfo.getAttachList(), eventInfo.getEventId());
 
                 //设置事件状态为确认事件
-                unconfirmedEventDetail.setEventStatus(EVENT_STATUS_2);
+                unconfirmedEventInfo.setEventStatus(EVENT_STATUS_2);
+
+                //如果确认的是火情事件, 需要设置事件类型;
+                if (StringUtils.isNotEmpty(eventInfo.getNewEventType())) {
+                    unconfirmedEventInfo.setEventType(eventInfo.getNewEventType());
+                }
+
                 //将事件主体移动到确认表
-                eventProcessMapper.insertEventProcess(unconfirmedEventDetail);
+                eventProcessMapper.insertEventProcess(unconfirmedEventInfo);
                 //删除待确认表
-                eventProcessMapper.deleteEventUnconfirmed(unconfirmedEventDetail);
+                eventProcessMapper.deleteEventUnconfirmed(unconfirmedEventInfo);
 
             } catch (Exception e) {
                 logger.error("事件处置失败!输入参数:{}", eventInfo, e);
@@ -403,24 +411,30 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
      * 无异常事件
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult usual(EventInfo eventInfo) {
         if (lock.tryLock()) { //获取锁
             try {
                 //业务代码
-                SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-                if (null == sysUser) {
+                LoginUser loginUser = SecurityUtils.getLoginUser();
+                //业务代码
+                if (null == loginUser) {
                     return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
                 }
+                SysUser sysUser = loginUser.getSysUser();
+
+                EventInfo queryParam = new EventInfo(eventInfo.getEventId());
+                setSookaDataBase(queryParam);
 
                 //设置标识, 判断待确认或已确认
                 boolean flag = true;
                 // 根据事件 ID 查询事件未确认列表
-                List<EventInfoBO> eventInfoBOS = eventProcessMapper.selectUnConfirmedList(new EventInfo(eventInfo.getEventId()));
+                List<EventInfoBO> eventInfoBOS = eventProcessMapper.selectUnConfirmedList(queryParam);
 
                 // 如果事件未确认列表为空,则查询事件确认列表
                 if (eventInfoBOS.isEmpty()) {
-                    eventInfoBOS = eventProcessMapper.selectEventProcessList(new EventInfo(eventInfo.getEventId()));
+                    eventInfoBOS = eventProcessMapper.selectEventProcessList(queryParam);
 
                     //设置标识为false, 证明时确认表中的事件. 则不需要移动附件
                     flag = false;
@@ -471,15 +485,18 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
      * 签收事件
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult signFor(EventInfo eventInfo) {
         if (lock.tryLock()) { //获取锁
             try {
                 //业务代码
-                SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-                if (null == sysUser) {
+                LoginUser loginUser = SecurityUtils.getLoginUser();
+                //业务代码
+                if (null == loginUser) {
                     return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
                 }
+                SysUser sysUser = loginUser.getSysUser();
 
                 eventInfo.setEventStatus(EVENT_STATUS_2);
                 EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
@@ -513,15 +530,18 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
      * 办结事件
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult completed(EventInfo eventInfo) {
         if (lock.tryLock()) { //获取锁
             try {
                 //业务代码
-                SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-                if (null == sysUser) {
+                LoginUser loginUser = SecurityUtils.getLoginUser();
+                //业务代码
+                if (null == loginUser) {
                     return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
                 }
+                SysUser sysUser = loginUser.getSysUser();
 
                 eventInfo.setEventStatus(EVENT_STATUS_3);
                 EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
@@ -552,15 +572,20 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
      * 审核办结事件
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult audit(EventInfo eventInfo) {
         if (lock.tryLock()) { //获取锁
             try {
                 //业务代码
-                SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-                if (null == sysUser) {
+                LoginUser loginUser = SecurityUtils.getLoginUser();
+                //业务代码
+                if (null == loginUser) {
                     return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
                 }
+                SysUser sysUser = loginUser.getSysUser();
+
+                String setEventStatus = eventInfo.getEventStatus();
 
                 eventInfo.setEventStatus(EVENT_STATUS_4);
                 EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
@@ -572,8 +597,10 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
                 eventLogService.insertEventLog(eventInfo.getEventId(), sysUser.getDeptNames() + sysUser.getNickName() + "审核结果:" + eventInfo.getEventDescription(), EVENT_LOG_TYPE_5, EVENT_LOG_SOURCE_99, String.valueOf(sysUser.getUserId()), DateUtils.getNowDate());
 
                 //更新主表状态
-                if (StringUtils.isBlank(eventInfo.getEventStatus())) {
+                if (StringUtils.isBlank(setEventStatus)) {
                     eventInfo.setEventStatus(EVENT_STATUS_5);
+                } else {
+                    eventInfo.setEventStatus(setEventStatus);
                 }
                 eventProcessMapper.updateEventProcess(eventInfo);
 
@@ -593,16 +620,20 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
      * 归档事件
      */
     @Override
+    @DataScopeMutiDept(deptAlias = "d")
     @Transactional(rollbackFor = Exception.class)
     public AjaxResult archive(EventInfo eventInfo) {
         if (lock.tryLock()) { //获取锁
             try {
+                LoginUser loginUser = SecurityUtils.getLoginUser();
+
                 //业务代码
-                SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-                if (null == sysUser) {
+                if (null == loginUser) {
                     return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
                 }
 
+                SysUser sysUser = loginUser.getSysUser();
+
                 eventInfo.setEventStatus(EVENT_STATUS_5);
                 EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
                 if (null == eventProcessDetail) {
@@ -634,10 +665,12 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
     @Override
     public AjaxResult cooperateDeptList(EventInfo eventInfo) {
         if (!eventInfo.getDeptIdList().isEmpty()) {
-            SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-            if (null == sysUser) {
+            LoginUser loginUser = SecurityUtils.getLoginUser();
+            //业务代码
+            if (null == loginUser) {
                 return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
             }
+            SysUser sysUser = loginUser.getSysUser();
 
 
             EventInfo eventProcessDetail = eventProcessMapper.getProcessEventDetail(eventInfo);
@@ -664,42 +697,70 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
     @Override
     public AjaxResult insertProcessEvent(EventInfo eventInfo) {
         try {
-            SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
-            if (null == sysUser) {
+            LoginUser loginUser = SecurityUtils.getLoginUser();
+            //业务代码
+            if (null == loginUser) {
                 return AjaxResult.error(EventEnum.USER_NOT_FOUND.getDescribe());
             }
+            SysUser sysUser = loginUser.getSysUser();
+
+
+            StringBuilder logSource = new StringBuilder();
+            StringBuilder logFileSource = new StringBuilder();
+            //判断上报来源
+            if(REPORTING_SOURCE_1.equals(eventInfo.getReportSource())){
+                //如果是AI, 日志和附件来源同样设置为AI
+                logSource.append(EVENT_LOG_SOURCE_1);
+                logFileSource.append(EVENT_LOG_FILE_SOURCE_1);
+            }else if(REPORTING_SOURCE_2.equals(eventInfo.getReportSource())){
+                //如果是PC, 日志和附件来源同样设置为PC
+                logSource.append(EVENT_LOG_SOURCE_2);
+                logFileSource.append(EVENT_LOG_FILE_SOURCE_2);
+            }else if(REPORTING_SOURCE_3.equals(eventInfo.getReportSource())){
+                //如果是PC, 日志和附件来源同样设置为PC
+                logSource.append(EVENT_LOG_SOURCE_3);
+                logFileSource.append(EVENT_LOG_FILE_SOURCE_3);
+            }else{
+                //不是三种方式, 返回未知来源事件.
+                return AjaxResult.error(EventEnum.SOURCE_NOT_FOUND.getDescribe());
+            }
+
+            Date nowDate = DateUtils.getNowDate();
 
             //设置事件Id
             eventInfo.setEventId(IdUtils.fastSimpleUUID());
+            eventInfo.setEventStatus(EVENT_STATUS_2);
+            eventInfo.setReporter(sysUser.getNickName());
+            eventInfo.setReportTime(nowDate);
+            eventInfo.setCreateBy(String.valueOf(sysUser.getUserId()));
+            eventInfo.setCreateTime(nowDate);
 
-            // 验证是否配置摄像头通道
-            CenterdataTCamera centerdataTCamera = SpringUtils.getBean(RemoteMonitorService.class).getInfoByChannelCode(eventInfo.getCameraCode()).getData();
-            if (StringUtils.isNull(centerdataTCamera)) {
-                logger.error("无法匹配相关设备!ChannelSn:{}", eventInfo.getCameraCode());
-                return AjaxResult.error(EventEnum.CAMERA_NOT_FOUND.getDescribe());
-            }
-
-            // 验证是否配置指挥中心
-            List<CenterdataTAidevicedept> listDept = SpringUtils.getBean(RemoteMonitorService.class).listForCommandCenter(eventInfo.getCameraCode(), "1", "0").getData();
-            if (StringUtils.isEmpty(listDept)) {
-                logger.info("无法匹配相关部门!摄像头编号为:{}", centerdataTCamera.getCameraCode());
+            List<CenterdataTAidevicedept> listDept = new ArrayList<>();
+            if(!eventInfo.getDeptIdList().isEmpty()){
+                eventInfo.getDeptIdList().forEach(deptId->{
+                    listDept.add(new CenterdataTAidevicedept(deptId, ""));
+                });
+                //插入行管局部门
+                eventDeptService.insertEventDept(eventInfo.getEventId(), listDept);
+            }else{
                 return AjaxResult.error(EventEnum.DEPT_NOT_FOUND.getDescribe());
             }
 
-            //插入行管局部门
-            eventDeptService.insertEventDept(eventInfo.getEventId(), listDept);
-
             // 插入事件日志
-            String logId = eventLogService.insertEventLog(eventInfo.getEventId(), sysUser.getDeptNames() + sysUser.getNickName() + EventEnum.EVENT_CONFIRM.getDescribe(), EVENT_LOG_TYPE_2, EVENT_LOG_SOURCE_2, String.valueOf(sysUser.getUserId()), DateUtils.getNowDate());
+            String logId = eventLogService.insertEventLog(eventInfo.getEventId(), sysUser.getDeptNames() + sysUser.getNickName() + EventEnum.EVENT_USER_INSERT.getDescribe(), EVENT_LOG_TYPE_2, logSource.toString(), String.valueOf(sysUser.getUserId()), nowDate);
 
             //存储附件
             if (!eventInfo.getPictureList().isEmpty()) {
                 List<EventAttach> attachList = new ArrayList<>();
                 for (int i = 0; i < eventInfo.getPictureList().size(); i++) {
-                    attachList.add(new EventAttach(logId, eventInfo.getEventId(), eventInfo.getPictureList().get(i), EVENT_LOG_FILE_SOURCE_2, FILE_URL, i));
+                    attachList.add(new EventAttach(logId, eventInfo.getEventId(), eventInfo.getPictureList().get(i), logFileSource.toString(), FILE_URL, i));
                 }
                 moveAttach(attachList, eventInfo.getEventId());
             }
+
+            //写入主表
+            eventProcessMapper.insertEventProcess(eventInfo);
+
             return AjaxResult.success("创建成功");
         } catch (Exception e) {
             return AjaxResult.error(e.getMessage());
@@ -749,4 +810,26 @@ public class EventProcessServiceImpl extends BaseServiceImpl implements EventPro
             eventAttachService.insertCompensationByEventId(eventId, DateUtils.getTime());
         }
     }
+
+    private void listSetEventStatusLabel(List<EventInfoBO> eventInfoBOS) {
+        Map<String, String> eventStatusMap = getEventStatusMap();
+        eventInfoBOS.forEach(eventInfoBO -> {
+            eventInfoBO.setEventStatus(MapUtils.getString(eventStatusMap, eventInfoBO.getEventStatus()));
+        });
+    }
+
+    private void detailSetStatus(EventInfo eventInfo) {
+        Map<String, String> eventStatusMap = getEventStatusMap();
+        eventInfo.setEventStatus(MapUtils.getString(eventStatusMap, eventInfo.getEventStatus()));
+
+        if (!eventInfo.getEventLogList().isEmpty()) {
+            Map<String, String> operationTypeMap = getOperationTypeMap();
+            Map<String, String> operationSourceMap = getOperationSourceMap();
+            eventInfo.getEventLogList().forEach(logInfo -> {
+                logInfo.setOperationType(MapUtils.getString(operationTypeMap, logInfo.getOperationType()));
+                logInfo.setOperationSource(MapUtils.getString(operationSourceMap, logInfo.getOperationSource()));
+            });
+        }
+
+    }
 }

+ 1 - 1
src/main/java/com/sooka/sponest/event/utils/AttachUtils.java

@@ -55,7 +55,7 @@ public class AttachUtils {
                 if (null != multipartFile) {
                     R<SysFile> upload = fileService.upload(multipartFile);
                     if (HttpStatus.SUCCESS == upload.getCode()) {
-                        paths.append(attach.getPath()).append(",");
+                        paths.append(upload.getData().getUrl()).append(",");
                         ids.append(attach.getId()).append(",");
                     } else {
                         flag = false;

+ 25 - 1
src/main/java/com/sooka/sponest/event/utils/eventConstants/EventConstants.java

@@ -37,7 +37,6 @@ public class EventConstants {
         return eventStatusMap;
     }
 
-
     /**
      * 事件来源
      */
@@ -80,6 +79,20 @@ public class EventConstants {
     public static final String EVENT_LOG_TYPE_100 = "event_log_type_100";// 业务日志
 
 
+    public static Map<String, String> getOperationTypeMap() {
+        HashMap<String, String> operationTypeMap = new HashMap<>();
+        operationTypeMap.put(EVENT_LOG_TYPE_1, "上报");
+        operationTypeMap.put(EVENT_LOG_TYPE_2, "确认");
+        operationTypeMap.put(EVENT_LOG_TYPE_3, "签收");
+        operationTypeMap.put(EVENT_LOG_TYPE_4, "办结");
+        operationTypeMap.put(EVENT_LOG_TYPE_5, "审核");
+        operationTypeMap.put(EVENT_LOG_TYPE_6, "归档");
+        operationTypeMap.put(EVENT_LOG_TYPE_98, "误报");
+        operationTypeMap.put(EVENT_LOG_TYPE_99, "重复");
+        operationTypeMap.put(EVENT_LOG_TYPE_100, "业务日志");
+        return operationTypeMap;
+    }
+
     /**
      * 事件日志操作来源
      */
@@ -95,6 +108,17 @@ public class EventConstants {
 
     public static final String EVENT_LOG_SOURCE_99 = "event_log_source_99";// 业务
 
+    public static Map<String, String> getOperationSourceMap() {
+        HashMap<String, String> operationSourceMap = new HashMap<>();
+        operationSourceMap.put(EVENT_LOG_SOURCE_1, "AI");
+        operationSourceMap.put(EVENT_LOG_SOURCE_2, "PC");
+        operationSourceMap.put(EVENT_LOG_SOURCE_3, "APP");
+        operationSourceMap.put(EVENT_LOG_SOURCE_4, "传感器");
+        operationSourceMap.put(EVENT_LOG_SOURCE_5, "住建");
+        operationSourceMap.put(EVENT_LOG_SOURCE_99, "业务");
+        return operationSourceMap;
+    }
+
 
     /**
      * 事件日志附件来源

+ 4 - 0
src/main/java/com/sooka/sponest/event/utils/eventEnum/EventEnum.java

@@ -10,6 +10,8 @@ public enum EventEnum {
 
     EVENT_CONFIRM("确认该事件!"), // 确认事件!
 
+    EVENT_USER_INSERT("人工上报该事件!"), // PC和APP上报事件!
+
     EVENT_USUAL("判定该事件为[无异常]!"), // 无异常!
 
     EVENT_SIGN_FOR("签收该事件!"), // 签收该事件!
@@ -24,6 +26,8 @@ public enum EventEnum {
 
     DEPT_NOT_FOUND("未查询到责任单位!"), // 未查询到责任单位!
 
+    SOURCE_NOT_FOUND("未知来源事件!"), // 未查询到责任单位!
+
     CAMERA_NOT_FOUND("未查询到相关设备!"), // 未查询到责任单位!
 
     METHOD_LOCKED("系统繁忙,请稍后重试!"); // 系统繁忙,请稍后重试!