feat:加盟合同审批 使用招商所属区域
This commit is contained in:
@@ -187,12 +187,12 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
Set<String> franchiseContractUser = new HashSet<>();
|
Set<String> franchiseContractUser = new HashSet<>();
|
||||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getInvestRegionId());
|
||||||
if (Objects.nonNull(joinUser)) {
|
if (Objects.nonNull(joinUser)) {
|
||||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
franchiseContractUser.addAll(joinUserIds);
|
franchiseContractUser.addAll(joinUserIds);
|
||||||
}
|
}
|
||||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getInvestRegionId());
|
||||||
if (Objects.nonNull(regionUser)) {
|
if (Objects.nonNull(regionUser)) {
|
||||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
franchiseContractUser.addAll(regionUserIds);
|
franchiseContractUser.addAll(regionUserIds);
|
||||||
|
|||||||
@@ -247,8 +247,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
signFranchiseMapper.insertSelective(signFranchiseDO);
|
signFranchiseMapper.insertSelective(signFranchiseDO);
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||||
//发送通知
|
//发送通知
|
||||||
List<EnterpriseUserDO> auditFranchiseFeeUsers = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(BRANCH_OFFICE, REGION_OFFICE), shopInfoDO.getRegionId());
|
List<EnterpriseUserDO> auditFranchiseFeeUsers = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(BRANCH_OFFICE, REGION_OFFICE), shopInfoDO.getInvestRegionId());
|
||||||
List<EnterpriseUserDO> financeUsers = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Collections.singletonList(FINANCE), shopInfoDO.getRegionId());
|
|
||||||
List<String> auditFranchiseFeeUserList = auditFranchiseFeeUsers.stream().distinct().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
List<String> auditFranchiseFeeUserList = auditFranchiseFeeUsers.stream().distinct().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
@@ -350,8 +349,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
//修改阶段状态
|
//修改阶段状态
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||||
//发送通知
|
//发送通知
|
||||||
List<EnterpriseUserDO> userIds = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(BRANCH_OFFICE, REGION_OFFICE), shopInfoDO.getRegionId());
|
List<EnterpriseUserDO> userIds = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(BRANCH_OFFICE, REGION_OFFICE), shopInfoDO.getInvestRegionId());
|
||||||
List<EnterpriseUserDO> financeUsers = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Collections.singletonList(FINANCE), shopInfoDO.getRegionId());
|
|
||||||
List<String> auditFranchiseFeeUserList = userIds.stream().distinct().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
List<String> auditFranchiseFeeUserList = userIds.stream().distinct().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
@@ -560,12 +558,12 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85);
|
||||||
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||||
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getInvestRegionId());
|
||||||
if (Objects.nonNull(branchUser)) {
|
if (Objects.nonNull(branchUser)) {
|
||||||
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
auditFranchiseFeeUsers.addAll(branchUserIds);
|
auditFranchiseFeeUsers.addAll(branchUserIds);
|
||||||
}
|
}
|
||||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(REGION_OFFICE, shopInfoDO.getRegionId());
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(REGION_OFFICE, shopInfoDO.getInvestRegionId());
|
||||||
if (Objects.nonNull(regionUser)) {
|
if (Objects.nonNull(regionUser)) {
|
||||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
auditFranchiseFeeUsers.addAll(regionUserIds);
|
auditFranchiseFeeUsers.addAll(regionUserIds);
|
||||||
|
|||||||
Reference in New Issue
Block a user