fix:审批功能重构-安能添加行程和变更行程-细节问题修复

This commit is contained in:
lulz1 2024-07-02 14:48:42 +08:00
parent 708226b3c8
commit 2ba217d23d
2 changed files with 15 additions and 11 deletions

View File

@ -108,7 +108,7 @@ public class ApprovalPlatformAN implements ApprovalPlatform {
approvalScheduleParam.setSourceSystem(systemNum());
RouteOrder routeOrder = approvalData.getRouteOrder();
ApproveOrderNo approveOrderNo = routeOrder.getApproveOrderNo();
approvalScheduleParam.setSourceSystemNum(legChangeTag() + routeOrder.getRouteOrderNo());
approvalScheduleParam.setSourceSystemNum(approvalData.getApprovalRecordNo());
approvalScheduleParam.setApplicant(routeOrder.getUserId());
approvalScheduleParam.setApplicantDate(DateTimeUtil.timeToStr(LocalDateTime.now()));
approvalScheduleParam.setApplyNo(approveOrderNo.getActualOrderNo());

View File

@ -135,6 +135,7 @@ public class RouteApprovalDomainService {
String approvalType = systemOrganizationRepository.findByOrgCodeContainingOrOrgNameContaining(approveOrderNo.getAccountCompany(),
approveOrderNo.getAccountCompany()).map(SystemOrganization::getApprovalType).orElseGet(
() -> systemCodeRepository.findBySysCode(approveOrderNo.getSysCode()).getApprovalType());
if(approvalType != null){
routeOrder.setRoutePermissionSet(
permissionConfigRepository.findByPermissionName(approvalType)
.map(permissionConfig -> {
@ -145,6 +146,9 @@ public class RouteApprovalDomainService {
.collect(Collectors.toSet());
}).orElseGet(Set::of)
);
} else {
routeOrder.setRoutePermissionSet(Collections.emptySet());
}
return routeOrder;
}