feat:老店新开特殊处理

This commit is contained in:
苏竹红
2025-10-10 10:06:11 +08:00
parent 59ca00cc2d
commit 89e9cf3b57
7 changed files with 35 additions and 4 deletions

View File

@@ -62,6 +62,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
private EnterpriseUserRoleDao enterpriseUserRoleDao;
@Resource
SignFranchiseMapper signFranchiseMapper;
@Resource
SignFranchiseDAO signFranchiseDAO;
@Resource
UserAuthMappingService userAuthMappingService;
@@ -227,7 +229,11 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
//如果已经签约 修改之后从新推送数据
ContractCallbackDTO contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
if (!Objects.isNull(contractCallbackDTO)){
signFranchiseMapper.updateAuditByShopId(null, request.getShopId(),contractCallbackDTO);
if (StringUtils.isNoneEmpty(contractCallbackDTO.getStoreCode())){
shopInfoDO.setShopCode(contractCallbackDTO.getStoreCode());
shopInfoDAO.updateShopInfo(shopInfoDO);
}
signFranchiseDAO.updateAuditByShopId(null, request.getShopId(),contractCallbackDTO);
}
}
@@ -451,7 +457,11 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
}
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
Long auditId = shopAuditInfoDO.getId();
signFranchiseMapper.updateAuditByShopId(auditId, shopId,contractCallbackDTO);
if (contractCallbackDTO!=null&&StringUtils.isNotEmpty(contractCallbackDTO.getStoreCode())){
shopInfoDO.setShopCode(contractCallbackDTO.getStoreCode());
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
}
signFranchiseDAO.updateAuditByShopId(auditId, shopId,contractCallbackDTO);
//审批记录表记录
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());
@@ -495,6 +505,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
contractInformationDTO.setFirstYearManagementFee(franchiseFeeDO.getFirstYearManageFee());
contractInformationDTO.setYearFranchiseFee(franchiseFeeDO.getYearFranchiseFee());
contractInformationDTO.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
contractInformationDTO.setOldShopCode(signFranchiseDO.getOldShopCode());
FranchiseBrandEnum enumByCode = FranchiseBrandEnum.getEnumByCode(shopInfoDO.getFranchiseBrand());
if (enumByCode != null){