fix:审批功能重构-安能添加行程和变更行程-细节问题修复
This commit is contained in:
parent
708226b3c8
commit
2ba217d23d
|
@ -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());
|
||||
|
|
|
@ -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<String> 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<String> 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue