fix:修复细节审批问题
This commit is contained in:
parent
82f3ea7492
commit
def59eaf05
|
@ -140,7 +140,7 @@ public class OrderApplicationService {
|
|||
|
||||
// 发送 BPM 保存结果
|
||||
ApproveOrderNo approveOrderNo = routeOrder.getApproveOrderNo();
|
||||
if (!routeOrder.getOrderStatus().equals(ORDER_STATUS_PREPARE)) {
|
||||
if (routeOrder.getApproveOrderNo().getActualOrderNo() != null) {
|
||||
//这里加入一个待审批事件, 变更加入旧行程数据, 用于回滚还原
|
||||
if (checkIfNeedApprove(routeOrder)) {
|
||||
leg.addEvent(LegApprovalEvent.prepare(oldLeg));
|
||||
|
@ -158,7 +158,7 @@ public class OrderApplicationService {
|
|||
|
||||
private boolean checkIfNeedApprove(RouteOrder routeOrder) {
|
||||
Set<RoutePermission> routePermissionSet = routeOrder.getRoutePermissionSet();
|
||||
if (routePermissionSet == null) {
|
||||
if (routePermissionSet == null || routePermissionSet.isEmpty()) {
|
||||
routeApprovalDomainService.checkApprovalPermissions(routeOrder);
|
||||
}
|
||||
if (routePermissionSet == null || routePermissionSet.isEmpty() || routePermissionSet.contains(LEG_NO_APPROVAL)) {
|
||||
|
@ -190,7 +190,7 @@ public class OrderApplicationService {
|
|||
|
||||
leg.setRouteId(routeOrder.getRouteId());
|
||||
ApproveOrderNo approveOrderNo = routeOrder.getApproveOrderNo();
|
||||
if (!routeOrder.getOrderStatus().equals(ORDER_STATUS_PREPARE) && addLegData.getIfApprove() == 1) {
|
||||
if (routeOrder.getApproveOrderNo().getActualOrderNo() != null && addLegData.getIfApprove() == 1) {
|
||||
//这里加入一个待审批事件
|
||||
if (checkIfNeedApprove(routeOrder)) {
|
||||
leg.addEvent(LegApprovalEvent.prepare());
|
||||
|
|
|
@ -154,7 +154,7 @@ public class RouteApprovalDomainService {
|
|||
// 将权限映射为枚举
|
||||
Map<String, Set<RoutePermission>> approvalTypeToPermissionSet = approvalTypeToPermissions.entrySet().stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().stream()
|
||||
.flatMap(it-> Arrays.stream(it.split("&")))
|
||||
.flatMap(it -> Arrays.stream(it.split("&")))
|
||||
.distinct()
|
||||
.map(permission -> Enum.valueOf(RoutePermission.class, permission))
|
||||
.collect(Collectors.toSet())));
|
||||
|
|
Loading…
Reference in New Issue