Procházet zdrojové kódy

流程处理进度详情

tags/24080901
CMM před 1 rokem
rodič
revize
fb4929b062
3 změnil soubory, kde provedl 25 přidání a 10 odebrání
  1. +0
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java
  2. +24
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  3. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqToBeProcessedDTO.java

+ 0
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java Zobrazit soubor

@@ -66,7 +66,6 @@ public class TodoCenterController {
@GetMapping("/progress/{instanceId}/{nodeId}")
public ApiResponse<ProcessProgressDetailVo> getProcessDetail(@PathVariable String instanceId,
@PathVariable(required = false) String nodeId) {

return ApiResponse.ofSuccess(todoCenterManage.getProcessDetail(nodeId, instanceId));
}



+ 24
- 9
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Zobrazit soubor

@@ -85,6 +85,7 @@ import org.flowable.task.api.TaskQuery;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.flowable.task.service.history.NativeHistoricTaskInstanceQuery;
import org.flowable.variable.api.history.HistoricVariableInstance;
import org.flowable.variable.api.history.HistoricVariableInstanceQuery;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@@ -137,8 +138,8 @@ public class TodoCenterManage {
// 获取登录用户ID
// long userId = LoginUserUtil.getUserId();

// Long userId = 381496L;
Long userId = 6418616L;
Long userId = 381496L;
// Long userId = 6418616L;
// Long userId = 61769799L;
TaskQuery taskQuery = taskService.createTaskQuery();
taskQuery.active().taskCandidateOrAssigned(String.valueOf(userId)).orderByTaskCreateTime().desc();
@@ -835,13 +836,27 @@ public class TodoCenterManage {
* @return 流程进度及表单详情
*/
public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId) {
HistoricProcessInstance instance =
historyService.createHistoricProcessInstanceQuery().processInstanceId(instanceId).singleResult();
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(instanceId).singleResult();
// 取表单及表单数据
HistoricVariableInstance forms = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_FORMS).singleResult();
List<HistoricVariableInstance> formDatas =
historyService.createHistoricVariableInstanceQuery().processInstanceId(instanceId).list();
.processInstanceId(instanceId)
.variableName(WflowGlobalVarDef.WFLOW_FORMS)
.singleResult();
List<HistoricVariableInstance> formDatas = null;
if (nodeId.equals("undefined")) {
List<HistoricTaskInstance> historicTaskInstances = historyService.createHistoricTaskInstanceQuery().processInstanceId(instanceId).list();
formDatas = historyService
.createHistoricVariableInstanceQuery()
.executionIds(historicTaskInstances.stream().map(HistoricTaskInstance::getExecutionId).collect(Collectors.toSet()))
.processInstanceId(instanceId)
.list();
}else {
formDatas = historyService
.createHistoricVariableInstanceQuery()
.processInstanceId(instanceId)
.list();
}
// 取节点设置
HistoricVariableInstance nodeProps = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult();
@@ -999,8 +1014,8 @@ public class TodoCenterManage {
// 获取登录用户ID
// long userId = LoginUserUtil.getUserId();

Long userId = 381496L;
// Long userId = 6418616L;
// Long userId = 381496L;
Long userId = 6418616L;
// Long userId = 61769799L;

// 自定义sql查询所有已办的任务实例


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ReqToBeProcessedDTO.java Zobrazit soubor

@@ -46,6 +46,7 @@ public class ReqToBeProcessedDTO extends PagePo implements Serializable {
private Integer isSupplement;

@ApiModelProperty("导出选项")
@NotNull(message = "导出选项不能为空")
private List<ExportOptionEnum> exportOptionList;

}

Načítá se…
Zrušit
Uložit