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

@@ -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) {