|
@@ -6,14 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.qmth.sop.business.bean.dto.UserArchivesImportDto;
|
|
|
import com.qmth.sop.business.bean.params.UserArchivesParam;
|
|
|
-import com.qmth.sop.business.bean.result.ArchivesSourceResult;
|
|
|
-import com.qmth.sop.business.bean.result.RoleResult;
|
|
|
-import com.qmth.sop.business.bean.result.UserArchivesResult;
|
|
|
-import com.qmth.sop.business.bean.result.UserArchivesSubTotalResult;
|
|
|
+import com.qmth.sop.business.bean.result.*;
|
|
|
import com.qmth.sop.business.entity.*;
|
|
|
import com.qmth.sop.business.mapper.TBUserArchivesMapper;
|
|
|
import com.qmth.sop.business.service.*;
|
|
|
-import com.qmth.sop.common.base.BaseEntity;
|
|
|
import com.qmth.sop.common.contant.SystemConstant;
|
|
|
import com.qmth.sop.common.enums.*;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
@@ -282,26 +278,26 @@ public class TBUserArchivesServiceImpl extends ServiceImpl<TBUserArchivesMapper,
|
|
|
result.setInvalidCount(inValidCount);
|
|
|
|
|
|
List<Long> userIdList = validList.stream().map(UserArchivesResult::getUserId).distinct().collect(Collectors.toList());
|
|
|
- List<SysUser> effectEngineer = sysUserService.findUserListByRoleType(RoleTypeEnum.EFFECT_ENGINEER);
|
|
|
- Integer effectEngineerCount = 0;
|
|
|
+ List<SysUserBriefResult> effectEngineer = sysUserService.findUserListByRoleType(RoleTypeEnum.EFFECT_ENGINEER);
|
|
|
+ int effectEngineerCount = 0;
|
|
|
if (CollectionUtils.isNotEmpty(effectEngineer)) {
|
|
|
- List<Long> effectEngineerIdList = effectEngineer.stream().map(BaseEntity::getId).distinct().collect(Collectors.toList());
|
|
|
+ List<Long> effectEngineerIdList = effectEngineer.stream().map(SysUserBriefResult::getId).distinct().collect(Collectors.toList());
|
|
|
effectEngineerCount = (int) userIdList.stream().filter(effectEngineerIdList::contains).count();
|
|
|
}
|
|
|
result.setEffectEngineerCount(effectEngineerCount);
|
|
|
|
|
|
- List<SysUser> regionCoordinator = sysUserService.findUserListByRoleType(RoleTypeEnum.REGION_COORDINATOR);
|
|
|
- Integer regionCoordinatorCount = 0;
|
|
|
+ List<SysUserBriefResult> regionCoordinator = sysUserService.findUserListByRoleType(RoleTypeEnum.REGION_COORDINATOR);
|
|
|
+ int regionCoordinatorCount = 0;
|
|
|
if (CollectionUtils.isNotEmpty(regionCoordinator)) {
|
|
|
- List<Long> regionCoordinatorIdList = regionCoordinator.stream().map(BaseEntity::getId).distinct().collect(Collectors.toList());
|
|
|
+ List<Long> regionCoordinatorIdList = regionCoordinator.stream().map(SysUserBriefResult::getId).distinct().collect(Collectors.toList());
|
|
|
regionCoordinatorCount = (int) userIdList.stream().filter(regionCoordinatorIdList::contains).count();
|
|
|
}
|
|
|
result.setRegionCoordinatorCount(regionCoordinatorCount);
|
|
|
|
|
|
- List<SysUser> assistantEngineer = sysUserService.findUserListByRoleType(RoleTypeEnum.ASSISTANT_ENGINEER);
|
|
|
- Integer assistantEngineerCount = 0;
|
|
|
+ List<SysUserBriefResult> assistantEngineer = sysUserService.findUserListByRoleType(RoleTypeEnum.ASSISTANT_ENGINEER);
|
|
|
+ int assistantEngineerCount = 0;
|
|
|
if (CollectionUtils.isNotEmpty(assistantEngineer)) {
|
|
|
- List<Long> assistantEngineerIdList = assistantEngineer.stream().map(BaseEntity::getId).distinct().collect(Collectors.toList());
|
|
|
+ List<Long> assistantEngineerIdList = assistantEngineer.stream().map(SysUserBriefResult::getId).distinct().collect(Collectors.toList());
|
|
|
assistantEngineerCount = (int) userIdList.stream().filter(assistantEngineerIdList::contains).count();
|
|
|
}
|
|
|
result.setAssistantEngineerCount(assistantEngineerCount);
|
|
@@ -326,17 +322,17 @@ public class TBUserArchivesServiceImpl extends ServiceImpl<TBUserArchivesMapper,
|
|
|
|
|
|
List<Long> effectEngineerIdList = sysUserService.findUserListByRoleType(RoleTypeEnum.EFFECT_ENGINEER)
|
|
|
.stream()
|
|
|
- .map(BaseEntity::getId)
|
|
|
+ .map(SysUserBriefResult::getId)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
List<Long> regionCoordinatorIdList = sysUserService.findUserListByRoleType(RoleTypeEnum.REGION_COORDINATOR)
|
|
|
.stream()
|
|
|
- .map(BaseEntity::getId)
|
|
|
+ .map(SysUserBriefResult::getId)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
List<Long> assistantEngineerIdList = sysUserService.findUserListByRoleType(RoleTypeEnum.ASSISTANT_ENGINEER)
|
|
|
.stream()
|
|
|
- .map(BaseEntity::getId)
|
|
|
+ .map(SysUserBriefResult::getId)
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
|