feat:签约之后重新推送数据
This commit is contained in:
@@ -219,7 +219,18 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED);
|
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
//修改签约人信息
|
||||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||||
|
//如果已经签约 修改之后从新推送数据到新管家
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getId(), ShopSubStageEnum.SHOP_STAGE_8);
|
||||||
|
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus())){
|
||||||
|
//如果已经签约 修改之后从新推送数据
|
||||||
|
ContractCallbackDTO contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
|
||||||
|
if (!Objects.isNull(contractCallbackDTO)){
|
||||||
|
signFranchiseMapper.updateAuditByShopId(null, request.getShopId(),contractCallbackDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//修改shop & point
|
//修改shop & point
|
||||||
updateShopAndPoint(request, shopInfoDO, pointInfoById);
|
updateShopAndPoint(request, shopInfoDO, pointInfoById);
|
||||||
@@ -414,39 +425,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
//初始化数据
|
//初始化数据
|
||||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||||
|
|
||||||
//推送法大大数据
|
//推送数据
|
||||||
//查询缴费信息
|
contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
|
||||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
|
||||||
|
|
||||||
//自营店 无缴费信息 不需要校验
|
|
||||||
if (franchiseFeeDO != null){
|
|
||||||
ContractInformationDTO contractInformationDTO = new ContractInformationDTO();
|
|
||||||
contractInformationDTO.setShopId(shopId);
|
|
||||||
contractInformationDTO.setJoinModel(shopInfoDO.getJoinMode());
|
|
||||||
contractInformationDTO.setShopName(shopInfoDO.getShopName());
|
|
||||||
//品牌信息
|
|
||||||
contractInformationDTO.setSign1Name(signFranchiseDO.getPartnershipSignatoryFirst());
|
|
||||||
contractInformationDTO.setSign2Name(signFranchiseDO.getPartnershipSignatorySecond());
|
|
||||||
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
|
||||||
contractInformationDTO.setLoanMargin(franchiseFeeDO.getLoanMargin());
|
|
||||||
contractInformationDTO.setFirstYearManagementFee(franchiseFeeDO.getFirstYearManageFee());
|
|
||||||
contractInformationDTO.setYearFranchiseFee(franchiseFeeDO.getYearFranchiseFee());
|
|
||||||
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
|
||||||
|
|
||||||
FranchiseBrandEnum enumByCode = FranchiseBrandEnum.getEnumByCode(shopInfoDO.getFranchiseBrand());
|
|
||||||
if (enumByCode != null){
|
|
||||||
contractInformationDTO.setPayeeName(enumByCode.getPayeeName());
|
|
||||||
contractInformationDTO.setBrandOwner(enumByCode.getBrandOwner());
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
contractCallbackDTO = pushService.pushContract(contractInformationDTO);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("推送合同信息失败", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
|
||||||
Boolean sendNotice = Boolean.TRUE;
|
Boolean sendNotice = Boolean.TRUE;
|
||||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
||||||
if (sendNotice) {
|
if (sendNotice) {
|
||||||
@@ -488,6 +469,47 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送合同信息请求
|
||||||
|
* @param shopId
|
||||||
|
*/
|
||||||
|
private ContractCallbackDTO pushContractRequest(ShopInfoDO shopInfoDO,Long shopId){
|
||||||
|
//推送法大大数据
|
||||||
|
//查询缴费信息
|
||||||
|
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
||||||
|
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||||
|
|
||||||
|
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
||||||
|
//自营店 无缴费信息 不需要校验
|
||||||
|
if (franchiseFeeDO != null){
|
||||||
|
ContractInformationDTO contractInformationDTO = new ContractInformationDTO();
|
||||||
|
contractInformationDTO.setShopId(shopId);
|
||||||
|
contractInformationDTO.setJoinModel(shopInfoDO.getJoinMode());
|
||||||
|
contractInformationDTO.setShopName(shopInfoDO.getShopName());
|
||||||
|
//品牌信息
|
||||||
|
contractInformationDTO.setSign1Name(signFranchiseDO.getPartnershipSignatoryFirst());
|
||||||
|
contractInformationDTO.setSign2Name(signFranchiseDO.getPartnershipSignatorySecond());
|
||||||
|
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
||||||
|
contractInformationDTO.setLoanMargin(franchiseFeeDO.getLoanMargin());
|
||||||
|
contractInformationDTO.setFirstYearManagementFee(franchiseFeeDO.getFirstYearManageFee());
|
||||||
|
contractInformationDTO.setYearFranchiseFee(franchiseFeeDO.getYearFranchiseFee());
|
||||||
|
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
||||||
|
|
||||||
|
FranchiseBrandEnum enumByCode = FranchiseBrandEnum.getEnumByCode(shopInfoDO.getFranchiseBrand());
|
||||||
|
if (enumByCode != null){
|
||||||
|
contractInformationDTO.setPayeeName(enumByCode.getPayeeName());
|
||||||
|
contractInformationDTO.setBrandOwner(enumByCode.getBrandOwner());
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return pushService.pushContract(contractInformationDTO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("推送合同信息失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
|
|||||||
Reference in New Issue
Block a user