fix:加盟合同财务阶段 财务之后推送 默认一小时自动分配

This commit is contained in:
suzhuhong
2026-01-21 19:04:44 +08:00
parent 399e46033f
commit dc22d18322

View File

@@ -257,9 +257,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83, operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83,
user.getUserId(), auditFranchiseFeeUsers, user.getUserId(), auditFranchiseFeeUsers,
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED, 1); OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED, 1);
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83_5,
user.getUserId(), financeUsers,
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同财务审批", OperationStatusEnum.NOT_PROCESSED, 2);
} else { } else {
//修改签约人信息 //修改签约人信息
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO); signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
@@ -337,9 +334,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83, operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83,
user.getUserId(), userIds, user.getUserId(), userIds,
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED, 1); OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同审批", OperationStatusEnum.NOT_PROCESSED, 1);
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83_5,
user.getUserId(), financeUsers,
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同财务审批", OperationStatusEnum.NOT_PROCESSED, 2);
return Boolean.TRUE; return Boolean.TRUE;
} }
@@ -464,6 +458,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())) {
auditReject(request, shopAuditInfoDO, shopInfoDO); auditReject(request, shopAuditInfoDO, shopInfoDO);
} else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) { } else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
@@ -472,7 +467,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
//更新状态为加盟商 //更新状态为加盟商
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_83_5); shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_83_5);
//推送数据
contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
Boolean sendNotice = Boolean.TRUE; Boolean sendNotice = Boolean.TRUE;
if (sendNotice) { if (sendNotice) {
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
@@ -484,6 +480,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
if (Objects.nonNull(userDOList)) { if (Objects.nonNull(userDOList)) {
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList())); finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
} }
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83_5,
user.getUserId(), userDOList,
OperationTypeEnum.OPERATION_TYPE_1, "加盟签约合同财务审批", OperationStatusEnum.NOT_PROCESSED, 2);
commonService.sendQWMessage(finances, commonService.sendQWMessage(finances,
MessageEnum.MESSAGE_19_1, MessageEnum.MESSAGE_19_1,
map); map);
@@ -491,7 +490,11 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
} }
shopAuditInfoMapper.insertSelective(shopAuditInfoDO); shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
Long auditId = shopAuditInfoDO.getId(); Long auditId = shopAuditInfoDO.getId();
signFranchiseDAO.updateAuditByShopId(auditId, shopId); 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()); 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());
@@ -557,7 +560,6 @@ 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())) {
auditReject(request, shopAuditInfoDO, shopInfoDO); auditReject(request, shopAuditInfoDO, shopInfoDO);
} else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) { } else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
@@ -590,7 +592,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
shopDecorationAssignDO.setShopId(shopId); shopDecorationAssignDO.setShopId(shopId);
shopDecorationAssignDAO.insert(shopDecorationAssignDO); shopDecorationAssignDAO.insert(shopDecorationAssignDO);
//新增一个延迟队列 四个小时之后确定是否手动分配 没有手动分配 直接自动分配 红圈通推送和下一个流程开始改为分配团队之后 触发 //新增一个延迟队列 四个小时之后确定是否手动分配 没有手动分配 直接自动分配 红圈通推送和下一个流程开始改为分配团队之后 触发
simpleMessageService.send(String.valueOf(shopDecorationAssignDO.getId()), RocketMqTagEnum.DELAY_SHOP_DECORATION_ASSIGN, System.currentTimeMillis() + 4 * 60 * 60 * 1000); simpleMessageService.send(String.valueOf(shopDecorationAssignDO.getId()), RocketMqTagEnum.DELAY_SHOP_DECORATION_ASSIGN, System.currentTimeMillis() + 1 * 60 * 60 * 1000);
} }
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER); shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
shopAuditInfoDO.setPassReason(request.getCause()); shopAuditInfoDO.setPassReason(request.getCause());
@@ -616,8 +618,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
preparationService.contractAndBuildStoreCompletion(request.getShopId()); preparationService.contractAndBuildStoreCompletion(request.getShopId());
} }
//推送数据
contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
Boolean sendNotice = Boolean.TRUE; Boolean sendNotice = Boolean.TRUE;
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT); commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
@@ -633,11 +633,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
} }
shopAuditInfoMapper.insertSelective(shopAuditInfoDO); shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
Long auditId = shopAuditInfoDO.getId(); Long auditId = shopAuditInfoDO.getId();
if (contractCallbackDTO != null && StringUtils.isNotEmpty(contractCallbackDTO.getStoreCode())) { signFranchiseDAO.updateAuditByShopId(auditId, shopId);
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_5, OperationTypeEnum.OPERATION_TYPE_1.getCode()); List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83_5, OperationTypeEnum.OPERATION_TYPE_1.getCode());
operationLogService.batchUpdateProcessed(operationLogs, auditId, user.getUserId(), request.getCause()); operationLogService.batchUpdateProcessed(operationLogs, auditId, user.getUserId(), request.getCause());