瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

dzx 2 月之前
父節點
當前提交
f8c3c59e3d

+ 6 - 0
src/main/java/com/xjrsoft/module/workflow/dto/MonitorPageDto.java

@@ -36,4 +36,10 @@ public class MonitorPageDto extends PageInput {
     @ApiModelProperty("流程类型id")
     private String category;
 
+    @ApiModelProperty("流程任务模板名称")
+    private String processSchemaName;
+
+    @ApiModelProperty("流程任务发起人名称")
+    private String startUserName;
+
 }

+ 11 - 1
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -4099,6 +4099,14 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                     .variableValueEquals(WorkflowConstant.PROCESS_SERIAL_NUMBER_KEY, StrUtil.isNumeric(dto.getKeyword()) ? Convert.toLong(dto.getKeyword()) : 0L)
                     .endOr();
         }
+        // 发起人
+        if (StrUtil.isNotBlank(dto.getStartUserName())) {
+            historicProcessInstanceQuery.variableValueLike(WorkflowConstant.PROCESS_START_USER_NAME_KEY, StringPool.PERCENT + dto.getStartUserName() + StringPool.PERCENT);
+        }
+        // 流程任务模板名称
+        if (StrUtil.isNotBlank(dto.getProcessSchemaName())) {
+            historicProcessInstanceQuery.variableValueLike(WorkflowConstant.PROCESS_SCHEMA_NAME_KEY, StringPool.PERCENT + dto.getProcessSchemaName() + StringPool.PERCENT);
+        }
         if (dto.getType() == 1) {
             historicProcessInstanceQuery.finished();
         }
@@ -4162,7 +4170,9 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
         PageOutput<MonitorPageVo> output = new PageOutput<>();
         output.setCurrentPage(dto.getLimit());
         output.setPageSize(dto.getSize());
-        output.setTotal(Convert.toInt(historicProcessInstanceQuery.count()));
+        if (processIds.size() > 0) {
+            output.setTotal(Convert.toInt(historicProcessInstanceQuery.count()));
+        }
         output.setList(result);
         return output;
     }