This commit is contained in:
wangliwen 2022-05-20 11:05:35 +08:00
parent 6423f22b42
commit 46851b85f9
1 changed files with 10 additions and 4 deletions

View File

@ -127,33 +127,39 @@ public class ActTaskService extends BaseServiceImpl {
TaskDTO dto = new TaskDTO();
this.convertTaskInfo(task, dto);
ObjectMapper oMapper = new ObjectMapper();
Map<String, Object> processVariable = task.getProcessVariables();
processVariable.putAll(task.getProcessVariables());
TAbilityApplicationDTO abilityApplicationDTO =
tAbilityApplicationService.get(Long.valueOf(dto.getBusinessKey()));
if (abilityApplicationDTO != null) {
Map<String, Object> variables = oMapper.convertValue(abilityApplicationDTO, Map.class);
dto.setParams(variables);
processVariable.putAll(variables);
dto.setParams(processVariable);
listDto.add(dto);
continue;
}
TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(dto.getBusinessKey()));
if (resourceMountApplyDTO != null) {
Map<String, Object> variables = oMapper.convertValue(resourceMountApplyDTO, Map.class);
dto.setParams(variables);
processVariable.putAll(variables);
dto.setParams(processVariable);
listDto.add(dto);
continue;
}
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey()));
if (tDemandDataDTO != null) {
Map<String, Object> variables = oMapper.convertValue(tDemandDataDTO, Map.class);
dto.setParams(variables);
processVariable.putAll(variables);
dto.setParams(processVariable);
listDto.add(dto);
continue;
}
ResourceDTO resourceDTO = resourceService.get(Long.valueOf(dto.getBusinessKey()));
if (resourceDTO != null) {
Map<String, Object> variables = oMapper.convertValue(resourceDTO, Map.class);
dto.setParams(variables);
processVariable.putAll(variables);
dto.setParams(processVariable);
listDto.add(dto);
continue;
}