门店装修属性增加
This commit is contained in:
@@ -248,6 +248,7 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) {
|
||||
//如果不是毛泽军下级大区 直接完成不用总裁审批
|
||||
if (!flag && SHOP_SUB_STAGE_STATUS_154.equals(nowStatus)) {
|
||||
updateDecorationStage(request.getShopId());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_156);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_861);
|
||||
stageCompletion(request.getShopId());
|
||||
@@ -258,6 +259,7 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), nextStatus);
|
||||
if (SHOP_SUB_STAGE_STATUS_156.equals(nextStatus)) {
|
||||
updateDecorationStage(request.getShopId());
|
||||
stageCompletion(request.getShopId());
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(request.getShopId()));
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_861);
|
||||
@@ -268,6 +270,19 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public void updateDecorationStage(Long shopId){
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (shopInfo.getShopDecorationAttributes() == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_DECORATION_ATTRIBUTES_IS_NULL);
|
||||
}
|
||||
if (shopInfo.getShopDecorationAttributes().equals(ShopDecorationAttributesEnum.OLD_NEW_OPEN.getCode())) {
|
||||
//老店新开时装修与开业直接完成
|
||||
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
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
|
||||
@@ -283,6 +283,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopInfoDO.setDistrictCode(request.getDistrictCode());
|
||||
shopInfoDO.setUpdateTime(new Date());
|
||||
shopInfoDO.setStoreType(request.getStoreType());
|
||||
shopInfoDO.setShopDecorationAttributes(request.getShopDecorationAttributes());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
if (Objects.nonNull(pointInfoById)) {
|
||||
pointInfoById.setProvince(request.getProvince());
|
||||
@@ -391,18 +392,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
|
||||
//判断是否是老店新开
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
||||
Boolean sendNotice = Boolean.TRUE;
|
||||
if (SignTypeEnum.OLD_NEW_OPEN.getCode().equals(signFranchiseDO.getSignType()) || SignTypeEnum.DIRECT_SALES_TO_JOINING.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<>();
|
||||
@@ -414,10 +406,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
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);
|
||||
// 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);
|
||||
@@ -485,6 +477,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
addSignFranchiseResponse.setCityCode(shopInfoDO.getCityCode());
|
||||
addSignFranchiseResponse.setDistrictCode(shopInfoDO.getDistrictCode());
|
||||
addSignFranchiseResponse.setManagerRegionId(shopInfoDO.getManagerRegionId());
|
||||
addSignFranchiseResponse.setShopDecorationAttributes(shopInfoDO.getShopDecorationAttributes());
|
||||
if (Objects.nonNull(managerRegion)){
|
||||
addSignFranchiseResponse.setManagerRegionName(managerRegion.getName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user