wangliang 9 tháng trước cách đây
mục cha
commit
79950d64d2

+ 0 - 1
sop-api/src/main/java/com/qmth/sop/server/api/TBCrmController.java

@@ -65,7 +65,6 @@ public class TBCrmController {
             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
         IPage<TBCrmResult> resultIPage = tBCrmService.query(new Page<>(pageNumber, pageSize), serviceId, isBind, leadId,
                 crmUserId, type, custom, crmNo, startTime, endTime);
-
         return ResultUtil.ok(resultIPage);
     }
 

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

@@ -15,7 +15,6 @@ import com.qmth.sop.business.bean.result.*;
 import com.qmth.sop.business.entity.*;
 import com.qmth.sop.business.mapper.TBDingApplyMapper;
 import com.qmth.sop.business.service.*;
-import com.qmth.sop.common.contant.SpringContextHolder;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.*;
 import com.qmth.sop.common.util.DateDisposeUtils;
@@ -110,12 +109,12 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         TBDing tbDing = tbDingService.getById(tbDingApply.getDingId());
         String sopNo = Objects.nonNull(tbDing) ? tbDing.getSopNo() : tbDingApply.getSopNo();
-        if (sopNo.equals("undefined")){
+        if (sopNo.equals("undefined")) {
             // TODO: 2024/9/11 前端改
             sopNo = null;
         }
         String crmNo = Objects.nonNull(tbDing) ? tbDing.getCrmNo() : tbDingApply.getCrmNo();
-        if (!SystemConstant.strNotNull(crmNo)){
+        if (!SystemConstant.strNotNull(crmNo)) {
             crmNo = "-1";
         }
         Long serviceId = Objects.nonNull(tbDing) ? tbDing.getServiceId() : tbDingApply.getServiceId();
@@ -125,7 +124,7 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
             throw ExceptionResultEnum.ERROR.exception("该用户剩余补卡次数为0");
         }
         List<String> approveUserIds = new ArrayList<>();
-        if (SystemConstant.strNotNull(sopNo)){
+        if (SystemConstant.strNotNull(sopNo)) {
             List<String> sysUserRoleList = sysUserRoleService.listByServiceId(serviceId, sysUser.getId(), sopNo);
             approveUserIds.addAll(sysUserRoleList);
         } else {
@@ -300,7 +299,6 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
             throws InterruptedException {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         userId = Objects.nonNull(sysUser) ? sysUser.getId() : userId;
-        TBDingApplyService tbDingApplyService = SpringContextHolder.getBean(TBDingApplyService.class);
         return tbDingApplyService.taskApprove(taskId, userId, dingExceptionApprove);
     }
 
@@ -412,7 +410,6 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
             throws InterruptedException {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         userId = Objects.nonNull(sysUser) ? sysUser.getId() : userId;
-        TBDingApplyService tbDingApplyService = SpringContextHolder.getBean(TBDingApplyService.class);
         for (Long l : taskIds) {
             tbDingApplyService.taskApprove(l, userId, dingExceptionApprove);
         }
@@ -469,8 +466,6 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
         activitiService.taskApprove(
                 new FlowApproveParam(taskId, FlowApprovePassEnum.PASS, approveUserIds, tfCustomFlowEntity.getCrmNo(),
                         dingExceptionApprove.getTitle()));
-
-        TBDingApplyService tbDingApplyService = SpringContextHolder.getBean(TBDingApplyService.class);
         return tbDingApplyService.updateDingExceptionTime(tbDingApply, dingExceptionApprove);
     }
 
@@ -554,11 +549,16 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
     @Override
     public List<SearchResult> findRegionCoordinatorAuditor(Long serviceId, Long userId) {
         List<SearchResult> result = new ArrayList<>();
-        List<TBUserArchivesAllocation> tbUserArchivesAllocationList = tbUserArchivesAllocationService.list(new QueryWrapper<TBUserArchivesAllocation>().lambda()
-                .eq(TBUserArchivesAllocation::getServiceId, serviceId).eq(TBUserArchivesAllocation::getUserId, userId).eq(TBUserArchivesAllocation::getSopRoleType, SopRoleTypeEnum.REGION_COORDINATOR));
-        List<String> crmNoList = tbUserArchivesAllocationList.stream().map(TBUserArchivesAllocation::getCrmNo).distinct().collect(Collectors.toList());
+        List<TBUserArchivesAllocation> tbUserArchivesAllocationList = tbUserArchivesAllocationService.list(
+                new QueryWrapper<TBUserArchivesAllocation>().lambda()
+                        .eq(TBUserArchivesAllocation::getServiceId, serviceId)
+                        .eq(TBUserArchivesAllocation::getUserId, userId)
+                        .eq(TBUserArchivesAllocation::getSopRoleType, SopRoleTypeEnum.REGION_COORDINATOR));
+        List<String> crmNoList = tbUserArchivesAllocationList.stream().map(TBUserArchivesAllocation::getCrmNo)
+                .distinct().collect(Collectors.toList());
         if (!CollectionUtils.isEmpty(crmNoList)) {
-            List<TBCrm> tbCrmList = tbCrmService.list(new QueryWrapper<TBCrm>().lambda().in(TBCrm::getCrmNo, crmNoList));
+            List<TBCrm> tbCrmList = tbCrmService.list(
+                    new QueryWrapper<TBCrm>().lambda().in(TBCrm::getCrmNo, crmNoList));
             List<Long> leaderIdList = tbCrmList.stream().map(TBCrm::getLeadId).distinct().collect(Collectors.toList());
             if (!CollectionUtils.isEmpty(leaderIdList)) {
                 result = sysUserService.listByIds(leaderIdList).stream().flatMap(e -> {