feat: 测量阶段代办按照职位查询数据

This commit is contained in:
ryan.xu
2025-04-25 14:43:28 +08:00
parent 969e27bedf
commit 683ffec2d7
2 changed files with 13 additions and 16 deletions

View File

@@ -42,7 +42,7 @@ public enum UserRoleEnum {
XIN_FA_SYS_CUSTOMER(370000000L,"信发系统客服"),
TENT_PASS_CUSTOMER(380000000L,"营帐通客服"),
DESIGN_CUSTOMER(390000000L,"设计客服"),
CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
CONSTRUCTION_CUSTOMER(400000000L,"立规内勤"),
BRANCH_OFFICE(1724233283449L,"分部内勤"),
JOIN_OFFICE(1719278230274L,"加盟内勤"),
REGION_OFFICE(410000000L,"大区内勤"),

View File

@@ -533,23 +533,20 @@ public class DeskServiceImpl implements DeskService {
@Override
public PageInfo<PreparationCommonPendingVO> measurePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_8_6,
Arrays.asList(SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus(),SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
List<Integer> subStageStatusList = new ArrayList<>();
if (userRoleIds.contains(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode())) {
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus());
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo : list) {
if (deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
if (userRoleIds.contains(UserRoleEnum.MEASURE_OFFICE.getCode())) {
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus());
}
pageInfo.setList(list);
return pageInfo;
Boolean isAdmin = sysRoleService.checkIsAdmin(user.getUserId());
if (isAdmin) {
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861.getShopSubStageStatus());
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus());
}
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_8_6, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE);
}
/**