Просмотр исходного кода

Merge branch 'dev_1.1.1' into dev_1.1.2
merge

wangliang 9 месяцев назад
Родитель
Сommit
c58a99243b

+ 4 - 4
sop-api/src/main/java/com/qmth/sop/server/api/TBDingApplyController.java

@@ -66,13 +66,13 @@ public class TBDingApplyController {
             @ApiParam(value = "异常结束时间") @RequestParam(required = false) Long endTime,
             @ApiParam(value = "申请开始时间") @RequestParam(required = false) Long applyStartTime,
             @ApiParam(value = "申请结束时间") @RequestParam(required = false) Long applyEndTime,
-//            @ApiParam(value = "角色类型") @RequestParam(required = true) RoleTypeEnum roleType,
+            @ApiParam(value = "角色类型") @RequestParam(required = true) RoleTypeEnum roleType,
             @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
             @ApiParam(value = "页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize)
             throws Exception {
         return ResultUtil.ok(
                 tbDingApplyService.flowTaskUnDoneList(new Page<>(pageNumber, pageSize), serviceId, name, supplierId,
-                        customName, startTime, endTime, applyStartTime, applyEndTime, null));
+                        customName, startTime, endTime, applyStartTime, applyEndTime, roleType));
     }
 
     @ApiOperation(value = "考勤异常已审核接口")
@@ -87,13 +87,13 @@ public class TBDingApplyController {
             @ApiParam(value = "异常结束时间") @RequestParam(required = false) Long endTime,
             @ApiParam(value = "申请开始时间") @RequestParam(required = false) Long applyStartTime,
             @ApiParam(value = "申请结束时间") @RequestParam(required = false) Long applyEndTime,
-//            @ApiParam(value = "角色类型") @RequestParam(required = true) RoleTypeEnum roleType,
+            @ApiParam(value = "角色类型") @RequestParam(required = true) RoleTypeEnum roleType,
             @ApiParam(value = "页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
             @ApiParam(value = "页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize)
             throws Exception {
         return ResultUtil.ok(
                 tbDingApplyService.flowTaskDoneList(new Page<>(pageNumber, pageSize), serviceId, name, supplierId,
-                        dingExceptionApprove, customName, startTime, endTime, applyStartTime, applyEndTime, null));
+                        dingExceptionApprove, customName, startTime, endTime, applyStartTime, applyEndTime, roleType));
     }
 
     @ApiOperation(value = "考勤异常审核接口")

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

@@ -183,7 +183,7 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
             }
             supplierId = userSupplierId;
         }
-//        dpr = roleType == RoleTypeEnum.REGION_COORDINATOR ? null : dpr;
+        dpr = roleType == RoleTypeEnum.REGION_COORDINATOR ? null : dpr;
         IPage<DingApplyUnDoneResult> dingApplyUnDoneResultIPage = this.baseMapper.flowTaskUnDoneList(iPage, serviceId,
                 name, supplierId, customName, startTime, endTime, applyStartTime, applyEndTime, dpr);
         if (Objects.nonNull(dingApplyUnDoneResultIPage) && !CollectionUtils.isEmpty(
@@ -258,7 +258,7 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
             }
             supplierId = userSupplierId;
         }
-//        dpr = roleType == RoleTypeEnum.REGION_COORDINATOR ? null : dpr;
+        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);

+ 3 - 3
sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

@@ -146,17 +146,17 @@
                     <otherwise>
                         <choose>
                             <when test="dpr.hasBusiness">
-                                AND tbs.service_lead_id = #{dpr.requestUserId}
+                                AND (tbs.service_lead_id = #{dpr.requestUserId} or AND EXISTS(SELECT 1 FROM t_b_user_archives_allocation tbuaa WHERE tbuaa.crm_detail_id = tbcd.id AND tbuaa.user_id = #{dpr.requestUserId}))
                             </when>
                             <otherwise>
                                 <choose>
                                     <when test="dpr.hasRegionManager">
-                                        AND tbc.lead_id = #{dpr.requestUserId}
+                                        AND (tbc.lead_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_b_user_archives_allocation tbuaa WHERE tbuaa.crm_detail_id = tbcd.id AND tbuaa.user_id = #{dpr.requestUserId}))
                                     </when>
                                     <otherwise>
                                         <choose>
                                             <when test="dpr.hasAccountManager">
-                                                AND tbc.crm_user_id = #{dpr.requestUserId}
+                                                AND (tbc.crm_user_id = #{dpr.requestUserId} or EXISTS(SELECT 1 FROM t_b_user_archives_allocation tbuaa WHERE tbuaa.crm_detail_id = tbcd.id AND tbuaa.user_id = #{dpr.requestUserId}))
                                             </when>
                                             <otherwise>
                                                 AND EXISTS(SELECT 1 FROM t_b_user_archives_allocation tbuaa WHERE tbuaa.crm_detail_id = tbcd.id AND tbuaa.user_id = #{dpr.requestUserId})