diff --git a/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java b/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java index 3ceac25f..264f72d3 100644 --- a/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java +++ b/src/main/java/com/chint/domain/aggregates/approval/platform/ApprovalPlatformAN.java @@ -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()); diff --git a/src/main/java/com/chint/domain/service/RouteApprovalDomainService.java b/src/main/java/com/chint/domain/service/RouteApprovalDomainService.java index 682d568d..8f37b4ea 100644 --- a/src/main/java/com/chint/domain/service/RouteApprovalDomainService.java +++ b/src/main/java/com/chint/domain/service/RouteApprovalDomainService.java @@ -135,16 +135,20 @@ public class RouteApprovalDomainService { String approvalType = systemOrganizationRepository.findByOrgCodeContainingOrOrgNameContaining(approveOrderNo.getAccountCompany(), approveOrderNo.getAccountCompany()).map(SystemOrganization::getApprovalType).orElseGet( () -> systemCodeRepository.findBySysCode(approveOrderNo.getSysCode()).getApprovalType()); - routeOrder.setRoutePermissionSet( - permissionConfigRepository.findByPermissionName(approvalType) - .map(permissionConfig -> { - List permissions = permissionConfig.permissions(); - return permissions.stream() - .distinct() - .map(permission -> Enum.valueOf(RoutePermission.class, permission)) - .collect(Collectors.toSet()); - }).orElseGet(Set::of) - ); + if(approvalType != null){ + routeOrder.setRoutePermissionSet( + permissionConfigRepository.findByPermissionName(approvalType) + .map(permissionConfig -> { + List permissions = permissionConfig.permissions(); + return permissions.stream() + .distinct() + .map(permission -> Enum.valueOf(RoutePermission.class, permission)) + .collect(Collectors.toSet()); + }).orElseGet(Set::of) + ); + } else { + routeOrder.setRoutePermissionSet(Collections.emptySet()); + } return routeOrder; }