Quellcode durchsuchen

add 历史方案列表查询

459242451@qq.com vor 3 Jahren
Ursprung
Commit
374c028e47

+ 7 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhdd/IncidentController.java

@@ -572,6 +572,13 @@ public class IncidentController extends BaseController {
         }
     }
 
+    @ApiOperation("查询历史事件以及对应的方案")
+    @RepeatSubmit()
+    @GetMapping("/history")
+    public TableDataInfo<IncidentVo> history(IncidentBo bo) {
+        return iIncidentService.queryHistory(bo);
+    }
+
     @ApiOperation("复制事件应急方案")
     @RepeatSubmit()
     @PostMapping("/copyTask")

+ 3 - 0
ruoyi-zhdd/src/main/java/com/ruoyi/zhdd/domain/vo/IncidentVo.java

@@ -201,4 +201,7 @@ public class IncidentVo {
     // 办结时间
     private String dealEndTime;
 
+    // 事件的历史处置方案
+//    private List<IncidentTaskVo> incidentTaskVoList;
+
 }

+ 8 - 0
ruoyi-zhdd/src/main/java/com/ruoyi/zhdd/service/IIncidentService.java

@@ -59,4 +59,12 @@ public interface IIncidentService extends IServicePlus<Incident, IncidentVo> {
     Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);
 
     void savePlanAndCreate(IncidentBo bo);
+
+    /**
+     * 查询历史事件以及对应的方案
+     *
+     * @param bo
+     * @return
+     */
+    TableDataInfo<IncidentVo> queryHistory(IncidentBo bo);
 }

+ 11 - 3
ruoyi-zhdd/src/main/java/com/ruoyi/zhdd/service/impl/IncidentServiceImpl.java

@@ -19,7 +19,6 @@ import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.RedisUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.service.ISysDeptService;
-import com.ruoyi.system.service.ISysUserService;
 import com.ruoyi.zhdd.domain.Incident;
 import com.ruoyi.zhdd.domain.IncidentProcess;
 import com.ruoyi.zhdd.domain.IncidentTask;
@@ -67,8 +66,6 @@ public class IncidentServiceImpl extends ServicePlusImpl<IncidentMapper, Inciden
     @Autowired
     private IIncidentProcessService incidentProcessService;
     @Autowired
-    private ISysUserService sysUserService;
-    @Autowired
     private ISysDeptService sysDeptService;
     @Autowired
     private IIncidentTaskService incidentTaskService;
@@ -438,4 +435,15 @@ public class IncidentServiceImpl extends ServicePlusImpl<IncidentMapper, Inciden
             }
         }
     }
+
+    @Override
+    public TableDataInfo<IncidentVo> queryHistory(IncidentBo bo) {
+        bo.setStatus(4);
+        TableDataInfo<IncidentVo> incidentVoTableDataInfo = this.queryPageList(bo);
+        // 查询相关事件的处置方案
+        /*if (incidentVoTableDataInfo.getRows().size() > 0) {
+
+        }*/
+        return incidentVoTableDataInfo;
+    }
 }

+ 6 - 6
ruoyi-zhdd/src/main/java/com/ruoyi/zhdd/service/impl/IncidentTaskServiceImpl.java

@@ -79,7 +79,7 @@ public class IncidentTaskServiceImpl extends ServicePlusImpl<IncidentTaskMapper,
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean insertByBo(IncidentTasksBo bo) {
-        JSONObject jsonObject = new JSONObject();
+//        JSONObject jsonObject = new JSONObject();
         // 待删除事件用户关系的array
         JSONArray removeJsonArray = new JSONArray();
         // 待新增事件用户关系的array
@@ -197,8 +197,8 @@ public class IncidentTaskServiceImpl extends ServicePlusImpl<IncidentTaskMapper,
             save(add);
             // 为了发送时知道方案的id
             bo.setId(add.getId());
-            jsonObject.set("des", "新增处置指令:" + bo.getTaskName());
-            jsonObject.set("taskId", add.getId());
+//            jsonObject.set("des", "新增处置指令:" + bo.getTaskName());
+//            jsonObject.set("taskId", add.getId());
 
             List<String> newUserId = CollUtil.defaultIfEmpty(bo.getMessagePushUsers(), new ArrayList<>()).stream().map(MessagePushUser::getUserId).collect(Collectors.toList());
             for (String userId : newUserId) {
@@ -211,9 +211,9 @@ public class IncidentTaskServiceImpl extends ServicePlusImpl<IncidentTaskMapper,
             // 只在新增时加入日志 2022-06-08 16:58:46修改
 
             // 发送消息(1-应急处置消息、2-应急处置待办、3-资源管理待办)
-            jsonObject.set("incidentId", bo.getIncidentId());
-            jsonObject.set("incidentStatus", 3);
-            RedisUtils.publish(Constants.PROCESS_RECORD, jsonObject);
+//            jsonObject.set("incidentId", bo.getIncidentId());
+//            jsonObject.set("incidentStatus", 3);
+//            RedisUtils.publish(Constants.PROCESS_RECORD, jsonObject);
         }