拆单审核所有流程是否完成

This commit is contained in:
wangliwen 2022-07-21 16:31:22 +08:00
parent 0ac8ef8940
commit 412ef1cc78
1 changed files with 5 additions and 1 deletions

View File

@ -238,7 +238,7 @@ public class TAbilityApplicationController {
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息 put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息
put("resources", resourceDTOS);//申请的该部门的能力资源 put("resources", resourceDTOS);//申请的该部门的能力资源
if (tAbilityApplicationDTOList.get(0).getApproveStatus().equals("通过")) { if (tAbilityApplicationDTOList.get(0).getApproveStatus().contains("通过")) {
put("ended", true); put("ended", true);
} else { } else {
put("ended", false); put("ended", false);
@ -258,6 +258,10 @@ public class TAbilityApplicationController {
return sysDeptDTO.getName(); return sysDeptDTO.getName();
} }
})); }));
tAbilityApplicationV2DTO.setEnded(re.keySet().stream().map(index -> {
List<Map<String, Object>> index_ = re.get(index);
return index_.stream().map(temp -> !(Boolean) temp.get("ended")).findAny().orElse(Boolean.FALSE); // 存在未完成流程
}).filter(index -> index).findAny().orElse(Boolean.FALSE));
tAbilityApplicationV2DTO.setResourceApplication(re); tAbilityApplicationV2DTO.setResourceApplication(re);
return new Result<TAbilityApplicationV2DTO>().ok(tAbilityApplicationV2DTO); return new Result<TAbilityApplicationV2DTO>().ok(tAbilityApplicationV2DTO);
} }