Pārlūkot izejas kodu

草稿箱开始开发

tags/24080901
PoffyZhang pirms 1 gada
vecāks
revīzija
6eded54c1f
1 mainītis faili ar 9 papildinājumiem un 9 dzēšanām
  1. +9
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 9
- 9
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Parādīt failu

@@ -28,7 +28,7 @@ import com.wflow.bean.entity.WflowModelHistorys;
import com.wflow.mapper.WflowCcTasksMapper;
import com.wflow.mapper.WflowModelHistorysMapper;
import com.wflow.service.OrgRepositoryService;
import com.wflow.workflow.bean.dto.ProcessInstanceOwnerDto;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import com.wflow.workflow.bean.process.OrgUser;
import com.wflow.workflow.bean.process.ProcessNode;
import com.wflow.workflow.bean.process.enums.ApprovalModeEnum;
@@ -109,9 +109,9 @@ public class TodoCenterManage {
.processDefinitionId(task.getProcessDefinitionId())
.singleResult();
//从缓存取
ProcessInstanceOwnerDto owner = runtimeService.getVariable(task.getExecutionId(), "owner", ProcessInstanceOwnerDto.class);
ProcessInstanceUserDto owner = runtimeService.getVariable(task.getExecutionId(), "owner", ProcessInstanceUserDto.class);
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).singleResult();
staterUsers.add(owner.getOwner());
staterUsers.add(owner.getUserId());
ProcessTaskVo processTaskVo = ProcessTaskVo.builder()
.taskId(task.getId())
.taskName(task.getName())
@@ -124,16 +124,16 @@ public class TodoCenterManage {
.version(processDef.getVersion())
.instanceId(instanceId)
.ownerId(processInstance.getStartUserId())
.ownerDeptId(owner.getOwnerDeptId())
.ownerDeptName(owner.getOwnerDeptName())
.ownerDeptId(owner.getOrgCode())
.ownerDeptName(owner.getOrgName())
.createTime(processInstance.getStartTime())
.taskCreateTime(task.getCreateTime())
.build();
res.setProcessTaskInfo(processTaskVo);
String projectName = (String) formData.get(ProjectDeclareConstants.BasicInformation.PROJECT_NAME);
res.setProjectName(projectName);
res.setReportUnitId(owner.getOwnerDeptId());
res.setReportUnitName(owner.getOwnerDeptName());
res.setReportUnitId(owner.getOrgCode());
res.setReportUnitName(owner.getOrgName());
res.setReportAmount((Integer) formData.get(ProjectDeclareConstants.FundDeclareInfo.DECLARE_AMOUNT));
res.setBudgetYear((Integer) formData.get(ProjectDeclareConstants.BasicInformation.BUDGET_YEAR));
res.setProcessStatus(ProcessStatusEnum.getCodeByDesc(status));
@@ -360,7 +360,7 @@ public class TodoCenterManage {
Map<String, Object> formData = formDatas.stream().collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue));
HistoricVariableInstance variableInstance = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(instanceId).variableName("owner").singleResult();
ProcessInstanceOwnerDto owner = (ProcessInstanceOwnerDto) variableInstance.getValue();
ProcessInstanceUserDto owner = (ProcessInstanceUserDto) variableInstance.getValue();
ProcessProgressDetailVo res = ProcessProgressDetailVo.builder()
.instanceId(instanceId)
.version(instance.getProcessDefinitionVersion())
@@ -368,7 +368,7 @@ public class TodoCenterManage {
.formData(formData)
.processDefName(instance.getProcessDefinitionName())
.staterUser(startUser)
.starterDept(null == owner ? null : owner.getOwnerDeptName())
.starterDept(null == owner ? null : owner.getOrgCode())
.result(instance.getEndActivityId())
.startTime(instance.getStartTime())
.progress(taskRecords)


Notiek ielāde…
Atcelt
Saglabāt