wangliang 3 жил өмнө
parent
commit
5dcb36e653

+ 12 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/TFFlowMapper.java

@@ -41,6 +41,18 @@ public interface TFFlowMapper extends BaseMapper<TFFlow> {
      */
     IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, @Param("status") String status, @Param("startName") String startName, @Param("createStartTime") Long createStartTime, @Param("createEndTime") Long createEndTime, @Param("schoolId") Long schoolId, @Param("orgId") Long orgId, @Param("flowId") Long flowId);
 
+    /**
+     * 流程审批记录找人列表
+     *
+     * @param iPage
+     * @param startName
+     * @param schoolId
+     * @param orgId
+     * @param flowId
+     * @return
+     */
+    IPage<FlowApproveResult> flowApproveUserList(IPage<Map> iPage, @Param("startName") String startName, @Param("schoolId") Long schoolId, @Param("orgId") Long orgId, @Param("flowId") Long flowId);
+
     /**
      * 根据key查找id
      *

+ 12 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TFFlowService.java

@@ -40,6 +40,18 @@ public interface TFFlowService extends IService<TFFlow> {
      */
     public IPage<FlowApproveResult> flowApproveList(IPage<Map> iPage, String status, String startName, Long createStartTime, Long createEndTime, Long schoolId, Long orgId, Long flowId);
 
+    /**
+     * 流程审批记录找人列表
+     *
+     * @param iPage
+     * @param startName
+     * @param schoolId
+     * @param orgId
+     * @param flowId
+     * @return
+     */
+    public IPage<FlowApproveResult> flowApproveUserList(IPage<Map> iPage, String startName, Long schoolId, Long orgId, Long flowId);
+
     /**
      * 根据key查找流程
      *

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java

@@ -487,7 +487,7 @@ public class ActivitiServiceImpl implements ActivitiService {
 
             ExamTask examTask = examTaskService.findByFlowId(flowTaskApprovePeopleAllResult.getFlowId());
 
-            IPage<FlowApproveResult> flowApproveResultIPage = tfFlowService.flowApproveList(new Page<>(SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE), null, null, null, null, SystemConstant.getHeadOrUserSchoolId(), null, flowTaskApprovePeopleAllResult.getFlowId());
+            IPage<FlowApproveResult> flowApproveResultIPage = tfFlowService.flowApproveUserList(new Page<>(SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE), null, SystemConstant.getHeadOrUserSchoolId(), null, flowTaskApprovePeopleAllResult.getFlowId());
             FlowApproveResult flowApproveResult = null;
             if (Objects.nonNull(flowApproveResultIPage) && flowApproveResultIPage.getRecords().size() > 0) {
                 flowApproveResult = flowApproveResultIPage.getRecords().get(0);

+ 15 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TFFlowServiceImpl.java

@@ -100,6 +100,21 @@ public class TFFlowServiceImpl extends ServiceImpl<TFFlowMapper, TFFlow> impleme
         return flowApproveResultIPage;
     }
 
+    /**
+     * 流程审批记录找人列表
+     *
+     * @param iPage
+     * @param startName
+     * @param schoolId
+     * @param orgId
+     * @param flowId
+     * @return
+     */
+    @Override
+    public IPage<FlowApproveResult> flowApproveUserList(IPage<Map> iPage, String startName, Long schoolId, Long orgId, Long flowId) {
+        return tfFlowMapper.flowApproveUserList(iPage, startName, schoolId, orgId, flowId);
+    }
+
     /**
      * 根据key查找流程
      *

+ 70 - 0
distributed-print-business/src/main/resources/mapper/TFFlowMapper.xml

@@ -62,6 +62,76 @@
             tffal.create_time desc
     </select>
 
+    <select id="flowApproveUserList" resultType="com.qmth.distributed.print.business.bean.result.FlowApproveResult">
+        select
+        tffal.flow_id as flowId,
+        tffal.task_id as taskId,
+        tffal.start_id as startId,
+        su.real_name as startName,
+        tffal.create_time as createTime,
+        tffal.primary_approve_id as primaryApproveId,
+        (
+        select
+        t.real_name
+        from
+        sys_user t
+        where
+        t.id = tffal.primary_approve_id) as primaryApproveName,
+        tffal.primary_approve_remark as primaryApproveRemark,
+        tffal.second_approve_id as secondApproveId,
+        (
+        select
+        t.real_name
+        from
+        sys_user t
+        where
+        t.id = tffal.second_approve_id) as secondApproveName,
+        tffal.second_approve_remark as secondApproveRemark,
+        tffal.three_approve_id as threeApproveId,
+        tffal.three_approve_remark as threeApproveRemark,
+        (
+        select
+        t.real_name
+        from
+        sys_user t
+        where
+        t.id = tffal.three_approve_id) as threeApproveName,
+        tffal.four_approve_id as fourApproveId,
+        tffal.four_approve_remark as fourApproveRemark,
+        (
+        select
+        t.real_name
+        from
+        sys_user t
+        where
+        t.id = tffal.four_approve_id) as fourApproveName,
+        tffa.status
+        from
+        t_f_flow_approve_log tffal
+        left join t_f_flow_approve tffa on tffa.flow_id = tffal.flow_id
+        left join sys_user su on su.id = tffal.start_id
+        <where>
+            <if test="startName != null and startName != ''">
+                and su.real_name like concat('%',#{startName},'%')
+            </if>
+            <if test="schoolId != null and schoolId != ''">
+                and tffal.school_id = #{schoolId}
+            </if>
+            <!--            <if test="orgId != null and orgId != ''">-->
+            <!--                and tffal.org_id = #{orgId}-->
+            <!--            </if>-->
+            <if test="flowId != null and flowId != ''">
+                and EXISTS(
+                select tetf.exam_task_id from t_exam_task_flow tetf
+                where tetf.flow_id = #{flowId} and tetf.exam_task_id = tffal.task_id
+                )
+            </if>
+            and tffal.enable = 1
+        </where>
+        order by
+        tffal.create_time desc
+    </select>
+
     <select id="findActIdByFlowKey" resultType="java.lang.String">
         select max(arp.ID_) as actFlowId from act_re_procdef arp where arp.KEY_ = #{flowKey} order by arp.VERSION_ desc LIMIT 1
     </select>