提交 53b62827 authored 作者: ljj's avatar ljj 提交者: zhoushaopan

fix:新增检查管理任务状态-已终止

上级 6497a1e9
...@@ -1124,6 +1124,32 @@ public class DeviceCheckController { ...@@ -1124,6 +1124,32 @@ public class DeviceCheckController {
} }
} }
private void finishStat(Integer statId) {
log.info("[核查] 办结任务,被办结的id为:{}", statId);
Task checkTask = taskRepo.findByBillIdAndBusinessType(statId, END.id).get();
// 将该stat任务置为20001,即终止
unionLink(7, statId);
taskService.moveToSpecial(checkTask.parse2Bto(), END);
supplyLogMsg(checkTask);
// 检验所有还没有end的节点
// 1级节点分为两类 自查类节点&统计数据确认节点 以及 检查类节点
List<Task> l1Childs = taskRepo.findAllByParentTaskId(checkTask.getId());
for (Task c1 : l1Childs) {
if (predNodeType(c1).equals(CcNodeType.EXAM) || predNodeType(c1).equals(CcNodeType.CHECK)) {
// c1里的检查节点也shutDown掉 并保存掉
unionLink(7, c1.getBillId());//save
taskService.moveToSpecial(c1.parse2Bto(), END);
supplyLogMsg(c1);
List<Task> c2Childs = taskRepo.findAllByParentTaskId(c1.getId());
c2Childs.forEach(c2 -> shutDownNode(c2));
} else {
shutDownNode(c1);
}
}
}
@ApiOperation(value = "查询还有哪些单位的自查没有完成,给出单位名称") @ApiOperation(value = "查询还有哪些单位的自查没有完成,给出单位名称")
@GetMapping("/stat/shutdown/{statId}") @GetMapping("/stat/shutdown/{statId}")
public ResponseEntity queryNotFinish(@PathVariable Integer statId) { public ResponseEntity queryNotFinish(@PathVariable Integer statId) {
...@@ -1835,7 +1861,7 @@ public class DeviceCheckController { ...@@ -1835,7 +1861,7 @@ public class DeviceCheckController {
TaskBto topNode = taskService.getTopNode(currentTask.getId()); TaskBto topNode = taskService.getTopNode(currentTask.getId());
if (allDetailIsReview(topNode)) { if (allDetailIsReview(topNode)) {
log.info("[核查模块] 该节点树的时候自查节点都已经完结,完结整个节点树,触发的子节点id = {},顶节点id = {}", currentTask.getId(), topNode.getId()); log.info("[核查模块] 该节点树的时候自查节点都已经完结,完结整个节点树,触发的子节点id = {},顶节点id = {}", currentTask.getId(), topNode.getId());
shutDown(topNode.getBillId()); finishStat(topNode.getBillId());
} }
return ResponseEntity.ok(new ResultObj<>("审核通过!")); return ResponseEntity.ok(new ResultObj<>("审核通过!"));
......
...@@ -182,6 +182,14 @@ public class ObjTransUtil { ...@@ -182,6 +182,14 @@ public class ObjTransUtil {
completion = "已终止"; completion = "已终止";
} }
if (fatherTask.getCreateTime().before(new Date(1639966308081L))) {
if (stat.getCheckType() == CheckType.CT_CHECK) {
completion = "核查完成";
} else {
completion = "检查完成";
}
}
} else { } else {
completion = "核查完成待办结"; completion = "核查完成待办结";
...@@ -437,5 +445,6 @@ public class ObjTransUtil { ...@@ -437,5 +445,6 @@ public class ObjTransUtil {
device.getIsPart() device.getIsPart()
); );
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论