fix:装修 红圈通回调调整 解除强制限制
This commit is contained in:
@@ -21,6 +21,8 @@ import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/6/20 17:22
|
||||
@@ -58,7 +60,7 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
@@ -191,7 +193,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
designInfoDO.setConstructionPlanEndTime(request.getConstructionPlanEndTime());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_11);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())) {
|
||||
//加盟商未确认的时候 但是红圈通已经开始进场 也可以开始该阶段
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())||shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110_5);
|
||||
}
|
||||
return true;
|
||||
@@ -258,10 +261,6 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_12);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())
|
||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopInfoDO.getId());
|
||||
if (Objects.isNull(acceptanceInfoDO)) {
|
||||
acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
@@ -279,7 +278,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
} else {
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())) {
|
||||
//只要不是已完成状态 都可以操作
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopInfoDO.getId(),Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_270));
|
||||
preparationService.buildStoreAndDecorationComplete(shopInfoDO.getId());
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91;
|
||||
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
@@ -374,7 +376,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_12);
|
||||
//如果不是待加盟商验收 说明立规已经验收 只需要保存数据 不需要将阶段变为立规验收
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfoDO.getHqtShopId())) {
|
||||
HqtPartnerAcceptanceRequest hqtPartnerAcceptanceRequest = new HqtPartnerAcceptanceRequest();
|
||||
hqtPartnerAcceptanceRequest.setHqtShopId(shopInfoDO.getHqtShopId());
|
||||
@@ -780,7 +786,14 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
decoration.setPartnerAcceptanceSignatures(JSONObject.toJSONString(threeAcceptanceDTO));
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
List<ShopSubStageStatusEnum> list = Arrays.asList(SHOP_SUB_STAGE_STATUS_91);
|
||||
|
||||
//装修阶段可以提前开始 如果已经进场的 阶段已经流程 不需要初始化为待提交
|
||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||
if (shopStageInfo != null && ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110);
|
||||
}
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),list);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (StringUtils.isNotBlank(shopInfo.getHqtShopId())) {
|
||||
//推送给HQT
|
||||
|
||||
Reference in New Issue
Block a user