fix:修复细节审批问题

This commit is contained in:
lulz1 2024-07-12 14:43:20 +08:00
parent 82f3ea7492
commit def59eaf05
2 changed files with 4 additions and 4 deletions

View File

@ -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());