diff --git a/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java b/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java index c7cd8cf..ddd5e21 100644 --- a/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java @@ -92,6 +92,11 @@ public class CheckServiceImpl extends BaseService implements ICheckService { processService.setTaskVariableByTaskId(task.getId(), "isReport", null); processService.setTaskVariableByTaskId(task.getId(), "isLeader", null); processService.setTaskVariableByTaskId(task.getId(), "lastCheckId", null); + String businessCheckId = task.getBusinessKey().split(":")[1]; + updateCheckIsCompleteInfo(null, checkId, 1); + if (!StringUtils.equals(businessCheckId, checkId)) { + updateCheckIsCompleteInfo(null, businessCheckId, 1); + } } else { LOG.debug("领导检查处理失败,交由上级领导处理"); processService.setTaskVariableByTaskId(task.getId(), "isLeader", 1); @@ -163,7 +168,7 @@ public class CheckServiceImpl extends BaseService implements ICheckService { if (isCoordination == 1) { saveHiddenDangerReport(token, checkVO, checkId, oldCheckId, userId, task, params); } else { - setLeaderCheck(userId, checkId, oldCheckId, task, params); + setLeaderCheck(token, userId, checkId, oldCheckId, task, params); } processService.saveTaskCompleteByTaskId(task.getId(), params); } @@ -220,11 +225,11 @@ public class CheckServiceImpl extends BaseService implements ICheckService { * * @param userId * @param checkId - * @param newCheckId + * @param oldCheckId * @param task * @param params */ - private void setLeaderCheck(String userId, String checkId, String newCheckId, Task task, Map params) { + private void setLeaderCheck(String token, String userId, String checkId, String oldCheckId, Task task, Map params) { LOG.debug("1.isCoordination:2, 不配合"); String leaderUserId = getLeaderId(userId, 1); params.put("leader", leaderUserId); @@ -233,6 +238,12 @@ public class CheckServiceImpl extends BaseService implements ICheckService { processService.setTaskVariableByTaskId(task.getId(), "isReport", null); LOG.debug("2.标记上一次的检查项"); processService.setTaskVariableByTaskId(task.getId(), "lastCheckId", checkId); + // 业务ID + String businessCheckId = task.getBusinessKey().split(":")[1]; + if (oldCheckId != null && !StringUtils.equals(businessCheckId, oldCheckId)) { + LOG.debug("3.标记复查为完成状态"); + updateCheckIsCompleteInfo(token, oldCheckId, 1); + } } /** diff --git a/src/main/java/com/cm/inspection/service/process/IProcessService.java b/src/main/java/com/cm/inspection/service/process/IProcessService.java index 9ca34e9..0b8737b 100644 --- a/src/main/java/com/cm/inspection/service/process/IProcessService.java +++ b/src/main/java/com/cm/inspection/service/process/IProcessService.java @@ -263,4 +263,25 @@ public interface IProcessService { */ List listHistoricTaskInstance(); + /** + * 激活任务 + * + * @param processId + */ + void activeTaskByProcessId(String processId); + + /** + * 挂起任务 + * + * @param processId + */ + void suspendTaskByProcessId(String processId); + + /** + * 删除任务 + * + * @param processId + */ + void deleteTaskByProcessId(String processId); + } \ No newline at end of file diff --git a/src/main/java/com/cm/inspection/service/process/impl/ProcessServiceImpl.java b/src/main/java/com/cm/inspection/service/process/impl/ProcessServiceImpl.java index 3a16680..917f487 100644 --- a/src/main/java/com/cm/inspection/service/process/impl/ProcessServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/process/impl/ProcessServiceImpl.java @@ -234,5 +234,20 @@ public class ProcessServiceImpl implements IProcessService { return historyService.createHistoricTaskInstanceQuery().list(); } + @Override + public void activeTaskByProcessId(String processId) { + runtimeService.activateProcessInstanceById(processId); + } + + @Override + public void suspendTaskByProcessId(String processId) { + runtimeService.suspendProcessInstanceById(processId); + } + + @Override + public void deleteTaskByProcessId(String processId) { + runtimeService.deleteProcessInstance(processId, "结束"); + } + } diff --git a/src/main/resources/static/route/check/list-check-admin.html b/src/main/resources/static/route/check/list-check-admin.html deleted file mode 100644 index 1efd3eb..0000000 --- a/src/main/resources/static/route/check/list-check-admin.html +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - -
-
-
-
-
-
-
- -
- -
-
- - -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/static/route/check/list-check-mine.html b/src/main/resources/static/route/check/list-check-mine.html index 124beb1..68ab28c 100644 --- a/src/main/resources/static/route/check/list-check-mine.html +++ b/src/main/resources/static/route/check/list-check-mine.html @@ -281,7 +281,7 @@ area: ['100%', '100%'], shadeClose: true, anim: 2, - content: top.restAjax.path('route/check/update-check-mine.html?checkId={checkId}', [data.checkId]), + content: top.restAjax.path('route/check/save-recheck-mine.html?checkId={checkId}', [data.checkId]), end: function() { reloadTable(); } diff --git a/src/main/resources/static/route/check/list-inspect-mine.html b/src/main/resources/static/route/check/list-inspect-mine.html index fac47ab..ef1cb79 100644 --- a/src/main/resources/static/route/check/list-inspect-mine.html +++ b/src/main/resources/static/route/check/list-inspect-mine.html @@ -273,13 +273,31 @@ $(document).on('click', '#search', function() { reloadTable(1); }); + // 执行检查 + function inspect(msg, checkId, type) { + top.dialog.confirm(msg, function(index) { + top.dialog.close(index); + var loadLayerIndex; + top.restAjax.post(top.restAjax.path('api/check/saveinspect/{checkId}', [checkId]), { + type: type + }, null, function(code, data) { + reloadTable(); + }, function(code, data) { + top.dialog.msg(data.msg); + }, function() { + loadLayerIndex = top.dialog.msg('提交中...', {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); + }); + }); + } table.on('tool(dataTable)', function(obj) { var layEvent = obj.event; var data = obj.data; if(layEvent === 'handleEvent') { - + inspect('确定处理完毕?', data.checkId, 1); } else if(layEvent === 'leaderEvent') { - + inspect('确定上级处理?', data.checkId, 2); } }); }); diff --git a/src/main/resources/static/route/check/save-recheck-mine.html b/src/main/resources/static/route/check/save-recheck-mine.html new file mode 100644 index 0000000..9349eb7 --- /dev/null +++ b/src/main/resources/static/route/check/save-recheck-mine.html @@ -0,0 +1,359 @@ + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/resources/static/route/check/update-check.html b/src/main/resources/static/route/check/update-check.html deleted file mode 100644 index b70ed7a..0000000 --- a/src/main/resources/static/route/check/update-check.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - -
-
- -
-
-
- -
- -
-
- -
- -
-
-
- -
- - -
-
-
-
- -
-
-
-
-
-
- - - - \ No newline at end of file