装修调整
This commit is contained in:
@@ -43,11 +43,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean assignDesigner(AssignDesignerRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -80,11 +77,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitDesignDrawing(SubmitDesignDrawingRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -110,11 +104,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean assignQuotation(AssignQuotationRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -137,11 +128,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitQuotationSheet(SubmitQuotationSheetRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -168,11 +156,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitConstructionOrder(ConstructionOrderRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -194,11 +179,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean entryConfirmation(EntryConfirmationRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -219,11 +201,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean constructionCompleted(ConstructionCompletedRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -244,11 +223,7 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean decorationAcceptance(HqtDecorationAcceptanceRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
|
||||
@@ -179,11 +179,8 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||
|
||||
@Override
|
||||
public Boolean assignSurveyors(AssignSurveyorsRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -229,11 +226,8 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||
|
||||
@Override
|
||||
public Boolean submitMeasurementDiagram(SubmitMeasurementRequest request) {
|
||||
Integer numByShopCode = shopInfoDAO.getNumByShopCode(request.getShopCode());
|
||||
if(numByShopCode > 1){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
@@ -263,12 +257,14 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||
if (StringUtils.isBlank(measureDAOByShopId.getMeasureUserName())
|
||||
&& StringUtils.isNotBlank(measureDAOByShopId.getMeasureUserId())) {
|
||||
response.setMeasureUserName(enterpriseUserDAO.getUserName(measureDAOByShopId.getMeasureUserId()));
|
||||
response.setMeasureUserId(measureDAOByShopId.getMeasureUserId());
|
||||
} else {
|
||||
response.setMeasureUserName(measureDAOByShopId.getMeasureUserName());
|
||||
}
|
||||
if (StringUtils.isBlank(measureDAOByShopId.getDesignLeaderName())
|
||||
&& StringUtils.isNotBlank(measureDAOByShopId.getDesignUserId())) {
|
||||
response.setDesignLeaderName(enterpriseUserDAO.getUserName(measureDAOByShopId.getDesignUserId()));
|
||||
response.setDesignUserId(measureDAOByShopId.getDesignUserId());
|
||||
} else {
|
||||
response.setDesignLeaderName(measureDAOByShopId.getDesignLeaderName());
|
||||
}
|
||||
|
||||
@@ -650,6 +650,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (StringUtils.isNotBlank(measureDO.getDesignUserId()) && StringUtils.isBlank(measureDO.getDesignLeaderName())) {
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
|
||||
response.setDesignLeaderName(userName);
|
||||
response.setDesignLeaderId(measureDO.getDesignUserId());
|
||||
} else {
|
||||
response.setDesignLeaderName(measureDO.getDesignLeaderName());
|
||||
}
|
||||
@@ -659,11 +660,13 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
response.setDesignSheetId(decoration.getDesignSheetId());
|
||||
if (StringUtils.isNotBlank(decoration.getDesignUserId()) && StringUtils.isBlank(decoration.getDesignName())) {
|
||||
response.setDesignName(enterpriseUserDAO.getUserName(decoration.getDesignUserId()));
|
||||
response.setDesignUserId(decoration.getDesignUserId());
|
||||
} else {
|
||||
response.setDesignName(decoration.getDesignName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(decoration.getDesignLeaderId()) && StringUtils.isBlank(decoration.getDesignLeaderName())) {
|
||||
String userName = enterpriseUserDAO.getUserName(decoration.getDesignLeaderId());
|
||||
response.setDesignLeaderId(decoration.getDesignLeaderId());
|
||||
response.setDesignLeaderName(userName);
|
||||
} else {
|
||||
response.setDesignLeaderName(decoration.getDesignLeaderName());
|
||||
@@ -678,6 +681,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (StringUtils.isNotBlank(decoration.getQuotationUserId()) && StringUtils.isBlank(decoration.getQuoter())) {
|
||||
String userName = enterpriseUserDAO.getUserName(decoration.getQuotationUserId());
|
||||
response.setQuoter(userName);
|
||||
response.setQuotationUserId(decoration.getQuotationUserId());
|
||||
} else {
|
||||
response.setQuoter(decoration.getQuoter());
|
||||
}
|
||||
|
||||
@@ -259,11 +259,6 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) {
|
||||
//如果不是毛泽军下级大区 直接完成不用总裁审批
|
||||
if (!flag && SHOP_SUB_STAGE_STATUS_154.equals(nowStatus)) {
|
||||
if (!shopInfo.getShopDecorationAttributes().equals(ShopDecorationAttributesEnum.OLD_NEW_OPEN.getCode())
|
||||
&& measurementStage.getShopSubStageStatus() .equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_861);
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(request.getShopId()));
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_156);
|
||||
stageCompletion(request.getShopId());
|
||||
syncMainSysServer.syncStore(request.getShopId());
|
||||
@@ -272,11 +267,6 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), nextStatus);
|
||||
if (SHOP_SUB_STAGE_STATUS_156.equals(nextStatus)) {
|
||||
if (!shopInfo.getShopDecorationAttributes().equals(ShopDecorationAttributesEnum.OLD_NEW_OPEN.getCode())
|
||||
&& measurementStage.getShopSubStageStatus() .equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_861);
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(request.getShopId()));
|
||||
}
|
||||
stageCompletion(request.getShopId());
|
||||
syncMainSysServer.syncStore(request.getShopId());
|
||||
}
|
||||
@@ -285,43 +275,6 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
public void updateDecorationStage(Long shopId){
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
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);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (StringUtils.isBlank(bigRegionDO.getHqtRegionCode())){
|
||||
bigRegionDO = hqtAPIService.pushHqtRegion(bigRegionDO);
|
||||
}
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
void sendSms(Long shopId, List<String> userIds) {
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(shopId);
|
||||
|
||||
@@ -204,6 +204,7 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_861);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140);
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_150);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, list);
|
||||
|
||||
@@ -12,10 +12,7 @@ import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.AddSignFranchiseRequest;
|
||||
import com.cool.store.request.AuditApproveRequest;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.FranchiseAgreementRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
@@ -44,6 +41,16 @@ import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
@Slf4j
|
||||
public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResultService {
|
||||
|
||||
@Resource
|
||||
private BigRegionDAO bigRegionDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
private RegionDao regionDao;
|
||||
@Resource
|
||||
@@ -344,19 +351,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||
if (request.getAuditResult() == 1) {
|
||||
shopSubStageStatusEnum = SHOP_SUB_STAGE_STATUS_84;
|
||||
if (shopInfoDO.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
|
||||
));
|
||||
|
||||
}
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setShopId(shopId);
|
||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.SIGN_FRANCHISE.getCode());
|
||||
@@ -368,7 +362,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopAuditInfoDO.setRejectReason(request.getCause());
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85);
|
||||
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||
if (Objects.nonNull(branchUser)) {
|
||||
@@ -387,6 +381,15 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
||||
commonService.sendMessage(new ArrayList<>(auditFranchiseFeeUsers), MessageEnum.MESSAGE_20, requestMap);
|
||||
} else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
|
||||
if (shopInfoDO.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
|
||||
));
|
||||
}else{
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(request.getShopId()));
|
||||
|
||||
}
|
||||
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
|
||||
shopAuditInfoDO.setPassReason(request.getCause());
|
||||
//更新状态为加盟商
|
||||
@@ -394,7 +397,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
//暂时去掉
|
||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_84);
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
|
||||
@@ -441,6 +444,33 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
}
|
||||
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (StringUtils.isBlank(bigRegionDO.getHqtRegionCode())){
|
||||
bigRegionDO = hqtAPIService.pushHqtRegion(bigRegionDO);
|
||||
}
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
public AddSignFranchiseResponse from(SignFranchiseDO signFranchiseDO,
|
||||
Long shopId) {
|
||||
AddSignFranchiseResponse addSignFranchiseResponse = new AddSignFranchiseResponse();
|
||||
|
||||
Reference in New Issue
Block a user