Merge branch 'cc_20250514_oldShopOpen' into 'master'
Cc 20250514 old shop open See merge request hangzhou/java/custom_zxjp!79
This commit is contained in:
@@ -612,13 +612,12 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (decoration == null) {
|
||||
//查询测量阶段的设计组长
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||
if (measureDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||
decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId());
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId().toString());
|
||||
decorationDesignVO.setDesignLeaderName(userName);
|
||||
if (measureDO!=null){
|
||||
decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId());
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
|
||||
decorationDesignVO.setDesignLeaderName(userName);
|
||||
}
|
||||
return decorationDesignVO;
|
||||
}
|
||||
DecorationDesignVO decorationDesignVO = BeanUtil.toBean(decoration, DecorationDesignVO.class);
|
||||
|
||||
@@ -37,6 +37,7 @@ import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.UserRoleEnum.*;
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -116,7 +117,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
Long shopId = getShopId(request.getKdzBusinessId());
|
||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||
if (request.getAuditResult() == 1) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84;
|
||||
shopSubStageStatusEnum = SHOP_SUB_STAGE_STATUS_84;
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
||||
}
|
||||
@@ -331,7 +332,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
Long shopId = request.getShopId();
|
||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||
if (request.getAuditResult() == 1) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84;
|
||||
shopSubStageStatusEnum = SHOP_SUB_STAGE_STATUS_84;
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
||||
}
|
||||
@@ -377,23 +378,38 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = new ArrayList<>();
|
||||
if (Objects.nonNull(userDOList)) {
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
|
||||
//判断是否是老店新开
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||
log.info("加盟合同审批时签约类型:{}",SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
||||
Boolean sendNotice = Boolean.TRUE;
|
||||
if (SignTypeEnum.OLD_NEW_OPEN.getCode().equals(signFranchiseDO.getSignType())){
|
||||
//老店新开时装修与开业直接完成
|
||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(Arrays.asList(shopId),Arrays.asList(
|
||||
SHOP_SUB_STAGE_STATUS_863,SHOP_SUB_STAGE_STATUS_91,SHOP_SUB_STAGE_STATUS_112,SHOP_SUB_STAGE_STATUS_123,SHOP_SUB_STAGE_STATUS_143
|
||||
));
|
||||
//老店新开 不需要装修与开业 无需发送通知
|
||||
sendNotice = Boolean.FALSE;
|
||||
}
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
||||
if (sendNotice){
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = new ArrayList<>();
|
||||
if (Objects.nonNull(userDOList)) {
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
List<String> liGuiNeiQinList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Arrays.asList(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode()));
|
||||
commonService.sendQWMessage(liGuiNeiQinList,
|
||||
MessageEnum.MESSAGE_57,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_26,
|
||||
map);
|
||||
}
|
||||
List<String> liGuiNeiQinList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Arrays.asList(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode()));
|
||||
commonService.sendQWMessage(liGuiNeiQinList,
|
||||
MessageEnum.MESSAGE_57,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_26,
|
||||
map);
|
||||
}
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
Long auditId = shopAuditInfoDO.getId();
|
||||
|
||||
Reference in New Issue
Block a user