Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
zhangchenbiao
2024-05-08 14:58:54 +08:00
4 changed files with 22 additions and 24 deletions

View File

@@ -91,19 +91,16 @@ public class SubmitLicenseResponse {
@ApiModelProperty("流程记录")
private List<ShopAuditInfoVO> processRecords;
public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode){
if (Objects.isNull(storeInfoCode)){
return null;
public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode,
SubmitLicenseResponse submitLicenseResponse){
if (Objects.isNull(submitLicenseResponse)){
submitLicenseResponse = new SubmitLicenseResponse();
}
GetStoreInfoByCodeResponse.InnerData data = storeInfoCode.getData();
GetStoreInfoByCodeResponse.StoreDocument storeDocument = data.getStoreDocument();
GetStoreInfoByCodeResponse.StoreDocument storeDocument = storeInfoCode.getData().getStoreDocument();
boolean storeBusinessValidPeriod = storeDocument.getStoreBusinessValidPeriod().equals("9");
SubmitLicenseResponse submitLicenseResponse = new SubmitLicenseResponse();
submitLicenseResponse.setId(null);
submitLicenseResponse.setShopId(null);
submitLicenseResponse.setLicenseType(LicenseTypeEnum.matchName(storeDocument.getStoreBusinessType()).getCode());
submitLicenseResponse.setLicenseLegalPerson(storeDocument.getStoreDirector());
submitLicenseResponse.setIssueTime(DateUtil.parseTime(storeDocument.getStoreBusinessDate()));
submitLicenseResponse.setIssueTime(DateUtil.parseDate(storeDocument.getStoreBusinessDate()));
submitLicenseResponse.setLicenseAddress(storeDocument.getStoreBusinessAdd());
submitLicenseResponse.setValidity(storeBusinessValidPeriod ? null : DateUtil.parseTime(storeDocument.getStoreBusinessValidPeriod()));
submitLicenseResponse.setOperator(storeDocument.getStoreDirector());
@@ -111,18 +108,14 @@ public class SubmitLicenseResponse {
submitLicenseResponse.setMainBusiness(storeDocument.getStoreFoodLicenseMainBusiness());
submitLicenseResponse.setBusinessProject(storeDocument.getStoreFoodLicenseBusinessScope());
submitLicenseResponse.setRemark(storeDocument.getStoreRemark());
submitLicenseResponse.setRemarkUrl(null);
submitLicenseResponse.setSubmitStatus(null);
submitLicenseResponse.setLicenseUrl(storeDocument.getStoreBusinessImg());
submitLicenseResponse.setLicenseName(storeDocument.getStoreBusinessName());
submitLicenseResponse.setSocialCreditCode(storeDocument.getStoreBusinessNumber());
submitLicenseResponse.setIdCardAndLicense1(null);
submitLicenseResponse.setIdCardAndLicense2(null);
submitLicenseResponse.setFoodLicenseUrl(storeDocument.getStoreFoodLicenseImg());
submitLicenseResponse.setBusinessPremises(storeDocument.getStoreFoodLicenseBusinessAddress());
submitLicenseResponse.setFoodLicenseCode(storeDocument.getStoreFoodLicense());
submitLicenseResponse.setFoodLicenseStartTime(DateUtil.parseTime(storeDocument.getStoreFoodLicenseBeginDate()));
submitLicenseResponse.setFoodLicenseEndTime(DateUtil.parseTime(storeDocument.getStoreFoodLicenseEndDate()));
submitLicenseResponse.setFoodLicenseStartTime(DateUtil.parseDate(storeDocument.getStoreFoodLicenseBeginDate()));
submitLicenseResponse.setFoodLicenseEndTime(DateUtil.parseDate(storeDocument.getStoreFoodLicenseEndDate()));
return submitLicenseResponse;
}

View File

@@ -15,7 +15,7 @@ public class PreparationCommonPendingVO {
private String storeName;
@ApiModelProperty("门店负责人名称")
private String shopManagerUserName;
@ApiModelProperty("招商经理名称")
@ApiModelProperty("加盟商名称")
private String partnerName;
@ApiModelProperty("手机号")
private String partnerPhone;

View File

@@ -107,8 +107,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
@Override
public SubmitLicenseResponse getDefault(Long shopId) {
//todo 业务逻辑问题 @zhy
//1.如果已经提交过证照信息,直接查询后组装数据返回
//1.如果已经提交过证照信息,直接查询后组装数据
LicenseTransactDO result = applyLicenseMapper.selectByShopId(shopId);
SubmitLicenseResponse submitLicenseResponse = new SubmitLicenseResponse();
if (Objects.nonNull(result)){
@@ -131,19 +130,19 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
});
}
submitLicenseResponse.setProcessRecords(listByShopIdAndType);
return submitLicenseResponse;
}
//2.未查到证照信息,所以查询鲜丰的默认值
//2.未查到证照信息,所以查询鲜丰的默认值(只要鲜丰接口内有值,总是优先使用鲜丰数据)
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
if (Objects.nonNull(shopInfoDO.getStoreNum())) {
GetStoreInfoByCodeResponse storeInfoCode = coolStoreStartFlowService.getStoreInfoCode(shopInfoDO.getStoreNum());
if (Objects.nonNull(storeInfoCode) && Objects.nonNull(storeInfoCode.getData()) && storeInfoCode.getCode() == 0) {
submitLicenseResponse = SubmitLicenseResponse.from(storeInfoCode);
if (Objects.nonNull(storeInfoCode.getData().getStoreDocument()) && storeInfoCode.getCode() == 0) {
//替换落库的值
submitLicenseResponse = SubmitLicenseResponse.from(storeInfoCode,submitLicenseResponse);
return submitLicenseResponse;
}
}
//3.既没有提交数据,也没有在鲜丰端查到证照信息,则返回空自由填写
return null;
return submitLicenseResponse;
}
@Override

View File

@@ -312,6 +312,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
//线索信息
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
//加盟问卷信息
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(shopInfoDO.getLineId());
//缴费信息
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectOne(FranchiseFeeDO.builder().shopId(shopId).build());
//线索id
@@ -371,7 +373,11 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
addSignFranchiseResponse.setPartnerName(lineInfoDO.getUsername());
}
if (Objects.nonNull(signingBaseInfoDO)){
addSignFranchiseResponse.setIdCardNo(signingBaseInfoDO.getIdCardNo());
if (JoinTypeEnum.JOIN_TYPE_ONE.getCode().equals(memberQuestionDO.getJoinType())){
addSignFranchiseResponse.setIdCardNo(signingBaseInfoDO.getIdCardNo());
}else if (JoinTypeEnum.JOIN_TYPE_TWO.getCode().equals(memberQuestionDO.getJoinType())){
addSignFranchiseResponse.setIdCardNo(signingBaseInfoDO.getBusinessLicenseCode());
}
addSignFranchiseResponse.setIdCardAddress(signingBaseInfoDO.getIdCardAddress());
}
if (Objects.nonNull(franchiseFeeDO)){