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 |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java b/src/main/java/com/ruoyi/sales/pojo/SalesLedgerProduct.java
index 3ffd876..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;
+
     /**
      * 绋庣巼
      */
@@ -234,6 +248,10 @@
     @ApiModelProperty(value = "鏄惁璐ㄦ")
     private Boolean isChecked;
 
+    @TableField(exist = false)
+    @ApiModelProperty("閲嶇")
+    private BigDecimal thickness;
+
     @ApiModelProperty("瀹�")
     private BigDecimal width;
 
@@ -288,6 +306,12 @@
     @ApiModelProperty("妤煎眰缂栧彿")
     private String floorCode;
 
+    /**
+     * 浜у搧鍏ュ簱鐘舵�侊細0-鏈叆搴擄紝1-閮ㄥ垎鍏ュ簱锛�2-宸插叆搴�
+     */
+    @ApiModelProperty("浜у搧鍏ュ簱鐘舵�侊細0-鏈叆搴擄紝1-閮ㄥ垎鍏ュ簱锛�2-宸插叆搴�")
+    private Integer productStockStatus;
+
     @TableField(exist = false)
     @ApiModelProperty("閿�鍞骇鍝侀澶栧姞宸�")
     private List<SalesLedgerProductProcess> salesProductProcessList;
@@ -302,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