Browse Source

删除任务添加判断

gao.qiang 5 months ago
parent
commit
9f4bcc8591

+ 8 - 4
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/service/impl/TaskInfoServiceImpl.java

@@ -287,10 +287,14 @@ public class TaskInfoServiceImpl implements TaskInfoService {
         int count = 0;
         for (TaskInfoVo info : taskInfoVos) {
             TaskInfoEntity byId = taskInfoMapper.getById(info.getTaskId());
-            if (byId.getFlowTaskStatus() > 1) {
-                taskInfoMapper.deleteTask(info.getTaskId());
-                count++;
-            } else {
+            if(ObjectUtils.isNotEmpty(byId.getFlowTaskStatus())) {
+                if (byId.getFlowTaskStatus() > 1) {
+                    taskInfoMapper.deleteTask(info.getTaskId());
+                    count++;
+                } else {
+                    optional.append(byId.getTargetTask() + ",");
+                }
+            }else {
                 optional.append(byId.getTargetTask() + ",");
             }
         }