Forráskód Böngészése

Merge branch 'dev' of https://git.yingcaibx.com/tl/api into dev

brealinxx 1 éve
szülő
commit
6a7a68cacb

+ 6 - 1
src/main/java/com/xjrsoft/module/workflow/mapper/WorkflowRecordMapper.java

@@ -2,7 +2,11 @@ package com.xjrsoft.module.workflow.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.xjrsoft.module.workflow.entity.WorkflowRecord;
+import com.xjrsoft.module.workflow.vo.TaskCountVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
 
 /**
  * <p>
@@ -14,5 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface WorkflowRecordMapper extends BaseMapper<WorkflowRecord> {
-
+    @Select("select count(*) from xjr_workflow_record where node_id = #{taskId}")
+    Integer getTaskCount(String taskId);
 }

+ 6 - 5
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -3361,6 +3361,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                             .like(WorkflowExtra::getProcessName, dto.getKeyword()))
                     .orderByDesc(WorkflowExtra::getStartTime));
 
+
             for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {
 
                 //找到当前流程的 任务开始时间 最大值  为当前审批节点
@@ -3381,7 +3382,11 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                             vo.setCreateTime(e.getStartTime());
                             vo.setProcessId(e.getProcessId());
                             vo.setProcessName(e.getProcessName());
-
+                            vo.setIsApproval(0);
+                            Integer taskCount = workflowRecordMapper.getTaskCount(e.getTaskId());
+                            if(taskCount > 1){
+                                vo.setIsApproval(1);
+                            }
                             //如果是已经完成的任务 默认是100进度
                             if (ObjectUtil.isNotNull(historicProcessInstance.getEndTime())) {
                                 vo.setCurrentProgress(100);
@@ -3392,10 +3397,6 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
 
                             result.add(vo);
                         });
-
-
-                MyProcessPageVo vo = new MyProcessPageVo();
-
             }
         }
 

+ 4 - 0
src/main/java/com/xjrsoft/module/workflow/vo/MyProcessPageVo.java

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.workflow.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDateTime;
@@ -68,4 +69,7 @@ public class MyProcessPageVo {
      * 时间
      */
     private LocalDateTime createTime;
+
+    @ApiModelProperty("是否已审批(0:否 1:是)")
+    private Integer isApproval;
 }