IncidentController.java 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. package com.ruoyi.web.controller.zhdd;
  2. import cn.afterturn.easypoi.word.WordExportUtil;
  3. import cn.hutool.core.collection.CollUtil;
  4. import cn.hutool.core.date.DateUtil;
  5. import cn.hutool.core.util.ObjectUtil;
  6. import cn.hutool.core.util.StrUtil;
  7. import cn.hutool.json.JSONArray;
  8. import cn.hutool.json.JSONObject;
  9. import cn.hutool.json.JSONUtil;
  10. import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  11. import com.ruoyi.common.annotation.Log;
  12. import com.ruoyi.common.annotation.RepeatSubmit;
  13. import com.ruoyi.common.annotation.Security;
  14. import com.ruoyi.common.constant.Constants;
  15. import com.ruoyi.common.core.controller.BaseController;
  16. import com.ruoyi.common.core.domain.AjaxResult;
  17. import com.ruoyi.common.core.domain.TreeSelect;
  18. import com.ruoyi.common.core.domain.entity.SysDept;
  19. import com.ruoyi.common.core.domain.entity.SysUser;
  20. import com.ruoyi.common.core.domain.model.LoginUser;
  21. import com.ruoyi.common.core.page.TableDataInfo;
  22. import com.ruoyi.common.core.validate.AddGroup;
  23. import com.ruoyi.common.core.validate.EditGroup;
  24. import com.ruoyi.common.core.validate.QueryGroup;
  25. import com.ruoyi.common.enums.BusinessType;
  26. import com.ruoyi.common.utils.RedisUtils;
  27. import com.ruoyi.common.utils.UserUtil;
  28. import com.ruoyi.common.utils.poi.ExcelUtil;
  29. import com.ruoyi.system.service.ISysDeptService;
  30. import com.ruoyi.system.service.ISysDictDataService;
  31. import com.ruoyi.system.service.ISysUserService;
  32. import com.ruoyi.zhdd.domain.Incident;
  33. import com.ruoyi.zhdd.domain.IncidentProcess;
  34. import com.ruoyi.zhdd.domain.IncidentTask;
  35. import com.ruoyi.zhdd.domain.Plan;
  36. import com.ruoyi.zhdd.domain.PlanFile;
  37. import com.ruoyi.zhdd.domain.bo.IncidentBo;
  38. import com.ruoyi.zhdd.domain.bo.IncidentTasksBo;
  39. import com.ruoyi.zhdd.domain.bo.MessagePushUser;
  40. import com.ruoyi.zhdd.domain.vo.IncidentTaskVo;
  41. import com.ruoyi.zhdd.domain.vo.IncidentVo;
  42. import com.ruoyi.zhdd.domain.vo.PlanFileVo;
  43. import com.ruoyi.zhdd.domain.vo.PlanVo;
  44. import com.ruoyi.zhdd.feign.FeignNoticeInfoService;
  45. import com.ruoyi.zhdd.service.IIncidentProcessService;
  46. import com.ruoyi.zhdd.service.IIncidentService;
  47. import com.ruoyi.zhdd.service.IIncidentTaskService;
  48. import com.ruoyi.zhdd.service.IPlanFileService;
  49. import com.ruoyi.zhdd.service.IPlanService;
  50. import com.ruoyi.zhdd.service.IPlanTaskService;
  51. import com.ruoyi.zhdd.service.IResourceDetailService;
  52. import io.swagger.annotations.Api;
  53. import io.swagger.annotations.ApiOperation;
  54. import lombok.RequiredArgsConstructor;
  55. import lombok.extern.slf4j.Slf4j;
  56. import org.apache.poi.xwpf.usermodel.XWPFDocument;
  57. import org.springframework.beans.factory.annotation.Autowired;
  58. import org.springframework.beans.factory.annotation.Value;
  59. import org.springframework.validation.annotation.Validated;
  60. import org.springframework.web.bind.annotation.*;
  61. import javax.servlet.http.HttpServletRequest;
  62. import javax.servlet.http.HttpServletResponse;
  63. import javax.validation.constraints.NotEmpty;
  64. import javax.validation.constraints.NotNull;
  65. import java.io.File;
  66. import java.io.FileOutputStream;
  67. import java.io.OutputStream;
  68. import java.util.ArrayList;
  69. import java.util.Arrays;
  70. import java.util.Date;
  71. import java.util.HashMap;
  72. import java.util.List;
  73. import java.util.Map;
  74. import java.util.stream.Collectors;
  75. /**
  76. * 事件基础Controller
  77. *
  78. * @author xitong
  79. * @date 2021-09-28
  80. */
  81. @Validated
  82. @Api(value = "事件基础控制器", tags = {"事件基础管理"})
  83. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  84. @RestController
  85. @RequestMapping("/zhdd/incident")
  86. @Slf4j
  87. public class IncidentController extends BaseController {
  88. private final IIncidentService iIncidentService;
  89. private final IIncidentTaskService incidentTaskService;
  90. private final IIncidentProcessService processService;
  91. private final IPlanTaskService planTaskService;
  92. private final IPlanService planService;
  93. private final IPlanFileService planFileService;
  94. private final ISysDictDataService sysDictDataService;
  95. private final FeignNoticeInfoService feignNoticeInfoService;
  96. private final IResourceDetailService resourceDetailService;
  97. private final ISysUserService sysUserService;
  98. private final ISysDeptService sysDeptService;
  99. @Value("${spring.profiles.active}")
  100. private String env;
  101. /**
  102. * 查询事件基础列表
  103. */
  104. @ApiOperation("查询事件基础列表")
  105. // @PreAuthorize("@ss.hasPermi('zhdd:incident:list')")
  106. @GetMapping("/list")
  107. @Security
  108. public TableDataInfo<IncidentVo> list(@Validated(QueryGroup.class) IncidentBo bo) {
  109. if ("app".equals(bo.getQuerySource())) {
  110. bo.setStatus(3);
  111. }
  112. if (StrUtil.isNotBlank(bo.getStatuss())) {
  113. bo.setStatuss(bo.getStatuss().replace("-", ""));
  114. }
  115. return iIncidentService.queryPageList(bo);
  116. }
  117. /**
  118. * 获取事件基础详细信息
  119. */
  120. @ApiOperation("获取事件基础详细信息")
  121. @GetMapping("/{id}")
  122. // @Security
  123. public AjaxResult<Map<String, Object>> getInfo(@NotNull(message = "主键不能为空")
  124. @PathVariable("id") String id) {
  125. Map<String, Object> map = new HashMap<>();
  126. List<PlanFileVo> planFileVos = new ArrayList<>();
  127. IncidentVo incidentVo = iIncidentService.queryById(id);
  128. if (incidentVo == null) {
  129. return AjaxResult.success(map);
  130. }
  131. // 查询上报人、上报组织信息
  132. SysUser sysUser = sysUserService.selectUserByUserName(incidentVo.getCreateBy());
  133. if (sysUser != null) {
  134. incidentVo.setCreateBy(sysUser.getNickName());
  135. }
  136. SysDept sysDept = sysDeptService.selectDeptById(incidentVo.getCreateDept());
  137. if (sysDept != null) {
  138. incidentVo.setCreateDept(sysDept.getDeptName());
  139. }
  140. // 组装主办和协办部门数据树
  141. List<TreeSelect> madinList = new ArrayList<>();
  142. if (StrUtil.isNotBlank(incidentVo.getMadinDept())) {
  143. TreeSelect madin = new TreeSelect();
  144. madin.setId(incidentVo.getMadinDept());
  145. madin.setLabel(incidentVo.getMadinDeptText());
  146. madinList.add(madin);
  147. }
  148. incidentVo.setMadinDeptList(madinList);
  149. List<TreeSelect> assistList = new ArrayList<>();
  150. if (StrUtil.isNotBlank(incidentVo.getAssistDept())) {
  151. for (int i = 0; i < incidentVo.getAssistDept().split(",").length; i++) {
  152. TreeSelect assist = new TreeSelect();
  153. assist.setId(incidentVo.getAssistDept().split(",")[i]);
  154. if (incidentVo.getAssistDept().split(",").length == incidentVo.getAssistDeptText().split(",").length) {
  155. assist.setLabel(incidentVo.getAssistDeptText().split(",")[i]);
  156. }
  157. assistList.add(assist);
  158. }
  159. }
  160. incidentVo.setAssistDeptList(assistList);
  161. map.put("baseInfo", incidentVo);
  162. // 查询所属预案
  163. List<PlanVo> voOne = planService.listVo(Wrappers.<Plan>lambdaQuery().eq(Plan::getType, incidentVo.getType()).eq(Plan::getCreateDept, incidentVo.getPlanDept()));
  164. if (voOne != null && voOne.size() > 0) {
  165. map.put("baseTask", planTaskService.queryPlanTaskByPlanId(voOne.get(0).getId()));
  166. // 查询预案附件
  167. planFileVos = planFileService.listVo(Wrappers.<PlanFile>lambdaQuery().eq(PlanFile::getPlanId, voOne.get(0).getId()));
  168. } else {
  169. map.put("baseTask", null);
  170. }
  171. map.put("planFile", planFileVos);
  172. // 查询处置方案
  173. map.put("task", incidentTaskService.listTaskInfo(id));
  174. List<IncidentProcess> list = processService.list(Wrappers.<IncidentProcess>lambdaQuery()
  175. .eq(IncidentProcess::getIncidentId, id)
  176. // .in(IncidentProcess::getIncidentStatus, 3, 4, 5)
  177. .orderByAsc(IncidentProcess::getCreateTime));
  178. if (!"dev".equals(env)) {
  179. for (IncidentProcess incidentProcess : list) {
  180. if (incidentProcess.getStatus() == 1) {
  181. // 查询阅读情况
  182. JSONObject o = feignNoticeInfoService.messagePushInfoList("1", "2", incidentProcess.getId());
  183. // 解析
  184. if (ObjectUtil.isNotEmpty(o)) {
  185. Integer total = o.getInt("total");
  186. if (total > 0) {
  187. JSONArray jsonArray = JSONUtil.parseObj(o.getJSONArray("rows").get(0)).getJSONArray("messageReadInfoList");
  188. StringBuilder unMessage = new StringBuilder();
  189. StringBuilder message = new StringBuilder();
  190. for (Object o1 : jsonArray) {
  191. JSONObject jsonObject = JSONUtil.parseObj(o1);
  192. if ("0".equals(jsonObject.getStr("readState"))) {
  193. // 未读
  194. unMessage.append(jsonObject.getStr("nickName")).append("、");
  195. } else if ("1".equals(jsonObject.getStr("readState"))) {
  196. // 已读
  197. message.append(jsonObject.getStr("nickName")).append("、");
  198. }
  199. }
  200. // 循环完之后,去除最后一个顿号
  201. incidentProcess.setUserRead(message.toString());
  202. incidentProcess.setUserUnRead(unMessage.toString());
  203. }
  204. }
  205. }
  206. }
  207. }
  208. map.put("process", list);
  209. // 物资使用情况
  210. map.put("resource", resourceDetailService.queryResourceAvailable(id));
  211. return AjaxResult.success(map);
  212. }
  213. /**
  214. * 新增事件基础
  215. */
  216. @ApiOperation("新增事件基础")
  217. // @Log(title = "事件基础", businessType = BusinessType.INSERT)
  218. @RepeatSubmit()
  219. @PostMapping()
  220. @Security
  221. public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody IncidentBo bo) {
  222. // 新增初始化为预警状态
  223. bo.setStatus(2);
  224. LoginUser cacheLoginUser = UserUtil.getCacheLoginUser();
  225. bo.setCreateBy(cacheLoginUser.getUsername());
  226. bo.setCreateDept(cacheLoginUser.getUser().getDeptId());
  227. bo.setExpr1(cacheLoginUser.getUser().getPhonenumber());
  228. String id = iIncidentService.insertByBo(bo);
  229. JSONObject jsonObject = new JSONObject();
  230. jsonObject.set("incidentId", id);
  231. jsonObject.set("userId", cacheLoginUser.getUserId());
  232. jsonObject.set("source", "1");
  233. RedisUtils.publish(Constants.INCIDENT_USER, jsonObject, msg -> {
  234. log.info("保存事件人员关系 => " + msg);
  235. });
  236. return toAjax(true);
  237. }
  238. /**
  239. * 修改事件基础
  240. */
  241. @ApiOperation("修改事件基础")
  242. // @PreAuthorize("@ss.hasPermi('zhdd:incident:edit')")
  243. // @Log(title = "事件基础", businessType = BusinessType.UPDATE)
  244. @RepeatSubmit()
  245. @PutMapping()
  246. @Security
  247. public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody IncidentBo bo) {
  248. return toAjax(iIncidentService.updateByBo(bo) ? 1 : 0);
  249. }
  250. /**
  251. * 删除事件基础
  252. */
  253. @ApiOperation("删除事件基础")
  254. // @PreAuthorize("@ss.hasPermi('zhdd:incident:remove')")
  255. @Log(title = "事件基础", businessType = BusinessType.DELETE)
  256. @DeleteMapping("/{ids}")
  257. public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
  258. @PathVariable String[] ids) {
  259. return toAjax(iIncidentService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
  260. }
  261. @ApiOperation("新增事件方案")
  262. // @Log(title = "事件方案", businessType = BusinessType.INSERT)
  263. @RepeatSubmit()
  264. @PostMapping("/task")
  265. public AjaxResult<Void> addTask(@Validated(AddGroup.class) @RequestBody IncidentTasksBo bo) {
  266. return toAjax(incidentTaskService.insertByBo(bo) ? 1 : 0);
  267. }
  268. @ApiOperation("删除事件方案")
  269. // @Log(title = "事件方案", businessType = BusinessType.DELETE)
  270. @DeleteMapping("/task/{ids}")
  271. public AjaxResult<Void> removeTask(@NotEmpty(message = "主键不能为空")
  272. @PathVariable String[] ids) {
  273. return toAjax(incidentTaskService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
  274. }
  275. @ApiOperation("事件方案发送")
  276. @RepeatSubmit()
  277. @PostMapping("/taskSend")
  278. public AjaxResult<Void> taskSend(@RequestBody IncidentTasksBo bo) {
  279. return toAjax(incidentTaskService.taskSend(bo) ? 1 : 0);
  280. }
  281. @ApiOperation("查询事件-用于首页地图展示")
  282. @GetMapping("/location")
  283. public AjaxResult<Map<String, List<IncidentVo>>> queryIncidentLocation() {
  284. List<IncidentVo> list = iIncidentService.listVo(Wrappers.<Incident>lambdaQuery().in(Incident::getStatus, 1, 2, 3));
  285. Map<Integer, List<IncidentVo>> collect = list.stream().collect(Collectors.groupingBy(IncidentVo::getStatus, Collectors.mapping(a -> a, Collectors.toList())));
  286. Map<String, List<IncidentVo>> result = new HashMap<>();
  287. result.put("预警事件", CollUtil.defaultIfEmpty(collect.get(2), new ArrayList<>()));
  288. // result.put("待派发", CollUtil.defaultIfEmpty(collect.get(2), new ArrayList<>()));
  289. result.put("处置", CollUtil.defaultIfEmpty(collect.get(3), new ArrayList<>()));
  290. return AjaxResult.success(result);
  291. }
  292. @ApiOperation("事件报告导出")
  293. @GetMapping("/download")
  294. public void download(@RequestParam String id, HttpServletRequest request, HttpServletResponse response) {
  295. // id为事件id
  296. Map<String, Object> map = new HashMap<>();
  297. IncidentVo incidentVo = iIncidentService.queryById(id);
  298. if (incidentVo != null) {
  299. map.put("name", incidentVo.getName());
  300. /*if (ObjectUtil.isNotEmpty(incidentVo.getType())) {
  301. map.put("type", sysDictDataService.selectDictLabel("zhdd_plan_type", Convert.toStr(incidentVo.getType())));
  302. } else {
  303. map.put("type", "-");
  304. }*/
  305. map.put("createTime", DateUtil.formatDateTime(incidentVo.getCreateTime()));
  306. map.put("addr", incidentVo.getAddr());
  307. map.put("commanderText", StrUtil.blankToDefault(incidentVo.getCommanderText(), "无"));
  308. map.put("madinDeptText", StrUtil.blankToDefault(incidentVo.getMadinDeptText(), "部门无"));
  309. map.put("assistDeptText", StrUtil.blankToDefault(incidentVo.getAssistDeptText(), "部门无"));
  310. // 解析主办部门和协办部门人员
  311. String madinDeptUser = incidentVo.getMadinDeptUser();
  312. if (StrUtil.isNotBlank(madinDeptUser)) {
  313. List<MessagePushUser> messagePushUsers = JSONUtil.toList(madinDeptUser, MessagePushUser.class);
  314. map.put("madinDeptUser", messagePushUsers.stream().map(MessagePushUser::getNickName).collect(Collectors.joining(",")));
  315. } else {
  316. map.put("madinDeptUser", "人员无");
  317. }
  318. String assistDeptUser = incidentVo.getAssistDeptUser();
  319. if (StrUtil.isNotBlank(assistDeptUser)) {
  320. List<MessagePushUser> messagePushUsers = JSONUtil.toList(assistDeptUser, MessagePushUser.class);
  321. map.put("assistDeptUser", messagePushUsers.stream().map(MessagePushUser::getNickName).collect(Collectors.joining(",")));
  322. } else {
  323. map.put("assistDeptUser", "人员无");
  324. }
  325. map.put("conclusionDeal", StrUtil.blankToDefault(incidentVo.getConclusionDeal(), "无"));
  326. map.put("conclusion", StrUtil.blankToDefault(incidentVo.getConclusion(), "无"));
  327. /*if (StrUtil.isNotBlank(incidentVo.getSource())) {
  328. map.put("source", sysDictDataService.selectDictLabel("zhdd_incident_source", incidentVo.getSource()));
  329. } else {
  330. map.put("source", "-");
  331. }
  332. if (ObjectUtil.isNotEmpty(incidentVo.getLevel())) {
  333. map.put("level", sysDictDataService.selectDictLabel("zhdd_incident_level", Convert.toStr(incidentVo.getLevel())));
  334. } else {
  335. map.put("level", "-");
  336. }*/
  337. // 查询处置方案
  338. List<IncidentTaskVo> incidentTasks = incidentTaskService.listTaskInfo(id);
  339. if (incidentTasks != null && incidentTasks.size() > 0) {
  340. StringBuilder tasks = new StringBuilder();
  341. for (int i = 0; i < incidentTasks.size(); i++) {
  342. tasks.append(i + 1).append("、").append(incidentTasks.get(i).getTaskName()).append("\r");
  343. }
  344. map.put("tasks", tasks.toString());
  345. } else {
  346. map.put("tasks", "无");
  347. }
  348. // 查询处置过程
  349. List<IncidentProcess> incidentProcess = processService.list(Wrappers.<IncidentProcess>lambdaQuery()
  350. .eq(IncidentProcess::getIncidentId, id).orderByAsc(IncidentProcess::getCreateTime));
  351. if (incidentProcess != null && incidentProcess.size() > 0) {
  352. StringBuilder processs = new StringBuilder();
  353. for (int i = 0; i < incidentProcess.size(); i++) {
  354. processs.append(i + 1).append("、").append(incidentProcess.get(i).getDes()).append("\r");
  355. }
  356. map.put("processs", processs.toString());
  357. } else {
  358. map.put("processs", "无");
  359. }
  360. }
  361. String fileName = "incident_" + DateUtil.format(new Date(), "yyyyMMddHHmmss") + ".docx";
  362. try {
  363. XWPFDocument doc = WordExportUtil.exportWord07(
  364. "word/incidentDetail.docx", map);
  365. FileOutputStream fos = new FileOutputStream(ExcelUtil.getAbsoluteFile(fileName));
  366. doc.write(fos);
  367. // 设置强制下载不打开
  368. response.setContentType("application/force-download");
  369. // 设置文件名
  370. response.addHeader("Content-Disposition", "attachment;fileName=" + fileName);
  371. OutputStream out = response.getOutputStream();
  372. doc.write(out);
  373. out.close();
  374. } catch (Exception e) {
  375. e.printStackTrace();
  376. } finally {
  377. delFileWord(ExcelUtil.getAbsoluteFile(fileName));
  378. }
  379. }
  380. @ApiOperation("事件执行日志导出")
  381. @GetMapping("/processDownload")
  382. public void processDownload(@RequestParam String id, HttpServletRequest request, HttpServletResponse response) {
  383. // id为事件id
  384. Map<String, Object> map = new HashMap<>();
  385. IncidentVo incidentVo = iIncidentService.queryById(id);
  386. if (incidentVo != null) {
  387. map.put("name", incidentVo.getName());
  388. // 查询处置过程
  389. List<IncidentProcess> incidentProcess = processService.list(Wrappers.<IncidentProcess>lambdaQuery()
  390. .eq(IncidentProcess::getIncidentId, id).orderByAsc(IncidentProcess::getCreateTime));
  391. for (IncidentProcess process : incidentProcess) {
  392. process.setCreateTimeText(DateUtil.formatDateTime(process.getCreateTime()));
  393. }
  394. map.put("process", incidentProcess);
  395. }
  396. String fileName = "incident_log_" + DateUtil.format(new Date(), "yyyyMMddHHmmss") + ".docx";
  397. try {
  398. XWPFDocument doc = WordExportUtil.exportWord07(
  399. "word/incidentProcess.docx", map);
  400. FileOutputStream fos = new FileOutputStream(ExcelUtil.getAbsoluteFile(fileName));
  401. doc.write(fos);
  402. // 设置强制下载不打开
  403. response.setContentType("application/force-download");
  404. // 设置文件名
  405. response.addHeader("Content-Disposition", "attachment;fileName=" + fileName);
  406. OutputStream out = response.getOutputStream();
  407. doc.write(out);
  408. out.close();
  409. } catch (Exception e) {
  410. e.printStackTrace();
  411. } finally {
  412. delFileWord(ExcelUtil.getAbsoluteFile(fileName));
  413. }
  414. }
  415. @ApiOperation("复制事件应急方案")
  416. @RepeatSubmit()
  417. @PostMapping("/copyTask")
  418. public AjaxResult<Void> copyTask(@RequestBody JSONObject jsonObject) {
  419. String oldId = jsonObject.getStr("oldIncidentId");
  420. String newId = jsonObject.getStr("newIncidentId");
  421. if (StrUtil.hasBlank(oldId, newId)) {
  422. return AjaxResult.error("参数存在空值!");
  423. }
  424. return toAjax(incidentTaskService.copyTask(oldId, newId) ? 1 : 0);
  425. }
  426. @ApiOperation("查询事件处置方案是否办结")
  427. @RepeatSubmit()
  428. @GetMapping("/queryTaskFinish")
  429. public AjaxResult queryTaskFinish(@RequestParam String taskId) {
  430. IncidentTaskVo voOne = incidentTaskService.getVoOne(Wrappers.<IncidentTask>lambdaQuery()
  431. .eq(IncidentTask::getId, taskId)
  432. .in(IncidentTask::getSendFlag, "2", "3")
  433. .eq(IncidentTask::getTaskSend, "1")
  434. .eq(IncidentTask::getBackLogFlag, "0"));
  435. if (voOne != null) {
  436. return AjaxResult.success(true);
  437. } else {
  438. return AjaxResult.success(false);
  439. }
  440. }
  441. @ApiOperation("待办消息办结")
  442. @RepeatSubmit()
  443. @PostMapping("/backLogFinish")
  444. public AjaxResult<Void> backLogFinish(@RequestBody JSONObject jsonObject) {
  445. String id = jsonObject.getStr("taskId");
  446. if (StrUtil.isBlank(id)) {
  447. return AjaxResult.error("参数存在空值!");
  448. }
  449. return toAjax(processService.backLogFinish(id) ? 1 : 0);
  450. }
  451. /**
  452. * 删除零时生成的文件
  453. */
  454. public static void delFileWord(String filePath) {
  455. File file = new File(filePath);
  456. file.delete();
  457. }
  458. }