From 6b4cfc6f9d660b92be99ba4e3411a3267bc57155 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期六, 18 四月 2026 15:24:33 +0800
Subject: [PATCH] feat: 销售/采购订单的扫码合格/不合格出入库功能
---
src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java b/src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java
index 02d5080..6bb145e 100644
--- a/src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java
+++ b/src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java
@@ -72,8 +72,22 @@
*/
@Excel(name = "鏁伴噺")
private BigDecimal quantity;
+
+ /**
+ * 宸插叆搴撴暟閲�
+ */
+ private BigDecimal stockedQuantity;
+
@Excel(name = "鏈�浣庡簱瀛樻暟閲�")
private BigDecimal minStock;
+
+ /**
+ * 鍓╀綑寰呭叆搴撴暟閲忥紙璁㈠崟鏁伴噺 鈭� 鍚堟牸宸插叆搴撴暟閲忥紝澶氬叆鏃惰涓� 0锛�
+ */
+ @Excel(name = "鍓╀綑鏁伴噺")
+ @ApiModelProperty("鍓╀綑寰呭叆搴撴暟閲�(璁㈠崟鏁伴噺-鍚堟牸宸插叆搴�)")
+ private BigDecimal remainingQuantity;
+
/**
* 绋庣巼
*/
@@ -293,9 +307,9 @@
private String floorCode;
/**
- * 浜у搧鍏ュ簱鐘舵�� 0-鏈叆搴擄紝1-宸插叆搴�
+ * 浜у搧鍏ュ簱鐘舵�侊細0-鏈叆搴擄紝1-閮ㄥ垎鍏ュ簱锛�2-宸插叆搴�
*/
- @ApiModelProperty("浜у搧鍏ュ簱鐘舵��")
+ @ApiModelProperty("浜у搧鍏ュ簱鐘舵�侊細0-鏈叆搴擄紝1-閮ㄥ垎鍏ュ簱锛�2-宸插叆搴�")
private Integer productStockStatus;
@TableField(exist = false)
@@ -312,4 +326,12 @@
// 鍙敤鏁伴噺 quantity - returnQuality
@TableField(exist = false)
private BigDecimal availableQuality;
+
+
+ public void fillRemainingQuantity() {
+ BigDecimal q = this.quantity == null ? BigDecimal.ZERO : this.quantity;
+ BigDecimal stocked = this.stockedQuantity == null ? BigDecimal.ZERO : this.stockedQuantity;
+ BigDecimal rem = q.subtract(stocked);
+ this.remainingQuantity = rem.compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO : rem;
+ }
}
--
Gitblit v1.9.3