Browse Source

Merge remote-tracking branch 'origin/master'

master
WendyYang 1 year ago
parent
commit
eecad9b38c
3 changed files with 9 additions and 19 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java
  2. +7
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  3. +0
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/AdjustHandleDTO.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java View File

@@ -164,9 +164,9 @@ public class TodoCenterController {
}

@ApiOperation(value = "被退回项目内容调整并通过", notes = "被退回项目内容调整并通过")
@PostMapping
@PostMapping("/adjustAndHandle")
public String startTheProcess(@Validated @RequestBody AdjustHandleDTO dto) {
String instanceId = todoCenterManage.adjustment(dto);
String instanceId = todoCenterManage.adjustmentAndHandle(dto);
return "退回项目内容调整并且重新通过 【" + instanceId + "】 成功";
}
}

+ 7
- 14
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -45,6 +45,7 @@ import com.wflow.contants.HisProInsEndActId;
import com.wflow.exception.BusinessException;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO;
import com.wflow.workflow.bean.process.ProcessComment;
import com.wflow.workflow.bean.process.ProgressNode;
import com.wflow.workflow.bean.process.enums.NodeTypeEnum;
import com.wflow.workflow.bean.vo.ProcessInstanceVo;
@@ -127,20 +128,13 @@ public class TodoCenterManage {
return PageVo.empty();
}

List<HistoricProcessInstance> instances = historyService.createHistoricProcessInstanceQuery()
.list();
Map<String, HistoricProcessInstance> instanceMap = CollUtils.listToMap(instances, HistoricProcessInstance::getId);

List<ResToBeProcessedVO> resVos = projectPage.getRecords().stream().map(d -> {
ResToBeProcessedVO res = new ResToBeProcessedVO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
ProcessTaskVo taskVo = taskVoMap.get(d.getInstCode());
res.setNodeId(taskVo.getTaskDefKey());
if (instanceMap.containsKey(d.getInstCode())) {
res.setProcessStatusName(processInstanceService
.buildProcessStatusStr(instanceMap.get(d.getInstCode())));
}
res.setProcessStatusName(taskVo.getStatus());
res.setProcessLaunchTime(d.getCreateOn());
return res;
}).collect(Collectors.toList());
@@ -628,9 +622,8 @@ public class TodoCenterManage {
return PageVo.empty();
}
List<String> instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList());
List<HistoricProcessInstance> instances = historyService.createHistoricProcessInstanceQuery()
.list();
Map<String, HistoricProcessInstance> instanceMap = CollUtils.listToMap(instances, HistoricProcessInstance::getId);
Map<String, ProcessTaskVo> taskVoMap = userIdoList.stream().collect(Collectors.toMap(ProcessTaskVo::getInstanceId, v -> v));


// 分页查询项目信息
ProjectListReq projectListReq = new ProjectListReq();
@@ -645,7 +638,8 @@ public class TodoCenterManage {
ResToBeProcessedVO res = new ResToBeProcessedVO();
BeanUtils.copyProperties(d, res);
res.setProjectId(d.getId());
res.setProcessStatusName(processInstanceService.buildProcessStatusStr(instanceMap.get(d.getInstCode())));
ProcessTaskVo taskVo = taskVoMap.get(d.getInstCode());
res.setProcessStatusName(taskVo.getStatus());
res.setProcessLaunchTime(d.getCreateOn());
res.setProcessHandleTime(d.getUpdateOn());
return res;
@@ -906,7 +900,7 @@ public class TodoCenterManage {
* @return
*/
@Transactional(rollbackFor = Exception.class)
public String adjustment(AdjustHandleDTO dto) {
public String adjustmentAndHandle(AdjustHandleDTO dto) {
ProjectDTO projectDto = dto.getProjectInfo();
Project projectInfo = projectService.getById(projectDto.getId());

@@ -926,7 +920,6 @@ public class TodoCenterManage {
handlerDTO.setInstanceId(dto.getInstanceId());
handlerDTO.setTaskId(dto.getTaskId());
handlerDTO.setAction(ProcessHandlerEnum.PASS);
handlerDTO.setAuditInfo(dto.getAuditInfo());
handler(handlerDTO);
return dto.getInstanceId();



+ 0
- 3
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/AdjustHandleDTO.java View File

@@ -53,7 +53,4 @@ public class AdjustHandleDTO implements Serializable {
@ApiModelProperty("任务ID")
@NotNull(message = "任务ID不能为空!")
private String taskId;

@ApiModelProperty("审核信息")
private ProcessComment auditInfo;
}

Loading…
Cancel
Save