wangliang hai 9 meses
pai
achega
89ccc3fd5e

+ 13 - 2
sop-business/src/main/java/com/qmth/sop/business/mapper/TBDingApplyMapper.java

@@ -32,9 +32,14 @@ public interface TBDingApplyMapper extends BaseMapper<TBDingApply> {
      * @param endTime
      * @param applyStartTime
      * @param applyEndTime
+     * @param roleTypeEnum
      * @return
      */
-    IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, @Param("serviceId") Long serviceId, @Param("name") String name, @Param("supplierId") Long supplierId, @Param("customName") String customName, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("applyStartTime") Long applyStartTime, @Param("applyEndTime") Long applyEndTime, @Param("dpr") DataPermissionDto dpr);
+    IPage<DingApplyUnDoneResult> flowTaskUnDoneList(IPage<Map> iPage, @Param("serviceId") Long serviceId,
+            @Param("name") String name, @Param("supplierId") Long supplierId, @Param("customName") String customName,
+            @Param("startTime") Long startTime, @Param("endTime") Long endTime,
+            @Param("applyStartTime") Long applyStartTime, @Param("applyEndTime") Long applyEndTime,
+            @Param("dpr") DataPermissionDto dpr, @Param("roleTypeEnum") String roleTypeEnum);
 
     /**
      * 异常已审核接口
@@ -49,7 +54,13 @@ public interface TBDingApplyMapper extends BaseMapper<TBDingApply> {
      * @param endTime
      * @param applyStartTime
      * @param applyEndTime
+     * @param roleTypeEnum
      * @return
      */
-    IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, @Param("serviceId") Long serviceId, @Param("name") String name, @Param("supplierId") Long supplierId, @Param("dingExceptionApprove") String dingExceptionApprove, @Param("customName") String customName, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("applyStartTime") Long applyStartTime, @Param("applyEndTime") Long applyEndTime, @Param("dpr") DataPermissionDto dpr);
+    IPage<DingApplyDoneResult> flowTaskDoneList(IPage<Map> iPage, @Param("serviceId") Long serviceId,
+            @Param("name") String name, @Param("supplierId") Long supplierId,
+            @Param("dingExceptionApprove") String dingExceptionApprove, @Param("customName") String customName,
+            @Param("startTime") Long startTime, @Param("endTime") Long endTime,
+            @Param("applyStartTime") Long applyStartTime, @Param("applyEndTime") Long applyEndTime,
+            @Param("dpr") DataPermissionDto dpr, @Param("roleTypeEnum") String roleTypeEnum);
 }

+ 4 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingApplyServiceImpl.java

@@ -185,7 +185,8 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
         }
         dpr = roleType == RoleTypeEnum.REGION_COORDINATOR ? null : dpr;
         IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, serviceId,
-                name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime, dpr);
+                name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime, dpr,
+                Objects.nonNull(roleType) ? roleType.name() : null);
         if (Objects.nonNull(dingApplyUnDoneResultIPage) && !CollectionUtils.isEmpty(
                 dingApplyUnDoneResultIPage.getRecords())) {
             for (DingApplyUnDoneResult d : dingApplyUnDoneResultIPage.getRecords()) {
@@ -261,7 +262,8 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
         dpr = roleType == RoleTypeEnum.REGION_COORDINATOR ? null : dpr;
         IPage<DingApplyDoneResult> dingApplyDoneResultIPage = this.baseMapper.flowTaskDoneList(iPage, serviceId, name,
                 supplierId, Objects.nonNull(dingExceptionApprove) ? dingExceptionApprove.name() : null, customName,
-                startTime, endTime, applyStartTime, applyEndTime, dpr);
+                startTime, endTime, applyStartTime, applyEndTime, dpr,
+                Objects.nonNull(roleType) ? roleType.name() : null);
         if (Objects.nonNull(dingApplyDoneResultIPage) && !CollectionUtils.isEmpty(
                 dingApplyDoneResultIPage.getRecords())) {
             for (DingApplyDoneResult d : dingApplyDoneResultIPage.getRecords()) {

+ 20 - 0
sop-business/src/main/resources/mapper/TBDingApplyMapper.xml

@@ -92,6 +92,16 @@
             <if test="applyStartTime != null and applyStartTime != '' and applyEndTime != null and applyEndTime != ''">
                 and (tbda.create_time <![CDATA[ >= ]]> #{applyStartTime} and tbda.create_time <![CDATA[ <= ]]> #{applyEndTime})
             </if>
+            <if test="roleTypeEnum != null and roleTypeEnum != ''">
+                <choose>
+                    <when test="roleTypeEnum=='REGION_COORDINATOR'">
+                        AND tbda.sop_no is null
+                    </when>
+                    <otherwise>
+                        AND tbda.sop_no is not null
+                    </otherwise>
+                </choose>
+            </if>
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
                 <choose>
                     <when test="dpr.hasBusiness">
@@ -215,6 +225,16 @@
             <if test="applyStartTime != null and applyStartTime != '' and applyEndTime != null and applyEndTime != ''">
                 and (tbda.create_time <![CDATA[ >= ]]> #{applyStartTime} and tbda.create_time <![CDATA[ <= ]]> #{applyEndTime})
             </if>
+            <if test="roleTypeEnum != null and roleTypeEnum != ''">
+                <choose>
+                    <when test="roleTypeEnum=='REGION_COORDINATOR'">
+                        AND tbda.sop_no is null
+                    </when>
+                    <otherwise>
+                        AND tbda.sop_no is not null
+                    </otherwise>
+                </choose>
+            </if>
             <if test="dpr != null and !dpr.hasAdmin and !dpr.hasPmo">
                 <choose>
                     <when test="dpr.hasBusiness">