From 1d9cfc91e7255b9e139b20ff230cb19246f19193 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 09 十一月 2026 14:32:11 +0800
Subject: [PATCH] refactor(erp): 重构ERP单据单号生成逻辑以支持冲突重试
---
yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderRespVO.java | 95 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 78 insertions(+), 17 deletions(-)
diff --git a/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderRespVO.java b/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderRespVO.java
index 59a9ae9..ca6b241 100644
--- a/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderRespVO.java
+++ b/yudao-module-erp/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/sale/vo/order/ErpSaleOrderRespVO.java
@@ -2,6 +2,7 @@
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
+import cn.iocoder.yudao.module.system.api.storage.dto.StorageBlobRespDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@@ -29,7 +30,7 @@
@Schema(description = "瀹㈡埛缂栧彿", requiredMode = Schema.RequiredMode.REQUIRED, example = "1724")
private Long customerId;
- @Schema(description = "瀹㈡埛鍚嶇О", example = "鑺嬮亾")
+ @Schema(description = "瀹㈡埛鍚嶇О", example = "瓒呯骇绠$悊鍛�")
@ExcelProperty("瀹㈡埛鍚嶇О")
private String customerName;
@@ -38,6 +39,11 @@
@Schema(description = "鍚堝悓鍗曞彿", example = "HT001")
@ExcelProperty("鍚堝悓鍗曞彿")
private String contractNo;
+
+ @Schema(description = "閿�鍞被鍨嬶細1鍐呴攢 2澶栭攢 3鏍峰搧 4鍏朵粬", example = "1")
+ @ExcelProperty(value = "閿�鍞被鍨�", converter = cn.iocoder.yudao.framework.excel.core.convert.DictConvert.class)
+ @cn.iocoder.yudao.framework.excel.core.annotations.DictFormat(cn.iocoder.yudao.module.erp.enums.DictTypeConstants.SALES_TYPE)
+ private Integer saleType;
@Schema(description = "缁撶畻璐︽埛缂栧彿", requiredMode = Schema.RequiredMode.REQUIRED, example = "311.89")
@ExcelProperty("缁撶畻璐︽埛缂栧彿")
@@ -49,6 +55,10 @@
@Schema(description = "涓嬪崟鏃堕棿", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("涓嬪崟鏃堕棿")
private LocalDateTime orderTime;
+
+ @Schema(description = "鏀舵鏃ユ湡锛堢敤浜� 30 澶╄处鏈熸彁閱掞級")
+ @ExcelProperty("鏀舵鏃ユ湡")
+ private LocalDateTime receiptDate;
@Schema(description = "鍚堣鏁伴噺", requiredMode = Schema.RequiredMode.REQUIRED, example = "15663")
@ExcelProperty("鍚堣鏁伴噺")
@@ -72,17 +82,19 @@
@Schema(description = "瀹氶噾閲戦锛屽崟浣嶏細鍏�", requiredMode = Schema.RequiredMode.REQUIRED, example = "7127")
private BigDecimal depositPrice;
- @Schema(description = "闄勪欢鍦板潃", example = "https://www.iocoder.cn")
- @ExcelProperty("闄勪欢鍦板潃")
- private String fileUrl;
-
@Schema(description = "澶囨敞", example = "浣犵寽")
@ExcelProperty("澶囨敞")
private String remark;
- @Schema(description = "鍒涘缓浜�", example = "鑺嬮亾")
+ @Schema(description = "BPM 娴佺▼瀹炰緥缂栧彿", example = "b00eb97d-2d1c-4cf1-9b4b-2a5bcdc9a3a7")
+ private String processInstanceId;
+
+ @Schema(description = "闄勪欢鍒楄〃")
+ private List<StorageBlobRespDTO> attachmentList;
+
+ @Schema(description = "鍒涘缓浜�", example = "瓒呯骇绠$悊鍛�")
private String creator;
- @Schema(description = "鍒涘缓浜哄悕绉�", example = "鑺嬮亾")
+ @Schema(description = "鍒涘缓浜哄悕绉�", example = "瓒呯骇绠$悊鍛�")
private String creatorName;
@Schema(description = "鍒涘缓鏃堕棿", requiredMode = Schema.RequiredMode.REQUIRED)
@@ -96,15 +108,40 @@
@ExcelProperty("浜у搧淇℃伅")
private String productNames;
+ @Schema(description = "浜у搧缂栧彿锛堣鍗曢」鐗╂枡缂栫爜锛屽琛屼互閫楀彿鍒嗛殧锛�", example = "ITEM001,ITEM002")
+ @ExcelProperty("浜у搧缂栧彿")
+ private String productCodes;
+
+ @Schema(description = "宸茬敓浜ф暟閲忥紙鎸夎鍗曢」鍏宠仈鐨� MPS 宸茬敓浜ф暟閲忓悎璁★級", example = "100.00")
+ @ExcelProperty("鐢熶骇鏁伴噺")
+ private BigDecimal producedCount;
+
// ========== 閿�鍞嚭搴� ==========
- @Schema(description = "閿�鍞嚭搴撴暟閲�", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
+ @Schema(description = "閿�鍞嚭搴撴暟閲�", example = "100.00")
private BigDecimal outCount;
- // ========== 閿�鍞��璐э紙鍑哄簱锛夛級 ==========
+ @Schema(description = "鍑哄簱鐘舵��", example = "0")
+ private Integer outStatus;
- @Schema(description = "閿�鍞��璐ф暟閲�", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
- private BigDecimal returnCount;
+ // ========== 鍙戣揣閫氱煡 ==========
+
+ @Schema(description = "鏄惁宸茬敓鎴愬彂璐ч�氱煡鍗�", example = "false")
+ private Boolean hasSalesNotice;
+
+ @Schema(description = "鏄惁鍙互鐢熸垚鍙戣揣閫氱煡鍗曪紙鏈夐渶瑕佺敓浜т笖鏈畬鎴愮殑鏄庣粏鏃朵负 false锛�", example = "true")
+ private Boolean canCreateSalesNotice;
+
+ @Schema(description = "鏄惁鏈夐渶瑕佺敓浜х殑鏄庣粏锛�0=鍚� 1=鏄級", example = "1")
+ private Integer needProduction;
+
+ // ========== 鐢熶骇鍏宠仈 ==========
+
+ @Schema(description = "鐢熶骇鐘舵�侊細0-鏈畬鎴愶紝1-宸插畬鎴�", example = "1")
+ private Integer productionStatus;
+
+ @Schema(description = "鐢熶骇瀹屾垚鏃堕棿")
+ private LocalDateTime productionFinishTime;
@Data
public static class Item {
@@ -114,6 +151,9 @@
@Schema(description = "浜у搧缂栧彿", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
private Long productId;
+
+ @Schema(description = "閿�鍞骇鍝佹槑缁嗘墜宸ュ綍鍏ョ殑鐩樺彿")
+ private String reelNo;
@Schema(description = "浜у搧鍗曚綅鍗曚綅", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
private Long productUnitId;
@@ -131,31 +171,52 @@
@Schema(description = "绋庨锛屽崟浣嶏細鍏�", example = "100.00")
private BigDecimal taxPrice;
+ @Schema(description = "浜у搧閲戦锛屽崟浣嶏細鍏�", example = "100.00")
+ private BigDecimal totalProductPrice;
+
+ @Schema(description = "鍚◣閲戦锛屽崟浣嶏細鍏�", example = "113.00")
+ private BigDecimal totalPrice;
+
@Schema(description = "澶囨敞", example = "闅忎究")
private String remark;
// ========== 閿�鍞嚭搴� ==========
- @Schema(description = "閿�鍞嚭搴撴暟閲�", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
+ @Schema(description = "閿�鍞嚭搴撴暟閲�", example = "100.00")
private BigDecimal outCount;
- // ========== 閿�鍞��璐э紙鍏ュ簱锛夛級 ==========
+ // ========== 鐢熶骇鍏宠仈 ==========
- @Schema(description = "閿�鍞��璐ф暟閲�", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
- private BigDecimal returnCount;
+ @Schema(description = "鏄惁闇�瑕佺敓浜э紙0=鍚� 1=鏄級", example = "1")
+ private Integer needProduction;
+
+ @Schema(description = "鍏宠仈鐨� MPS 缂栧彿", example = "1024")
+ private Long mpsId;
+
+ // ========== 鍑哄簱鎵瑰彿 ==========
+
+ @Schema(description = "鍑哄簱鎵瑰彿", example = "B2026001銆丅2026002")
+ private String batchCode;
// ========== 鍏宠仈瀛楁 ==========
@Schema(description = "浜у搧鍚嶇О", requiredMode = Schema.RequiredMode.REQUIRED, example = "宸у厠鍔�")
private String productName;
+ @Schema(description = "浜у搧缂栧彿锛堢墿鏂欑紪鐮侊級", example = "ITEM001")
+ private String productCode;
+ @Schema(description = "宸茬敓浜ф暟閲�", example = "60.00")
+ private BigDecimal quantityProduced;
@Schema(description = "浜у搧鏉$爜", requiredMode = Schema.RequiredMode.REQUIRED, example = "A9985")
private String productBarCode;
@Schema(description = "浜у搧鍗曚綅鍚嶇О", requiredMode = Schema.RequiredMode.REQUIRED, example = "鐩�")
private String productUnitName;
@Schema(description = "搴撳瓨鏁伴噺", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
- private BigDecimal stockCount; // 璇ュ瓧娈典粎浠呭湪鈥滆鎯呪�濆拰鈥滅紪杈戔�濇椂浣跨敤
+ private BigDecimal stockCount; // 璇ュ瓧娈典粎浠呭湪璇︽儏鍜岀紪杈戞椂浣跨敤
+
+ @Schema(description = "瑙勬牸鍨嬪彿", requiredMode = Schema.RequiredMode.REQUIRED, example = "-")
+ private String productSpecification;
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3