工作台加盟费处理人调整

This commit is contained in:
shuo.wang
2025-02-24 17:51:43 +08:00
parent 290ced1b8a
commit 7689e2c02b
2 changed files with 39 additions and 31 deletions

View File

@@ -43,7 +43,13 @@ public enum UserRoleEnum {
TENT_PASS_CUSTOMER(380000000L,"营帐通客服"),
DESIGN_CUSTOMER(390000000L,"设计客服"),
CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
BRANCH_OFFICE(1724233283449L,"内勤"),
BRANCH_OFFICE(1724233283449L,"内勤"),
JOIN_OFFICE(1719278230274L,"加盟内勤"),
REGION_OFFICE(410000000L,"大区内勤"),
FINANCE(1735895867344L,"财务"),
CHUAN_XIAO_MEI_MANAGER(1731635078802L,"串小妹大区执行总经理"),
REGIONAL_MANAGER(420000000L,"大区经理"),
;
private Long code;

View File

@@ -224,33 +224,35 @@ public class DeskServiceImpl implements DeskService {
}
@Override
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
if (CollectionUtils.isNotEmpty(userRoleIds)
&& (userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())
||userRoleIds.contains(UserRoleEnum.INVESTMENT_COMMISSIONER.getCode())
||userRoleIds.contains(UserRoleEnum.STRONG_INVESTMENT_COMMISSIONER.getCode()))){
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
Collections.singletonList(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus()), Boolean.FALSE);
&& (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode())
|| userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())
)) {
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
Collections.singletonList(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus()), Boolean.FALSE);
}
if (CollectionUtils.isNotEmpty(userRoleIds)&& userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode())){
if (CollectionUtils.isNotEmpty(userRoleIds)
&& (userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode())
|| userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())
)) {
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
Collections.singletonList(SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.TRUE);
}
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, LinePayDO> shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
for (PreparationCommonPendingVO vo:list){
vo.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
}
Map<Long, LinePayDO> shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
}
pageInfo.setList(list);
return pageInfo;
}
@@ -261,14 +263,14 @@ public class DeskServiceImpl implements DeskService {
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
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_7.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -299,14 +301,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_23,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_230.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
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){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -320,14 +322,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_16,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_160.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
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){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -341,14 +343,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_24,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_240.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
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){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -361,14 +363,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_17,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
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){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -380,14 +382,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_9,
Arrays.asList(SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
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){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -396,11 +398,11 @@ public class DeskServiceImpl implements DeskService {
@Override
public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo =commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus(),
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
@@ -424,7 +426,7 @@ public class DeskServiceImpl implements DeskService {
deskStageMap.put(decorationDesignInfoDO.getShopId(), deskStages);
}
}
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
for (DeskStageDTO deskStageDTO : deskStageMap.get(vo.getShopId())) {
if (vo.getSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
vo.setSubmitTime(deskStageDTO.getActualCompleteTime());
@@ -439,10 +441,10 @@ public class DeskServiceImpl implements DeskService {
@Override
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
@@ -454,7 +456,7 @@ public class DeskServiceImpl implements DeskService {
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus());
deskStageMap.put(acceptanceInfoDO.getShopId(), Collections.singletonList(dto));
}
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
for (DeskStageDTO deskStageDTO : deskStageMap.get(vo.getShopId())) {
if (vo.getSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
vo.setSubmitTime(deskStageDTO.getActualCompleteTime());