From 5ebc8607f9bbcb0b2890f778e1e1d040747022f3 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Thu, 11 Jul 2024 10:52:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=AD=BE=E8=AF=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8A=A0=E6=80=A5=E5=9B=9E=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/dtos/trip/ScheduleDetail.java | 15 +++++++++++++++ .../chint/application/queryies/OrderQuery.java | 9 +++++++++ .../aggregates/approval/ApprovalMethod.java | 5 +++++ .../aggregates/approval/ApprovalProcess.java | 3 ++- .../aggregates/approval/ApprovalRecord.java | 7 +++++++ .../service/supplier/SupplierServiceImpl.java | 5 ++++- .../infrastructure/constant/LegConstant.java | 2 ++ 7 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/chint/domain/aggregates/approval/ApprovalMethod.java diff --git a/src/main/java/com/chint/application/dtos/trip/ScheduleDetail.java b/src/main/java/com/chint/application/dtos/trip/ScheduleDetail.java index 2229ee18..1eb6d774 100644 --- a/src/main/java/com/chint/application/dtos/trip/ScheduleDetail.java +++ b/src/main/java/com/chint/application/dtos/trip/ScheduleDetail.java @@ -125,6 +125,10 @@ public class ScheduleDetail { private String amountTypeName; @JsonProperty("AmountTypeEnName") private String amountTypeEnName; + @JsonProperty("AmountDescription") + private String amountDescription; + @JsonProperty("amountDescription") + private String amountDescription2; @JsonProperty("ExpenseExplanation") private String expenseExplanation; @JsonProperty("OriginDescription") @@ -175,6 +179,17 @@ public class ScheduleDetail { return this; } + + public ScheduleDetailBuilder amountDescription(String amountDescription) { + scheduleDetail.setAmountDescription(amountDescription); + return this; + } + + public ScheduleDetailBuilder amountDescription2(String amountDescription2) { + scheduleDetail.setAmountDescription2(amountDescription2); + return this; + } + public ScheduleDetailBuilder originDescription(String originDescription) { scheduleDetail.setOriginDescription(originDescription); return this; diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index f0c16d39..ad80ab11 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -469,7 +469,16 @@ public class OrderQuery { scheduleDetailBuilder .locationList(locationList1.stream().map(LocationRes::copyFrom).toList()); } + + Integer amountType = legExtensionField.getAmountType(); + if (amountType != null && amountType.equals(LEG_OTHER_AMOUNT_TYPE_VISA)) { + scheduleDetailBuilder.amountDescription("类型:" + + legExtensionField.getExtension() + " 理由:" + + legExtensionField.getExpenseExplanation()); + } } + + return scheduleDetailBuilder .scheduleNum(leg.getLegNo()) .scheduleType(translateLegType(leg.getLegType())) diff --git a/src/main/java/com/chint/domain/aggregates/approval/ApprovalMethod.java b/src/main/java/com/chint/domain/aggregates/approval/ApprovalMethod.java new file mode 100644 index 00000000..52ce97bf --- /dev/null +++ b/src/main/java/com/chint/domain/aggregates/approval/ApprovalMethod.java @@ -0,0 +1,5 @@ +package com.chint.domain.aggregates.approval; + +public enum ApprovalMethod { + NOTIFY, APPROVE +} diff --git a/src/main/java/com/chint/domain/aggregates/approval/ApprovalProcess.java b/src/main/java/com/chint/domain/aggregates/approval/ApprovalProcess.java index c686360b..0e53a266 100644 --- a/src/main/java/com/chint/domain/aggregates/approval/ApprovalProcess.java +++ b/src/main/java/com/chint/domain/aggregates/approval/ApprovalProcess.java @@ -24,6 +24,8 @@ public abstract class ApprovalProcess { public ApprovalType approvalType; + private ApprovalMethod approvalMethod; + public ApprovalProcess(ApprovalPlatform bpmPlatform) { this.bpmPlatform = bpmPlatform; } @@ -99,7 +101,6 @@ public abstract class ApprovalProcess { // 通用的通知方法 public void notifyUser(String message) { - // 发送通知的逻辑 System.out.println("Notify user: " + message); } diff --git a/src/main/java/com/chint/domain/aggregates/approval/ApprovalRecord.java b/src/main/java/com/chint/domain/aggregates/approval/ApprovalRecord.java index 813ea91d..e3e5d203 100644 --- a/src/main/java/com/chint/domain/aggregates/approval/ApprovalRecord.java +++ b/src/main/java/com/chint/domain/aggregates/approval/ApprovalRecord.java @@ -63,6 +63,10 @@ public class ApprovalRecord implements Serializable { return 1; } + public static Integer notifyApprovalStatus() { + return 2; + } + public static Integer rejectApprovalStatus() { return -1; } @@ -74,6 +78,9 @@ public class ApprovalRecord implements Serializable { if (Objects.equals(this.approvalStatus, successApprovalStatus())) { return "已通过"; } + if (Objects.equals(this.approvalStatus, notifyApprovalStatus())) { + return "已知会"; + } if (Objects.equals(this.approvalStatus, rejectApprovalStatus())) { return "已驳回"; } diff --git a/src/main/java/com/chint/domain/service/supplier/SupplierServiceImpl.java b/src/main/java/com/chint/domain/service/supplier/SupplierServiceImpl.java index f871639a..0cee3975 100644 --- a/src/main/java/com/chint/domain/service/supplier/SupplierServiceImpl.java +++ b/src/main/java/com/chint/domain/service/supplier/SupplierServiceImpl.java @@ -297,7 +297,10 @@ public class SupplierServiceImpl implements SupplierService { orderEventType.equals(ORDER_EVENT_REFUND); } - private List handleSpecialEvent(OrderDetail orderDetail, OrderStatusChangeCommand command, Integer orderEventType, Object outOrderDetailData) { + private List handleSpecialEvent(OrderDetail orderDetail, + OrderStatusChangeCommand command, + Integer orderEventType, + Object outOrderDetailData) { // orderDetail.getExtensionDataByProductType(); //异步推送审批流 CompletableFuture.runAsync(() -> sendBPMAuditCommand(orderDetail, command, orderEventType)); diff --git a/src/main/java/com/chint/infrastructure/constant/LegConstant.java b/src/main/java/com/chint/infrastructure/constant/LegConstant.java index dd0a4dfb..638cd6f7 100644 --- a/src/main/java/com/chint/infrastructure/constant/LegConstant.java +++ b/src/main/java/com/chint/infrastructure/constant/LegConstant.java @@ -33,6 +33,8 @@ public class LegConstant { public static final String LEG_APPROVAL_STATUS_SUCCESS_NAME = "已通过"; public static final int LEG_APPROVAL_STATUS_REJECT = 3; public static final String LEG_APPROVAL_STATUS_REJECT_NAME = "已驳回"; + public static final int LEG_APPROVAL_STATUS_NOTIFY = 4; + public static final String LEG_APPROVAL_STATUS_NOTIFY_NAME = "已知会"; // 规划节点运输方式