装修调整
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
@@ -13,8 +14,8 @@ import javax.validation.constraints.NotBlank;
|
||||
@Data
|
||||
public class AssignDesignerRequest {
|
||||
|
||||
@NotBlank(message = "店铺编号不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "设计派单ID不能为空")
|
||||
private String designSheetId;
|
||||
@NotBlank(message = "设计师不能为空")
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
@@ -13,8 +14,8 @@ import javax.validation.constraints.NotBlank;
|
||||
@Data
|
||||
public class AssignQuotationRequest {
|
||||
|
||||
@NotBlank(message = "门店编号不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "报价单编码不能为空")
|
||||
private String quotationSheetId;
|
||||
@NotBlank(message = "报价员不能为空")
|
||||
|
||||
@@ -14,9 +14,8 @@ import javax.validation.constraints.NotNull;
|
||||
*/
|
||||
@Data
|
||||
public class AssignSurveyorsRequest {
|
||||
@NotBlank(message = "门店编码不能为空")
|
||||
private String shopCode;
|
||||
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@ApiModelProperty("测量单ID")
|
||||
@NotBlank(message = "测量单ID不能为空")
|
||||
private String measurementSheetId;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
@@ -12,8 +13,8 @@ import javax.validation.constraints.NotBlank;
|
||||
*/
|
||||
@Data
|
||||
public class ConstructionCompletedRequest {
|
||||
@NotBlank(message = "门店编号不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "施工派单编号不能为空")
|
||||
private String constructionOrderId;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ import java.util.Date;
|
||||
@Data
|
||||
public class ConstructionOrderRequest {
|
||||
|
||||
@NotBlank(message = "门店编号不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "施工派单ID(施工派单编号)不能为空")
|
||||
private String constructionOrderId;
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ public class DecorationDesignRequest {
|
||||
@ApiModelProperty("店铺ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty(value = "设计派单ID")
|
||||
private String designSheetId;
|
||||
|
||||
@ApiModelProperty("设计组长ID")
|
||||
private String designLeaderId;
|
||||
|
||||
|
||||
@@ -38,6 +38,11 @@ public class DecorationMeasureRequest {
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("测量派单ID")
|
||||
private String measurementSheetId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 构建DecorationMeasureDO
|
||||
*
|
||||
@@ -52,6 +57,7 @@ public class DecorationMeasureRequest {
|
||||
decorationMeasureDO.setDiagramDate(this.diagramDate);
|
||||
decorationMeasureDO.setMeasureUrl(this.measureUrl);
|
||||
decorationMeasureDO.setRemark(this.remark);
|
||||
decorationMeasureDO.setMeasurementSheetId(this.measurementSheetId);
|
||||
return decorationMeasureDO;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
public class EntryConfirmationRequest {
|
||||
@NotBlank(message = "门店编号不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
//施工派单ID(施工派单编号)
|
||||
@NotBlank(message = "施工派单编号不能为空")
|
||||
private String constructionOrderId;
|
||||
|
||||
@@ -17,8 +17,8 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class HqtDecorationAcceptanceRequest {
|
||||
@NotBlank(message = "门店编号不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "完工交付单ID (完工编号)不能为空")
|
||||
private String deliveryOrderId;
|
||||
@NotEmpty(message = "验收单不能为空")
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,10 +15,8 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class SubmitDesignDrawingRequest {
|
||||
|
||||
@NotBlank(message = "门店编号不能为空")
|
||||
private String shopCode;
|
||||
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "设计派单ID不能为空")
|
||||
private String designSheetId;
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ import java.util.List;
|
||||
@Data
|
||||
public class SubmitMeasurementRequest {
|
||||
|
||||
@NotBlank(message = "门店编码不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotNull(message = "测量日期不能为空")
|
||||
private Date measureDate;
|
||||
@NotNull(message = "出图日期不能为空")
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,8 +15,8 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class SubmitQuotationSheetRequest {
|
||||
@NotBlank(message = "门店编码不能为空")
|
||||
private String shopCode;
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "报价单ID(报价单编号)不能为空")
|
||||
private String quotationSheetId;
|
||||
@NotEmpty(message = "报价单附件不能为空")
|
||||
|
||||
@@ -91,6 +91,10 @@ public class HqtBuildAPIRequest {
|
||||
@JsonProperty("field4__c")
|
||||
private String field4__c;
|
||||
|
||||
//是否对接CRM
|
||||
@JsonProperty("field180__c")
|
||||
private String field180__c = "crm";
|
||||
|
||||
@Data
|
||||
public static class Field124__c {
|
||||
/**
|
||||
|
||||
@@ -19,8 +19,10 @@ public class DecorationDesignResponse {
|
||||
private String designSheetId;
|
||||
@ApiModelProperty(value = "设计组长名称")
|
||||
private String designLeaderName;
|
||||
private String designLeaderId;
|
||||
@ApiModelProperty(value = "设计师名称")
|
||||
private String designName;
|
||||
private String designUserId;
|
||||
@ApiModelProperty("设计图URL")
|
||||
private String designUrl;
|
||||
@ApiModelProperty(value = "原始照片")
|
||||
@@ -35,6 +37,7 @@ public class DecorationDesignResponse {
|
||||
private String quotationSheetId;
|
||||
@ApiModelProperty(value = "报价员")
|
||||
private String quoter;
|
||||
private String quotationUserId;
|
||||
@ApiModelProperty(value = "报价单")
|
||||
private String quotationUrl;
|
||||
@ApiModelProperty(value = "报价提交时间")
|
||||
|
||||
@@ -21,9 +21,13 @@ public class MeasureResponse {
|
||||
@ApiModelProperty("测量员")
|
||||
private String measureUserName;
|
||||
|
||||
private String measureUserId;
|
||||
|
||||
@ApiModelProperty("设计组")
|
||||
private String designLeaderName;
|
||||
|
||||
private String designUserId;
|
||||
|
||||
@ApiModelProperty("测量日期")
|
||||
private Date measureDate;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -84,7 +84,7 @@ enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f
|
||||
|
||||
|
||||
hqt.token.url=https://tc.cloud.hecom.cn
|
||||
hqt.token.username=18820154831
|
||||
hqt.token.username=18161486722
|
||||
hqt.token.grant_type=client_credentials
|
||||
hqt.token.client.id=WrPffdGpcWkcPsbN
|
||||
hqt.token.client.secret=rYe9Cwug5LwQNIBJAiW0a7weF9CAhYCD
|
||||
|
||||
@@ -131,7 +131,7 @@ special.user.id=wpayJeDAAAklx_q1jGhyGUd4yEh8vV_g_woayJeDAAAtwLSAPVMWbpGi9q4caSuj
|
||||
ask.bot.url=https://auth.wx.askbot.cn
|
||||
|
||||
hqt.token.url=https://tc.cloud.hecom.cn
|
||||
hqt.token.username=18820154831
|
||||
hqt.token.username=18161486722
|
||||
hqt.token.grant_type=client_credentials
|
||||
hqt.token.client.id=WrPffdGpcWkcPsbN
|
||||
hqt.token.client.secret=rYe9Cwug5LwQNIBJAiW0a7weF9CAhYCD
|
||||
@@ -136,7 +136,7 @@ ask.bot.url=https://test.auth.wx.askbot.cn
|
||||
|
||||
|
||||
hqt.token.url=https://tc.cloud.hecom.cn
|
||||
hqt.token.username=18820154831
|
||||
hqt.token.username=18161486722
|
||||
hqt.token.grant_type=client_credentials
|
||||
hqt.token.client.id=WrPffdGpcWkcPsbN
|
||||
hqt.token.client.secret=rYe9Cwug5LwQNIBJAiW0a7weF9CAhYCD
|
||||
|
||||
Reference in New Issue
Block a user