From 666dddac6724361f31d640435ea23b84ca1539f9 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 12 三月 2026 17:09:42 +0800
Subject: [PATCH] fix: 移除生产计划多余字段

---
 src/main/java/com/ruoyi/productionPlan/pojo/ProductionPlan.java |   40 ++++++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/src/main/java/com/ruoyi/productionPlan/pojo/ProductionPlan.java b/src/main/java/com/ruoyi/productionPlan/pojo/ProductionPlan.java
index 8839bd6..126f9dc 100644
--- a/src/main/java/com/ruoyi/productionPlan/pojo/ProductionPlan.java
+++ b/src/main/java/com/ruoyi/productionPlan/pojo/ProductionPlan.java
@@ -7,6 +7,7 @@
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -58,25 +59,10 @@
     private String customerName;
 
     /**
-     * 鐗╂枡缂栫爜
+     * 鍏宠仈鐗╂枡淇℃伅琛↖D
      */
-    @ApiModelProperty("鐗╂枡缂栫爜")
-    @Excel(name = "鐗╂枡缂栫爜")
-    private String materialCode;
-
-    /**
-     * 浜у搧鍚嶇О
-     */
-    @ApiModelProperty("浜у搧鍚嶇О")
-    @Excel(name = "浜у搧鍚嶇О")
-    private String productName;
-
-    /**
-     * 浜у搧瑙勬牸
-     */
-    @ApiModelProperty("浜у搧瑙勬牸")
-    @Excel(name = "浜у搧瑙勬牸")
-    private String productSpec;
+    @ApiModelProperty("鍏宠仈鐗╂枡淇℃伅琛↖D")
+    private Long productMaterialSkuId;
 
     /**
      * 闀�
@@ -126,6 +112,7 @@
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @ApiModelProperty("寮�濮嬫棩鏈�")
     @Excel(name = "寮�濮嬫棩鏈�", width = 20, dateFormat = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date startDate;
 
     /**
@@ -134,6 +121,7 @@
     @ApiModelProperty("缁撴潫鏃ユ湡")
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @Excel(name = "缁撴潫鏃ユ湡", width = 20, dateFormat = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date endDate;
 
     /**
@@ -227,4 +215,20 @@
     @ApiModelProperty(value = "涓嬪彂鏁伴噺")
     @Excel(name = "涓嬪彂鏁伴噺")
     private BigDecimal assignedQuantity;
+
+    /**
+     * 璁$畻鍓╀綑鏂规暟
+     *
+     * @return 鍓╀綑鏂规暟
+     */
+    @ApiModelProperty(value = "鍓╀綑鏂规暟")
+    public BigDecimal getRemainingVolume() {
+        if (volume == null) {
+            return BigDecimal.ZERO;
+        }
+        if (assignedQuantity == null) {
+            return volume;
+        }
+        return volume.subtract(assignedQuantity);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3