已办任务支持能力批量申请

This commit is contained in:
wangliwen 2022-07-01 09:50:48 +08:00
parent 31d11b8009
commit 03dee6f380
1 changed files with 15 additions and 7 deletions

View File

@ -135,8 +135,8 @@ public class HistoryController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int")
})
public Result<Page<ProcessActivityDTO>> getDeptHandledInstancePage(@ApiIgnore @RequestParam Map<String, Object> params){
Page<ProcessActivityDTO> page=activitiService.getDeptProcessInstancePage(params);
public Result<Page<ProcessActivityDTO>> getDeptHandledInstancePage(@ApiIgnore @RequestParam Map<String, Object> params) {
Page<ProcessActivityDTO> page = activitiService.getDeptProcessInstancePage(params);
setExtraProcessProperties(page.getRecords());
return new Result().ok(page);
}
@ -153,7 +153,7 @@ public class HistoryController {
return new Result().ok(list);
}
private void setExtraProcessProperties(List<ProcessActivityDTO> list){
private void setExtraProcessProperties(List<ProcessActivityDTO> list) {
for (ProcessActivityDTO activityDTO : list) {
if (StringUtils.isNotEmpty(activityDTO.getStartUserId())) {
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getStartUserId()));
@ -163,12 +163,20 @@ public class HistoryController {
SysUserDTO userDTO = sysUserService.get(Long.valueOf(activityDTO.getAssignee()));
activityDTO.setAssigneeName(userDTO != null ? userDTO.getRealName() : "");
}
TAbilityApplicationDTO abilityApplicationDTO =
abilityApplicationService.get(Long.valueOf(activityDTO.getBusinessKey()));
List<TAbilityApplicationDTO> abilityApplicationDTOS =
abilityApplicationService.getByInstanceId(activityDTO.getProcessInstanceId());
// TAbilityApplicationDTO abilityApplicationDTO =
// abilityApplicationService.get(Long.valueOf(activityDTO.getBusinessKey()));
TResourceMountApplyDTO tResourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(activityDTO.getBusinessKey()));
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(activityDTO.getBusinessKey()));
if (abilityApplicationDTO != null) {
activityDTO.setResourceName(abilityApplicationDTO.getSystem());
if (abilityApplicationDTOS != null && !abilityApplicationDTOS.isEmpty()) {
StringBuffer stringBuffer = new StringBuffer();
abilityApplicationDTOS.stream().map(TAbilityApplicationDTO::getSystem).filter(index -> StringUtils.isNotEmpty(index)).forEach(index -> {
stringBuffer.append(index);
stringBuffer.append(",");
});
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
activityDTO.setResourceName(stringBuffer.toString());
} else if (tResourceMountApplyDTO != null) {
activityDTO.setResourceName(tResourceMountApplyDTO.getResourceDTO().getName());
} else if (tDemandDataDTO != null) {