|
@@ -30,19 +30,22 @@ import com.ruoyi.system.service.ISysDictDataService;
|
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
|
import com.ruoyi.zhdd.domain.Incident;
|
|
|
import com.ruoyi.zhdd.domain.IncidentProcess;
|
|
|
-import com.ruoyi.zhdd.domain.IncidentTaskCommand;
|
|
|
-import com.ruoyi.zhdd.domain.IncidentTaskPerson;
|
|
|
import com.ruoyi.zhdd.domain.Plan;
|
|
|
import com.ruoyi.zhdd.domain.PlanFile;
|
|
|
import com.ruoyi.zhdd.domain.bo.IncidentBo;
|
|
|
import com.ruoyi.zhdd.domain.bo.IncidentTasksBo;
|
|
|
-import com.ruoyi.zhdd.domain.vo.IncidentTaskCommandVo;
|
|
|
import com.ruoyi.zhdd.domain.vo.IncidentTaskVo;
|
|
|
import com.ruoyi.zhdd.domain.vo.IncidentVo;
|
|
|
import com.ruoyi.zhdd.domain.vo.PlanFileVo;
|
|
|
import com.ruoyi.zhdd.domain.vo.PlanVo;
|
|
|
import com.ruoyi.zhdd.feign.FeignNoticeInfoService;
|
|
|
-import com.ruoyi.zhdd.service.*;
|
|
|
+import com.ruoyi.zhdd.service.IIncidentProcessService;
|
|
|
+import com.ruoyi.zhdd.service.IIncidentService;
|
|
|
+import com.ruoyi.zhdd.service.IIncidentTaskService;
|
|
|
+import com.ruoyi.zhdd.service.IPlanFileService;
|
|
|
+import com.ruoyi.zhdd.service.IPlanService;
|
|
|
+import com.ruoyi.zhdd.service.IPlanTaskService;
|
|
|
+import com.ruoyi.zhdd.service.IResourceDetailService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -81,29 +84,17 @@ import java.util.stream.Collectors;
|
|
|
public class IncidentController extends BaseController {
|
|
|
|
|
|
private final IIncidentService iIncidentService;
|
|
|
-
|
|
|
private final IIncidentTaskService incidentTaskService;
|
|
|
-
|
|
|
- private final IIncidentTaskPersonService incidentTaskPersonService;
|
|
|
-
|
|
|
- private final IIncidentTaskCommandService incidentTaskCommandService;
|
|
|
-
|
|
|
+ // private final IIncidentTaskPersonService incidentTaskPersonService;
|
|
|
+// private final IIncidentTaskCommandService incidentTaskCommandService;
|
|
|
private final IIncidentProcessService iIncidentProcessService;
|
|
|
-
|
|
|
private final IPlanTaskService planTaskService;
|
|
|
-
|
|
|
private final IPlanService planService;
|
|
|
-
|
|
|
private final IPlanFileService planFileService;
|
|
|
-
|
|
|
private final ISysDictDataService sysDictDataService;
|
|
|
-
|
|
|
private final FeignNoticeInfoService feignNoticeInfoService;
|
|
|
-
|
|
|
private final IResourceDetailService resourceDetailService;
|
|
|
-
|
|
|
private final ISysUserService sysUserService;
|
|
|
-
|
|
|
private final ISysDeptService sysDeptService;
|
|
|
|
|
|
@Value("${spring.profiles.active}")
|
|
@@ -123,14 +114,14 @@ public class IncidentController extends BaseController {
|
|
|
/**
|
|
|
* 导出事件基础列表
|
|
|
*/
|
|
|
- @ApiOperation("导出事件基础列表")
|
|
|
+// @ApiOperation("导出事件基础列表")
|
|
|
// @PreAuthorize("@ss.hasPermi('zhdd:incident:export')")
|
|
|
// @Log(title = "事件基础", businessType = BusinessType.EXPORT)
|
|
|
- @GetMapping("/export")
|
|
|
- public void export(@Validated IncidentBo bo, HttpServletResponse response) {
|
|
|
- List<IncidentVo> list = iIncidentService.queryList(bo);
|
|
|
- ExcelUtil.exportExcel(list, "事件基础", IncidentVo.class, response);
|
|
|
- }
|
|
|
+// @GetMapping("/export")
|
|
|
+// public void export(@Validated IncidentBo bo, HttpServletResponse response) {
|
|
|
+// List<IncidentVo> list = iIncidentService.queryList(bo);
|
|
|
+// ExcelUtil.exportExcel(list, "事件基础", IncidentVo.class, response);
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 获取事件基础详细信息
|
|
@@ -158,7 +149,7 @@ public class IncidentController extends BaseController {
|
|
|
}
|
|
|
map.put("baseInfo", incidentVo);
|
|
|
// 查询所属预案
|
|
|
- List<PlanVo> voOne = planService.listVo(Wrappers.<Plan>lambdaQuery().eq(Plan::getType, incidentVo.getType()).eq(Plan::getCreateDept, incidentVo.getCreateDept()));
|
|
|
+ List<PlanVo> voOne = planService.listVo(Wrappers.<Plan>lambdaQuery().eq(Plan::getType, incidentVo.getType()).eq(Plan::getCreateDept, incidentVo.getPlanDept()));
|
|
|
if (voOne != null && voOne.size() > 0) {
|
|
|
map.put("baseTask", planTaskService.queryPlanTaskByPlanId(voOne.get(0).getId()));
|
|
|
// 查询预案附件
|
|
@@ -221,7 +212,7 @@ public class IncidentController extends BaseController {
|
|
|
bo.setStatus(1);
|
|
|
LoginUser cacheLoginUser = UserUtil.getCacheLoginUser();
|
|
|
bo.setCreateBy(cacheLoginUser.getUsername());
|
|
|
- bo.setCreateDept(cacheLoginUser.getUser().getOrgId());
|
|
|
+ bo.setCreateDept(cacheLoginUser.getUser().getDeptId());
|
|
|
bo.setExpr1(cacheLoginUser.getUser().getPhonenumber());
|
|
|
return toAjax(iIncidentService.insertByBo(bo) ? 1 : 0);
|
|
|
}
|
|
@@ -312,13 +303,13 @@ public class IncidentController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
// 查询方案人员
|
|
|
- map.put("incidentPerson", incidentTaskPersonService.listVo(Wrappers.<IncidentTaskPerson>lambdaQuery().eq(IncidentTaskPerson::getIncidentTaskId, id)));
|
|
|
+// map.put("incidentPerson", incidentTaskPersonService.listVo(Wrappers.<IncidentTaskPerson>lambdaQuery().eq(IncidentTaskPerson::getIncidentTaskId, id)));
|
|
|
// 查询方案指令
|
|
|
- List<IncidentTaskCommandVo> incidentTaskCommandVos = incidentTaskCommandService.listVo(Wrappers.<IncidentTaskCommand>lambdaQuery().eq(IncidentTaskCommand::getIncidentTaskId, id));
|
|
|
- for (int i = 0; i < incidentTaskCommandVos.size(); i++) {
|
|
|
- incidentTaskCommandVos.get(i).setIndex(i + 1);
|
|
|
- }
|
|
|
- map.put("incidentCommand", incidentTaskCommandVos);
|
|
|
+// List<IncidentTaskCommandVo> incidentTaskCommandVos = incidentTaskCommandService.listVo(Wrappers.<IncidentTaskCommand>lambdaQuery().eq(IncidentTaskCommand::getIncidentTaskId, id));
|
|
|
+// for (int i = 0; i < incidentTaskCommandVos.size(); i++) {
|
|
|
+// incidentTaskCommandVos.get(i).setIndex(i + 1);
|
|
|
+// }
|
|
|
+// map.put("incidentCommand", incidentTaskCommandVos);
|
|
|
// 查询处置过程
|
|
|
List<IncidentProcess> incidentProcess = iIncidentProcessService.list(Wrappers.<IncidentProcess>lambdaQuery()
|
|
|
.eq(IncidentProcess::getIncidentId, incidentTaskVo.getIncidentId()).orderByDesc(IncidentProcess::getCreateTime));
|
|
@@ -347,6 +338,18 @@ public class IncidentController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("复制事件应急方案")
|
|
|
+ @RepeatSubmit()
|
|
|
+ @PostMapping("/copyTask")
|
|
|
+ public AjaxResult<Void> copyTask(@RequestBody JSONObject jsonObject) {
|
|
|
+ String oldId = jsonObject.getStr("oldIncidentId");
|
|
|
+ String newId = jsonObject.getStr("newIncidentId");
|
|
|
+ if (StrUtil.hasBlank(oldId, newId)) {
|
|
|
+ return AjaxResult.error("参数存在空值!");
|
|
|
+ }
|
|
|
+ return toAjax(incidentTaskService.copyTask(oldId, newId) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 删除零时生成的文件
|
|
|
*/
|