caozixuan 1 год назад
Родитель
Сommit
8ceaafbffc

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

@@ -254,6 +254,7 @@ public class TBDingController {
                         result.setCrmName(tbCrm.getName());
                         result.setCustomId(crmProjectResult.getCustomId());
                         result.setCustomName(crmProjectResult.getCustomName());
+                        result.setCourseName(crmProjectResult.getCourseName());
                         ProductTypeEnum productTypeEnum = crmProjectResult.getCustomType();
                         if (Objects.nonNull(productTypeEnum)) {
                             result.setCustomType(productTypeEnum);

+ 11 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SopInfoResult.java

@@ -50,6 +50,9 @@ public class SopInfoResult implements Serializable {
     @ApiModelProperty(value = "服务单元名称")
     private String serviceName;
 
+    @ApiModelProperty(value = "科目名称")
+    private String courseName;
+
     public Long getServiceId() {
         return serviceId;
     }
@@ -133,4 +136,12 @@ public class SopInfoResult implements Serializable {
     public void setCrmName(String crmName) {
         this.crmName = crmName;
     }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
 }

+ 1 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysDingGroupServiceImpl.java

@@ -77,7 +77,7 @@ public class SysDingGroupServiceImpl extends ServiceImpl<SysDingGroupMapper, Sys
                                 new QueryWrapper<SysDingGroup>().lambda().eq(SysDingGroup::getServiceId, serviceUnitId).eq(SysDingGroup::getSupplierId, supplierId)).stream().map(BaseEntity::getId)
                         .collect(Collectors.toList());
 
-                if (CollectionUtils.isEmpty(sysDingGroupIdList)) {
+                if (CollectionUtils.isNotEmpty(sysDingGroupIdList)) {
                     List<SopRoleTypeEnum> dbSopRoleTypeList = sysDingObjService.list(
                                     new QueryWrapper<SysDingObj>().lambda().eq(SysDingObj::getType, DingObjTypeEnum.DING).in(SysDingObj::getDingGroupId, sysDingGroupIdList)).stream()
                             .map(SysDingObj::getSopRoleType).distinct().collect(Collectors.toList());

+ 1 - 9
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBUserArchivesAllocationServiceImpl.java

@@ -529,12 +529,6 @@ public class TBUserArchivesAllocationServiceImpl
 
     @Override
     public List<UserArchivesDto> findCanChooseArchives(Long crmDetailId, SopRoleTypeEnum sopRoleTypeEnum) {
-        List<TBUserArchivesAllocation> allocatedList = this.list(new QueryWrapper<TBUserArchivesAllocation>().lambda()
-                .eq(TBUserArchivesAllocation::getCrmDetailId, crmDetailId)
-                .eq(TBUserArchivesAllocation::getSopRoleType, sopRoleTypeEnum));
-        List<Long> allocatedIdList = allocatedList.stream().map(TBUserArchivesAllocation::getArchivesId).distinct()
-                .collect(Collectors.toList());
-
         List<Long> datasource = new ArrayList<>();
         switch (sopRoleTypeEnum) {
         case ENGINEER:
@@ -545,9 +539,7 @@ public class TBUserArchivesAllocationServiceImpl
             datasource = tbUserArchivesService.findArchivesSourceByType(RoleTypeEnum.REGION_COORDINATOR).stream().map(ArchivesSourceResult::getArchivesId).distinct().collect(Collectors.toList());
             break;
         }
-
-        List<Long> effectArchivesIdList = datasource.stream().filter(e -> !allocatedIdList.contains(e)).distinct().collect(Collectors.toList());
-
+        List<Long> effectArchivesIdList = datasource.stream().distinct().collect(Collectors.toList());
         List<UserArchivesDto> result = new ArrayList<>();
         for (Long effectArchivesId : effectArchivesIdList) {
             UserArchivesResult tbUserArchivesResult = tbUserArchivesService.findUserArchivesByArchivesIdORUserId(