Merge remote-tracking branch 'origin/cc_20250211_v2.6' into cc_20250211_v2.6
This commit is contained in:
@@ -75,6 +75,7 @@ public enum MessageEnum {
|
||||
MESSAGE_47("您有一个门店已提交快手建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_48("您有一个门店饿了么初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_49("您有一个门店美团外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_50("您有一个门店开业运营方案审核未通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -5,13 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import com.cool.store.enums.AuditTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.OpeningOperationPlanResultTypeEnum;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
@@ -21,6 +16,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -42,6 +40,12 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
|
||||
private PreparationService preparationService;
|
||||
@Resource
|
||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -67,7 +71,16 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143;
|
||||
flag = Boolean.TRUE;
|
||||
}else {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142;
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfo.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_50,
|
||||
map);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
|
||||
shopSubStageStatusEnum, auditId);
|
||||
|
||||
@@ -113,22 +113,34 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.IT_EMPLOYEE, shopInfoDO.getRegionId());
|
||||
List<String> itUsers = itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> itUsers = new ArrayList<>();
|
||||
if (!itList.isEmpty()){
|
||||
itUsers.addAll(itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(itUsers,
|
||||
MessageEnum.MESSAGE_39,
|
||||
map);
|
||||
List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId());
|
||||
List<String> posUsers = posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> posUsers = new ArrayList<>();
|
||||
if (!posList.isEmpty()){
|
||||
posUsers.addAll( posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(posUsers,
|
||||
MessageEnum.MESSAGE_38,
|
||||
map);
|
||||
List<EnterpriseUserDO> xfList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.XIN_FA_SYS_CUSTOMER, shopInfoDO.getRegionId());
|
||||
List<String> xfUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> xfUsers = new ArrayList<>();
|
||||
if(!xfList.isEmpty()){
|
||||
xfUsers.addAll(xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(xfUsers,
|
||||
MessageEnum.MESSAGE_40,
|
||||
map);
|
||||
List<EnterpriseUserDO> zxtList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.TENT_PASS_CUSTOMER, shopInfoDO.getRegionId());
|
||||
List<String> zxtUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> zxtUsers = new ArrayList<>();
|
||||
if(!zxtList.isEmpty()){
|
||||
zxtUsers.addAll(zxtList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(zxtUsers,
|
||||
MessageEnum.MESSAGE_41,
|
||||
map);
|
||||
|
||||
@@ -188,10 +188,12 @@ public class CommonService {
|
||||
public void sendQWMessage(List<String> userIds, MessageEnum message, Map<String, String> requestMap){
|
||||
log.info("message:{}, request:{}, userIds:{}", message.getTitle(), JSONObject.toJSONString(requestMap), JSONObject.toJSONString(userIds));
|
||||
if(CollectionUtils.isEmpty(userIds)){
|
||||
log.info("消息接收人列表为空");
|
||||
return;
|
||||
}
|
||||
userIds = userIds.stream().filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(userIds)){
|
||||
log.info("消息接收人列表为空");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -134,7 +134,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
//预算
|
||||
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||
if (proposedBookBudget == null) {return null;}
|
||||
if (proposedBookBudget == null) {
|
||||
return null;
|
||||
}
|
||||
BigDecimal vzHj = proposedBookBudget.getVzHj();
|
||||
//支付二维码url
|
||||
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
||||
@@ -364,11 +366,14 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfoDO.getRegionId());
|
||||
List<String> userIds = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> userIds = new ArrayList<>();
|
||||
if (!userDOList.isEmpty()) {
|
||||
userIds.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(userIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
@@ -390,7 +395,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(),request.getSubStageStatus(),null);
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(), request.getSubStageStatus(), null);
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
@@ -461,7 +466,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId,new ShopStageInfoDO()).getShopSubStageStatus());
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId, new ShopStageInfoDO()).getShopSubStageStatus());
|
||||
}
|
||||
fitmentCheckVOList.add(fitmentCheckVO);
|
||||
}
|
||||
@@ -528,25 +533,25 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//重复提交校验 3秒内不能重复提交
|
||||
String lockKey = "submitDecorationDesign:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
||||
if (!acquired){
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
//校验参数
|
||||
if (Objects.isNull(request)||request.getShopId()==null){
|
||||
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
//必须是待提交状态才能提交
|
||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
||||
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||
}
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (Objects.nonNull(decoration)){
|
||||
if (Objects.nonNull(decoration)) {
|
||||
decorationDesignInfoDO.setId(decoration.getId());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
}else {
|
||||
} else {
|
||||
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||
}
|
||||
//更新装修设计状态
|
||||
@@ -555,17 +560,17 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("shopName", shopInfo.getShopName());
|
||||
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.DESIGN_STAGE,templateParam);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecorationDesignVO getDecorationDesign(Long shopId) {
|
||||
if (shopId==null){
|
||||
if (shopId == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||
if (!Objects.isNull(decoration)){
|
||||
if (!Objects.isNull(decoration)) {
|
||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||
decorationDesignVO.setDesignUrl(decoration.getDesignUrl());
|
||||
decorationDesignVO.setRemark(decoration.getRemark());
|
||||
@@ -581,17 +586,17 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
public Boolean submitConstructionData(ConstructionRequest request, LoginUserInfo user) {
|
||||
String lockKey = "submitConstructionData:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
||||
if (!acquired){
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
//校验参数
|
||||
if (Objects.isNull(request)||request.getShopId()==null){
|
||||
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
//必须是待提交状态才能提交
|
||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||
}
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
@@ -611,16 +616,16 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
public ConstructionDataVO getConstructionData(Long shopId) {
|
||||
ConstructionDataVO constructionDataVO = new ConstructionDataVO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||
if (Objects.isNull(decoration)){
|
||||
if (Objects.isNull(decoration)) {
|
||||
return constructionDataVO;
|
||||
}
|
||||
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
|
||||
constructionDataVO.setConstructionRemark(decoration.getConstructionRemark());
|
||||
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime()!=null?decoration.getConstructionPlanStartTime().getTime():null);
|
||||
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime()!=null?decoration.getConstructionPlanEndTime().getTime():null);
|
||||
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime()!=null?decoration.getConstructionCreateTime().getTime():null);
|
||||
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime() != null ? decoration.getConstructionPlanStartTime().getTime() : null);
|
||||
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime() != null ? decoration.getConstructionPlanEndTime().getTime() : null);
|
||||
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime() != null ? decoration.getConstructionCreateTime().getTime() : null);
|
||||
constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser());
|
||||
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())){
|
||||
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())) {
|
||||
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser());
|
||||
constructionDataVO.setConstructionCreateUserName(user.getName());
|
||||
}
|
||||
@@ -633,13 +638,13 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//重复提交校验 3秒内不能重复提交
|
||||
String lockKey = "confirmDesign:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
||||
if (!acquired){
|
||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (Objects.nonNull(decoration)){
|
||||
if (Objects.nonNull(decoration)) {
|
||||
decorationDesignInfoDO.setId(decoration.getId());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
}
|
||||
@@ -648,9 +653,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfo.getShopName());
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_36,
|
||||
map);
|
||||
@@ -662,11 +667,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
public Boolean confirmComplete(Long shopId, LoginUserInfo user) {
|
||||
//判断施工阶段是否时施工中 施工中才能施工完成
|
||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||
if (shopStageInfoDO!=null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())){
|
||||
if (shopStageInfoDO != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
|
||||
}
|
||||
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
if(Objects.isNull(acceptance)) {
|
||||
if (Objects.isNull(acceptance)) {
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(shopId);
|
||||
acceptanceInfoDO.setCreateTime(new Date());
|
||||
@@ -677,7 +682,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("shopName", shopInfo.getShopName());
|
||||
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.CONSTRUCTION_STAGE,templateParam);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.CONSTRUCTION_STAGE, templateParam);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,13 +129,13 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
Set<String> franchiseContractUser = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!joinUserIds.isEmpty()) {
|
||||
if (!joinUser.isEmpty()) {
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
franchiseContractUser.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionUserIds.isEmpty()) {
|
||||
if (!regionUser.isEmpty()) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
franchiseContractUser.addAll(regionUserIds);
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
@@ -163,17 +163,16 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
Set<String>publishFranchiseFeeUsers = new HashSet<>();
|
||||
for (Long regionId : regionIds){
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, regionId);
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!joinUserIds.isEmpty()){
|
||||
if (!joinUser.isEmpty()){
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, regionId);
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionUserIds.isEmpty()){
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
if (!regionUser.isEmpty()){
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
|
||||
@@ -157,13 +157,13 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
|
||||
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfoDO.getRegionId());
|
||||
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!branchUserIds.isEmpty()) {
|
||||
if (!branchUser.isEmpty()) {
|
||||
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
auditFranchiseFeeUsers.addAll(branchUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionUserIds.isEmpty()) {
|
||||
if (!regionUser.isEmpty()) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
auditFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
@@ -107,15 +107,16 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
Set<String> planAuditUser = new HashSet<>();
|
||||
List<EnterpriseUserDO> regionManagerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfoDO.getRegionId());
|
||||
Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionManagerUserIds.isEmpty()) {
|
||||
if (!regionManagerUser.isEmpty()){
|
||||
Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
planAuditUser.addAll(regionManagerUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionalManager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDO.getRegionId());
|
||||
Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionalManagerUserIds.isEmpty()) {
|
||||
if (!regionalManager.isEmpty()){
|
||||
Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
planAuditUser.addAll(regionalManagerUserIds);
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
|
||||
@@ -111,7 +111,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> dyCustomerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId);
|
||||
List<String> dyCustomerUserIds = dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> dyCustomerUserIds =new ArrayList<>();
|
||||
if(!dyCustomerUser.isEmpty()){
|
||||
dyCustomerUserIds.addAll(dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(dyCustomerUserIds,
|
||||
MessageEnum.MESSAGE_43,
|
||||
map);
|
||||
@@ -132,7 +135,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> ksUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId);
|
||||
List<String> ksUserIds = ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> ksUserIds =new ArrayList<>();
|
||||
if(!ksUser.isEmpty()){
|
||||
ksUserIds.addAll(ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(ksUserIds,
|
||||
MessageEnum.MESSAGE_47,
|
||||
map);
|
||||
@@ -153,7 +159,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> mtbcUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId);
|
||||
List<String> mtbcUserIds = mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> mtbcUserIds =new ArrayList<>();
|
||||
if(!mtbcUser.isEmpty()){
|
||||
mtbcUserIds.addAll(mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtbcUserIds,
|
||||
MessageEnum.MESSAGE_45,
|
||||
map);
|
||||
@@ -174,7 +183,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||
List<String> elmUserIds = elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> elmUserIds =new ArrayList<>();
|
||||
if(!elmUser.isEmpty()){
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(elmUserIds,
|
||||
MessageEnum.MESSAGE_46,
|
||||
map);
|
||||
@@ -195,7 +207,10 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> mtocUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||
List<String> mtocUserIds = mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> mtocUserIds =new ArrayList<>();
|
||||
if(!mtocUser.isEmpty()){
|
||||
mtocUserIds.addAll(mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtocUserIds,
|
||||
MessageEnum.MESSAGE_44,
|
||||
map);
|
||||
@@ -402,7 +417,10 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
|
||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||
List<String> elmUserIds = elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> elmUserIds = new ArrayList<>();
|
||||
if(!elmUser.isEmpty()){
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
|
||||
elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||
commonService.sendQWMessage(elmUserIds,
|
||||
@@ -421,7 +439,10 @@ public Integer firstAudit(PlatformBuildAuditRequest request) {
|
||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
List<EnterpriseUserDO> mtwmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||
List<String> mtwmUserIds = mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> mtwmUserIds = new ArrayList<>();
|
||||
if (!mtwmUser.isEmpty()){
|
||||
mtwmUserIds.addAll( mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtwmUserIds,
|
||||
MessageEnum.MESSAGE_49,
|
||||
map);
|
||||
|
||||
@@ -120,13 +120,13 @@ public class ShopServiceImpl implements ShopService {
|
||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
|
||||
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId());
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!joinUserIds.isEmpty()) {
|
||||
if (!joinUser.isEmpty()) {
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, lineInfo.getRegionId());
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionUserIds.isEmpty()) {
|
||||
if (!regionUser.isEmpty()) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -301,13 +301,13 @@ public class ShopServiceImpl implements ShopService {
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, request.getRegionId());
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!joinUserIds.isEmpty()) {
|
||||
if (!joinUser.isEmpty()) {
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, request.getRegionId());
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
if (!regionUserIds.isEmpty()) {
|
||||
if (!regionUser.isEmpty()) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||
|
||||
@@ -181,7 +181,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
List<String> finances = new ArrayList<>();
|
||||
if (!userDOList.isEmpty()){
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList())) ;
|
||||
}
|
||||
commonService.sendQWMessage(finances,
|
||||
MessageEnum.MESSAGE_34,
|
||||
map);
|
||||
|
||||
Reference in New Issue
Block a user