feat:法大大一期
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.contract.ContractCallbackDTO;
|
||||||
import com.cool.store.entity.SignFranchiseDO;
|
import com.cool.store.entity.SignFranchiseDO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
@@ -11,7 +12,8 @@ public interface SignFranchiseMapper extends Mapper<SignFranchiseDO> {
|
|||||||
SignFranchiseDO selectByShopId(@Param("shopId") Long shopId);
|
SignFranchiseDO selectByShopId(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
void updateAuditByShopId(@Param("auditId") Long auditId,
|
void updateAuditByShopId(@Param("auditId") Long auditId,
|
||||||
@Param("shopId") Long shopId);
|
@Param("shopId") Long shopId,
|
||||||
|
@Param("dto") ContractCallbackDTO dto);
|
||||||
|
|
||||||
List<SignFranchiseDO> selectByShopIds( @Param("list")List<Long> shopIds);
|
List<SignFranchiseDO> selectByShopIds( @Param("list")List<Long> shopIds);
|
||||||
Integer dateHandle();
|
Integer dateHandle();
|
||||||
|
|||||||
@@ -3,7 +3,19 @@
|
|||||||
<mapper namespace="com.cool.store.mapper.SignFranchiseMapper">
|
<mapper namespace="com.cool.store.mapper.SignFranchiseMapper">
|
||||||
<update id="updateAuditByShopId">
|
<update id="updateAuditByShopId">
|
||||||
update xfsg_sign_franchise
|
update xfsg_sign_franchise
|
||||||
set audit_id = #{auditId}
|
<set>
|
||||||
|
<if test="auditId!=null">
|
||||||
|
audit_id = #{auditId},
|
||||||
|
</if>
|
||||||
|
<if test="dto!=null">
|
||||||
|
<if test="dto.infoConsistencyFlag != null">
|
||||||
|
info_consistency_flag = #{dto.infoConsistencyFlag},
|
||||||
|
</if>
|
||||||
|
<if test="dto.reason != null and dto.reason != ''">
|
||||||
|
reason = #{dto.reason},
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
where shop_id = #{shopId}
|
where shop_id = #{shopId}
|
||||||
</update>
|
</update>
|
||||||
<update id="dateHandle">
|
<update id="dateHandle">
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.cool.store.dto.contract;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/9/17 14:42
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ContractCallbackDTO {
|
||||||
|
|
||||||
|
private Integer infoConsistencyFlag;
|
||||||
|
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.*;
|
||||||
import com.cool.store.dto.HqtTokenDTO;
|
import com.cool.store.dto.contract.ContractCallbackDTO;
|
||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
|
||||||
import com.cool.store.dto.XgjOrganizationDTO;
|
|
||||||
import com.cool.store.request.AuditRequest;
|
import com.cool.store.request.AuditRequest;
|
||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
||||||
@@ -94,6 +92,13 @@ public interface PushService {
|
|||||||
*/
|
*/
|
||||||
HqtTokenDTO getHqtToken();
|
HqtTokenDTO getHqtToken();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法大大一期 推送加盟合同信息
|
||||||
|
* @param contractInformationDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ContractCallbackDTO pushContract(ContractInformationDTO contractInformationDTO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.*;
|
||||||
import com.cool.store.dto.HqtTokenDTO;
|
import com.cool.store.dto.contract.ContractCallbackDTO;
|
||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
|
||||||
import com.cool.store.dto.XgjOrganizationDTO;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
@@ -133,6 +131,11 @@ public class PushServiceImpl implements PushService {
|
|||||||
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseeBill";
|
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseeBill";
|
||||||
return executePostApiCall(apiUrl, request, Boolean.class, xgjUsername, xgjSecret,getXgjAccessToken().getAccess_token());
|
return executePostApiCall(apiUrl, request, Boolean.class, xgjUsername, xgjSecret,getXgjAccessToken().getAccess_token());
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public ContractCallbackDTO pushContract(ContractInformationDTO contractInformationDTO) {
|
||||||
|
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseContract";
|
||||||
|
return executePostApiCall(apiUrl, contractInformationDTO, ContractCallbackDTO.class, xgjUsername, xgjSecret,getXgjAccessToken().getAccess_token());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean pushReceiptToXGJ(ReceiptRequest request) {
|
public Boolean pushReceiptToXGJ(ReceiptRequest request) {
|
||||||
@@ -296,6 +299,7 @@ public class PushServiceImpl implements PushService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private <T> T executeApiCall(String url, Object requestBody, Class<T> responseType, String username, String secret){
|
private <T> T executeApiCall(String url, Object requestBody, Class<T> responseType, String username, String secret){
|
||||||
return executePostApiCall(url,requestBody,responseType,username,secret,null);
|
return executePostApiCall(url,requestBody,responseType,username,secret,null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.cool.store.context.LoginUserInfo;
|
|||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.ContractInformationDTO;
|
import com.cool.store.dto.ContractInformationDTO;
|
||||||
import com.cool.store.dto.PartnerBankInfoDTO;
|
import com.cool.store.dto.PartnerBankInfoDTO;
|
||||||
|
import com.cool.store.dto.contract.ContractCallbackDTO;
|
||||||
import com.cool.store.dto.contract.PushContractDTO;
|
import com.cool.store.dto.contract.PushContractDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
@@ -123,45 +124,47 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
OperationLogDAO operationLogDAO;
|
OperationLogDAO operationLogDAO;
|
||||||
@Resource
|
@Resource
|
||||||
ContractConfigDAO contractConfigDAO;
|
ContractConfigDAO contractConfigDAO;
|
||||||
|
@Resource
|
||||||
|
PushService pushService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean auditResult(AuditResultRequest request) {
|
public Boolean auditResult(AuditResultRequest request) {
|
||||||
log.info("SignFranchiseServiceImpl auditResult request:{}", JSONObject.toJSONString(request));
|
log.info("SignFranchiseServiceImpl auditResult request:{}", JSONObject.toJSONString(request));
|
||||||
Long shopId = getShopId(request.getKdzBusinessId());
|
// Long shopId = getShopId(request.getKdzBusinessId());
|
||||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
// ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||||
if (request.getAuditResult() == 1) {
|
// if (request.getAuditResult() == 1) {
|
||||||
shopSubStageStatusEnum = SHOP_SUB_STAGE_STATUS_84;
|
// shopSubStageStatusEnum = SHOP_SUB_STAGE_STATUS_84;
|
||||||
} else if (request.getAuditResult() == 0) {
|
// } else if (request.getAuditResult() == 0) {
|
||||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
// shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
||||||
}
|
// }
|
||||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
// ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||||
shopAuditInfoDO.setShopId(shopId);
|
// shopAuditInfoDO.setShopId(shopId);
|
||||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.SIGN_FRANCHISE.getCode());
|
// shopAuditInfoDO.setAuditType(AuditTypeEnum.SIGN_FRANCHISE.getCode());
|
||||||
shopAuditInfoDO.setSubmittedUserId("");
|
// shopAuditInfoDO.setSubmittedUserId("");
|
||||||
shopAuditInfoDO.setSubmittedUserName("");
|
// shopAuditInfoDO.setSubmittedUserName("");
|
||||||
if (Constants.ZERO_INTEGER.equals(request.getAuditResult())) {
|
// if (Constants.ZERO_INTEGER.equals(request.getAuditResult())) {
|
||||||
shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
|
// shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
|
||||||
shopAuditInfoDO.setRejectReason(request.getCause());
|
// shopAuditInfoDO.setRejectReason(request.getCause());
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
// Map<String, String> requestMap = new HashMap<>();
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
// ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
// LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
// requestMap.put("storeName", shopInfoDO.getShopName());
|
||||||
requestMap.put("partnerName", lineInfo.getUsername());
|
// requestMap.put("partnerName", lineInfo.getUsername());
|
||||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
// requestMap.put("partnerMobile", lineInfo.getMobile());
|
||||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
// requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
// requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
||||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_20, requestMap);
|
// commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_20, requestMap);
|
||||||
} else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
|
// } else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
|
||||||
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
|
// shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
|
||||||
shopAuditInfoDO.setPassReason(request.getCause());
|
// shopAuditInfoDO.setPassReason(request.getCause());
|
||||||
//校验建店与加盟签约合同是否完成 并初始化后续流程数据
|
// //校验建店与加盟签约合同是否完成 并初始化后续流程数据
|
||||||
//preparationService.contractAndBuildStoreCompletion(shopId);
|
// //preparationService.contractAndBuildStoreCompletion(shopId);
|
||||||
}
|
// }
|
||||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
// shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||||
Long auditId = shopAuditInfoDO.getId();
|
// Long auditId = shopAuditInfoDO.getId();
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, auditId);
|
// shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, auditId);
|
||||||
signFranchiseMapper.updateAuditByShopId(auditId, shopId);
|
//signFranchiseMapper.updateAuditByShopId(auditId, shopId);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,6 +364,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
||||||
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||||
//驳回
|
//驳回
|
||||||
|
ContractCallbackDTO contractCallbackDTO = null;
|
||||||
if (Constants.ZERO_INTEGER.equals(request.getAuditResult())) {
|
if (Constants.ZERO_INTEGER.equals(request.getAuditResult())) {
|
||||||
shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
|
shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
|
||||||
shopAuditInfoDO.setRejectReason(request.getCause());
|
shopAuditInfoDO.setRejectReason(request.getCause());
|
||||||
@@ -415,27 +419,33 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||||
|
|
||||||
ContractInformationDTO contractInformationDTO = new ContractInformationDTO();
|
//自营店 无缴费信息 不需要校验
|
||||||
contractInformationDTO.setShopId(shopId);
|
if (franchiseFeeDO != null){
|
||||||
contractInformationDTO.setJoinModel(shopInfoDO.getJoinMode());
|
ContractInformationDTO contractInformationDTO = new ContractInformationDTO();
|
||||||
contractInformationDTO.setShopName(shopInfoDO.getShopName());
|
contractInformationDTO.setShopId(shopId);
|
||||||
//品牌信息
|
contractInformationDTO.setJoinModel(shopInfoDO.getJoinMode());
|
||||||
contractInformationDTO.setSign1Name(signFranchiseDO.getPartnershipSignatoryFirst());
|
contractInformationDTO.setShopName(shopInfoDO.getShopName());
|
||||||
contractInformationDTO.setSign2Name(signFranchiseDO.getPartnershipSignatorySecond());
|
//品牌信息
|
||||||
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
contractInformationDTO.setSign1Name(signFranchiseDO.getPartnershipSignatoryFirst());
|
||||||
contractInformationDTO.setLoanMargin(franchiseFeeDO.getLoanMargin());
|
contractInformationDTO.setSign2Name(signFranchiseDO.getPartnershipSignatorySecond());
|
||||||
contractInformationDTO.setFirstYearManagementFee(franchiseFeeDO.getFirstYearManageFee());
|
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
||||||
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
contractInformationDTO.setLoanMargin(franchiseFeeDO.getLoanMargin());
|
||||||
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
contractInformationDTO.setFirstYearManagementFee(franchiseFeeDO.getFirstYearManageFee());
|
||||||
|
contractInformationDTO.setFirstYearFee(franchiseFeeDO.getFirstYearFee());
|
||||||
|
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
||||||
|
|
||||||
FranchiseBrandEnum enumByCode = FranchiseBrandEnum.getEnumByCode(shopInfoDO.getFranchiseBrand());
|
FranchiseBrandEnum enumByCode = FranchiseBrandEnum.getEnumByCode(shopInfoDO.getFranchiseBrand());
|
||||||
if (enumByCode != null){
|
if (enumByCode != null){
|
||||||
contractInformationDTO.setPayeeName(enumByCode.getPayeeName());
|
contractInformationDTO.setPayeeName(enumByCode.getPayeeName());
|
||||||
contractInformationDTO.setBrandOwner(enumByCode.getBrandOwner());
|
contractInformationDTO.setBrandOwner(enumByCode.getBrandOwner());
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
contractCallbackDTO = pushService.pushContract(contractInformationDTO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("推送合同信息失败", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
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);
|
||||||
@@ -460,7 +470,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
}
|
}
|
||||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||||
Long auditId = shopAuditInfoDO.getId();
|
Long auditId = shopAuditInfoDO.getId();
|
||||||
signFranchiseMapper.updateAuditByShopId(auditId, shopId);
|
signFranchiseMapper.updateAuditByShopId(auditId, shopId,contractCallbackDTO);
|
||||||
//审批记录表记录
|
//审批记录表记录
|
||||||
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||||
operationLogService.batchUpdateProcessed(operationLogs, auditId, user.getUserId(), request.getCause());
|
operationLogService.batchUpdateProcessed(operationLogs, auditId, user.getUserId(), request.getCause());
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.FoodTokenDTO;
|
import com.cool.store.dto.*;
|
||||||
import com.cool.store.dto.GetAccessTokenDTO;
|
import com.cool.store.dto.contract.ContractCallbackDTO;
|
||||||
import com.cool.store.dto.HqtTokenDTO;
|
|
||||||
import com.cool.store.dto.ModifyPasswordDTO;
|
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.DownSystemTypeEnum;
|
import com.cool.store.enums.DownSystemTypeEnum;
|
||||||
|
import com.cool.store.enums.FranchiseBrandEnum;
|
||||||
import com.cool.store.enums.MessageEnum;
|
import com.cool.store.enums.MessageEnum;
|
||||||
import com.cool.store.enums.SMSMsgEnum;
|
import com.cool.store.enums.SMSMsgEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
@@ -17,6 +16,7 @@ import com.cool.store.job.XxlJobHandler;
|
|||||||
import com.cool.store.mapper.FranchiseFeeMapper;
|
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import com.cool.store.mapper.ShopInfoMapper;
|
import com.cool.store.mapper.ShopInfoMapper;
|
||||||
|
import com.cool.store.mapper.SignFranchiseMapper;
|
||||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.request.bigdata.ProfitDataRequest;
|
import com.cool.store.request.bigdata.ProfitDataRequest;
|
||||||
@@ -99,6 +99,8 @@ public class PCTestController {
|
|||||||
LinePayService linePayService;
|
LinePayService linePayService;
|
||||||
@Resource
|
@Resource
|
||||||
LinePayDAO linePayDAO;
|
LinePayDAO linePayDAO;
|
||||||
|
@Resource
|
||||||
|
SignFranchiseMapper signFranchiseMapper;
|
||||||
|
|
||||||
@GetMapping("/syncStore")
|
@GetMapping("/syncStore")
|
||||||
public ResponseResult<Boolean> syncStore(@RequestParam("shopId")Long shopId){
|
public ResponseResult<Boolean> syncStore(@RequestParam("shopId")Long shopId){
|
||||||
@@ -393,6 +395,44 @@ public class PCTestController {
|
|||||||
return ResponseResult.success(Boolean.TRUE);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ResponseResult.success(Boolean.TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
ShopStageInfoDAO shopStageInfoDAO;
|
ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user