feat:合同接口添加管理区域

This commit is contained in:
suzhuhong
2026-02-10 16:54:57 +08:00
parent ceaaa7f28e
commit 1ab6ccf7b7
2 changed files with 18 additions and 3 deletions

View File

@@ -110,4 +110,10 @@ public class ContractInformationDTO {
@ApiModelProperty("所属大区")
private String regionName;
@ApiModelProperty("加盟分部(归属分部)")
private String investRegionName;
@ApiModelProperty("所属子区域(归属区域)")
private String subRegionName;
}

View File

@@ -706,7 +706,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
RegionDO region = regionDao.getRegionById(shopInfoDO.getRegionId());
List<Long> regionIds = Arrays.asList(shopInfoDO.getRegionId(), shopInfoDO.getInvestRegionId(), shopInfoDO.getManagerRegionId());
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
@@ -751,9 +753,16 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
contractInformationDTO.setStoreAddress(shopInfoDO.getDetailAddress());
contractInformationDTO.setDiscountReason(franchiseFeeDO.getDiscountReason());
if (region != null){
contractInformationDTO.setRegionName(region.getName());
if (shopInfoDO.getRegionId()!=null){
contractInformationDTO.setRegionName(regionNameMap.get(shopInfoDO.getRegionId()));
}
if (shopInfoDO.getInvestRegionId()!=null){
contractInformationDTO.setInvestRegionName(regionNameMap.get(shopInfoDO.getInvestRegionId()));
}
if (shopInfoDO.getRegionId()!=null){
contractInformationDTO.setSubRegionName(regionNameMap.get(shopInfoDO.getManagerRegionId()));
}
//老店转加盟(也叫直营转加盟)
if (SignTypeEnum.DIRECT_SALES_TO_JOINING.getCode().equals(signFranchiseDO.getSignType())){