|
|
@@ -388,26 +388,6 @@ public class TodoCenterManage { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 寻找下一个审核task |
|
|
|
* @param instance |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private String findNextTaskId(HistoricProcessInstance instance,String employeeCode) { |
|
|
|
List<ActivityInstance> userTasks = runtimeService.createActivityInstanceQuery() |
|
|
|
.activityType("userTask") |
|
|
|
.processInstanceId(instance.getId()) |
|
|
|
.taskAssignee(employeeCode) |
|
|
|
.orderByActivityInstanceStartTime() |
|
|
|
.desc() |
|
|
|
.unfinished() |
|
|
|
.list(); |
|
|
|
if(CollUtil.isEmpty(userTasks)){ |
|
|
|
return "处理成功"; |
|
|
|
} |
|
|
|
return userTasks.get(0).getTaskId(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 调用IRS接口,获取盖章后的pdf文件,上传到OSS,并保存文件ID到项目库中 |
|
|
|
* @param req |
|
|
|
* @param declaredProject |
|
|
@@ -1223,4 +1203,45 @@ public class TodoCenterManage { |
|
|
|
} |
|
|
|
return todoNumVo; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 寻找下一个审核task |
|
|
|
* @param instance |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private String findNextTaskId(HistoricProcessInstance instance,String employeeCode) { |
|
|
|
List<ActivityInstance> userTasks = runtimeService.createActivityInstanceQuery() |
|
|
|
.activityType("userTask") |
|
|
|
.processInstanceId(instance.getId()) |
|
|
|
.taskAssignee(employeeCode) |
|
|
|
.orderByActivityInstanceStartTime() |
|
|
|
.asc() |
|
|
|
.unfinished() |
|
|
|
.list(); |
|
|
|
if(CollUtil.isEmpty(userTasks)){ |
|
|
|
return "处理成功"; |
|
|
|
} |
|
|
|
return userTasks.get(0).getTaskId(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 取当前用户的下一个taskId |
|
|
|
* @param instanceId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public String todoTaskId(String instanceId) { |
|
|
|
String employeeCode = LoginUserUtil.loginUserDetail().getEmployeeCode(); |
|
|
|
List<ActivityInstance> userTasks = runtimeService.createActivityInstanceQuery() |
|
|
|
.activityType("userTask") |
|
|
|
.processInstanceId(instanceId) |
|
|
|
.taskAssignee(employeeCode) |
|
|
|
.orderByActivityInstanceStartTime() |
|
|
|
.asc() |
|
|
|
.unfinished() |
|
|
|
.list(); |
|
|
|
if(CollUtil.isEmpty(userTasks)){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
return userTasks.get(0).getTaskId(); |
|
|
|
} |
|
|
|
} |