This commit is contained in:
wangliwen 2022-04-27 18:43:54 +08:00
parent f7eff75ad7
commit afbab8b012
1 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,8 @@ import io.renren.common.page.PageData;
import io.renren.common.service.impl.BaseServiceImpl;
import io.renren.common.utils.MessageUtils;
import io.renren.modules.activiti.dto.TaskDTO;
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
import io.renren.modules.demandComment.service.TDemandCommentService;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
@ -68,6 +70,9 @@ public class ActTaskService extends BaseServiceImpl {
@Autowired
private TResourceMountApplyService tResourceMountApplyService;
@Autowired
private TDemandCommentService tDemandCommentService;
/**
* 根据参数获取当前运行的任务信息
*
@ -113,6 +118,7 @@ public class ActTaskService extends BaseServiceImpl {
TAbilityApplicationDTO abilityApplicationDTO =
tAbilityApplicationService.get(Long.valueOf(dto.getBusinessKey()));
TResourceMountApplyDTO resourceMountApplyDTO = tResourceMountApplyService.get(Long.valueOf(dto.getBusinessKey()));
TDemandCommentDTO demandCommentDTO = tDemandCommentService.get(Long.valueOf(dto.getBusinessKey()));
if (abilityApplicationDTO != null) {
ObjectMapper oMapper = new ObjectMapper();
Map<String, Object> variables = oMapper.convertValue(abilityApplicationDTO, Map.class);
@ -121,6 +127,10 @@ public class ActTaskService extends BaseServiceImpl {
ObjectMapper oMapper = new ObjectMapper();
Map<String, Object> variables = oMapper.convertValue(resourceMountApplyDTO, Map.class);
dto.setParams(variables);
} else if (demandCommentDTO != null) {
ObjectMapper oMapper = new ObjectMapper();
Map<String, Object> variables = oMapper.convertValue(demandCommentDTO, Map.class);
dto.setParams(variables);
}
listDto.add(dto);