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