fix:推送合同

This commit is contained in:
suzhuhong
2026-01-22 09:30:48 +08:00
parent dc22d18322
commit 96047eeb99
3 changed files with 19 additions and 32 deletions

View File

@@ -1,6 +1,8 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dto.contract.ContractCallbackDTO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.request.*;
import com.cool.store.response.AddSignFranchiseResponse;
import com.cool.store.response.ResponseResult;
@@ -60,4 +62,6 @@ public interface SignFranchiseService {
* @return
*/
Boolean assignOperationConsultant(AssignOperationConsultantRequest request);
ContractCallbackDTO pushContractRequest(ShopInfoDO shopInfoDO, Long shopId);
}

View File

@@ -656,7 +656,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
* 推送合同信息请求
* @param shopId
*/
private ContractCallbackDTO pushContractRequest(ShopInfoDO shopInfoDO,Long shopId){
@Override
public ContractCallbackDTO pushContractRequest(ShopInfoDO shopInfoDO,Long shopId){
//推送法大大数据
//查询缴费信息
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);

View File

@@ -126,6 +126,12 @@ public class PCTestController {
@Resource
CloseStoreService closeStoreService;
@Resource
SignFranchiseDAO signFranchiseDAO;
@Resource
SignFranchiseService signFranchiseService;
@PostMapping("/applyCloseStore")
public ResponseResult<Boolean> applyCloseStore(@RequestBody @Valid CloseStoreApplyRequest request) {
return ResponseResult.success(closeStoreService.applyCloseStore(request));
@@ -454,40 +460,19 @@ public class PCTestController {
return ResponseResult.success(Boolean.TRUE);
}
@GetMapping("/pushContract")
@ApiOperation("推送合同信息")
public ResponseResult<Boolean> pushContract(@RequestParam(value = "shopId", required = true) Long shopId) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(shopId);
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.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
FranchiseBrandEnum enumByCode = FranchiseBrandEnum.getEnumByCode(shopInfoDO.getFranchiseBrand());
if (enumByCode != null){
contractInformationDTO.setPayeeName(enumByCode.getPayeeName());
contractInformationDTO.setBrandOwner(enumByCode.getBrandOwner());
}
try {
ContractCallbackDTO contractCallbackDTO = pushService.pushContract(contractInformationDTO);
log.info("推送合同信息回调:{}", JSONObject.toJSONString(contractCallbackDTO));
} catch (Exception e) {
log.error("推送合同信息失败", e);
ContractCallbackDTO contractCallbackDTO = signFranchiseService.pushContractRequest(shopInfoDO, shopId);
if (!Objects.isNull(contractCallbackDTO)){
if (StringUtils.isNoneEmpty(contractCallbackDTO.getStoreCode())&&StringUtils.isBlank(shopInfoDO.getShopCode())){
shopInfoDO.setShopCode(contractCallbackDTO.getStoreCode());
shopInfoDAO.updateShopInfo(shopInfoDO);
}
signFranchiseDAO.updateAuditByShopId(null, shopId,contractCallbackDTO);
}
return ResponseResult.success(Boolean.TRUE);
}
@@ -611,9 +596,6 @@ public class PCTestController {
return ApiResponse.success(decorationDesignInfoService.decorationAcceptance(request));
}
@Resource
SignFranchiseService signFranchiseService;
@ApiOperation("测试红圈通建店")
@GetMapping("/testHqtBuild")
public ApiResponse<Boolean> testHqtBuild(@RequestParam("shopId")Long shopId) {