From 827570e529cec7157083b3e04bc6d3671f5fa8fc Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 11 八月 2023 17:31:31 +0800
Subject: [PATCH] 修改成品计划上传逻辑,新增开始日期和销售单号数据

---
 server/src/main/java/doumeemes/dao/business/model/WorkPlans.java             |   18 +++++++++---------
 .idea/modules.xml                                                            |    1 +
 web_standard/public/template/workplans_import_template.xlsx                  |    0 
 server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java |    8 +++++++-
 .idea/misc.xml                                                               |    9 ++++++++-
 5 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/.idea/misc.xml b/.idea/misc.xml
index 7bf3de7..51cae05 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ProjectRootManager">
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/server/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
   <component name="SuppressionsComponent">
diff --git a/.idea/modules.xml b/.idea/modules.xml
index dc25266..a5afc41 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,6 +3,7 @@
   <component name="ProjectModuleManager">
     <modules>
       <module fileurl="file://$PROJECT_DIR$/.idea/dmMes.iml" filepath="$PROJECT_DIR$/.idea/dmMes.iml" />
+      <module fileurl="file://$PROJECT_DIR$/server/doumeemes.iml" filepath="$PROJECT_DIR$/server/doumeemes.iml" />
     </modules>
   </component>
 </project>
\ No newline at end of file
diff --git a/server/src/main/java/doumeemes/dao/business/model/WorkPlans.java b/server/src/main/java/doumeemes/dao/business/model/WorkPlans.java
index 967344f..f5ef864 100644
--- a/server/src/main/java/doumeemes/dao/business/model/WorkPlans.java
+++ b/server/src/main/java/doumeemes/dao/business/model/WorkPlans.java
@@ -61,8 +61,8 @@
     @ApiModelProperty(value = "璁″垝缂栫爜")
     private String planCode;
 
-    @ApiModelProperty(value = "璁″垝鏃ユ湡")
-    @Excel(name="璁″垝鏃ユ湡",orderNum ="1",format = "yyyy-MM-dd")
+    @ApiModelProperty(value = "璁″垝缁撴潫鏃ユ湡")
+    @Excel(name="璁″垝缁撴潫鏃ユ湡",orderNum ="2",format = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date planDate;
     @ApiModelProperty(value = "璁″垝寮�濮嬫棩鏈�")
@@ -71,16 +71,16 @@
     private Date startDate;
 
     @ApiModelProperty(value = "閿�鍞崟鍙�" )
-    @Excel(name="閿�鍞崟鍙�",orderNum ="9")
+    @Excel(name="閿�鍞崟鍙�",orderNum ="8")
     private String salesorder;
     @ApiModelProperty(value = "浜у搧鍚嶇О" )
     @TableField(exist = false)
-    @Excel(name="浜у搧鍚嶇О",orderNum ="2")
+    @Excel(name="浜у搧鍚嶇О",orderNum ="3")
     private String materialName;
 
     @ApiModelProperty(value = "浜у搧缂栫爜" )
     @TableField(exist = false)
-    @Excel(name="浜у搧缂栫爜",orderNum ="3")
+    @Excel(name="浜у搧缂栫爜",orderNum ="4")
     private String materialCode;
 
     @ApiModelProperty(value = "鐗╂枡缂栫爜锛堝叧鑱攎aterial_distribute琛級", example = "1")
@@ -90,11 +90,11 @@
     private Integer unitId;
 
     @ApiModelProperty(value = "璁″垝鏁伴噺", example = "1")
-    @Excel(name="璁″垝鐢熶骇鏁伴噺",orderNum ="4")
+    @Excel(name="璁″垝鐢熶骇鏁伴噺",orderNum ="5")
     private Integer num;
 
     @ApiModelProperty(value = "鎵规鍙�")
-    @Excel(name="浜у搧鎵规鍙�",orderNum = "6")
+    @Excel(name="浜у搧鎵规鍙�",orderNum = "7")
     private String batch;
 
     @ApiModelProperty(value = "鐘舵�� 0宸茬敓鎴愩��1宸插彂甯冦��2宸叉挙鍥炪��3宸插彇娑堛��4宸插垎閰嶃��5宸叉殏鍋溿��6宸插畬宸ャ��7宸插叆搴撱��8宸插叧闂�", example = "1")
@@ -114,11 +114,11 @@
     private Date publishDate;
 
     @ApiModelProperty(value = "鐢熶骇宸ュ巶鏈虹骇缁勭粐鍚嶇О" )
-    @Excel(name="鐢熶骇宸ュ巶",orderNum ="5")
+    @Excel(name="鐢熶骇宸ュ巶",orderNum ="6")
     @TableField(exist = false)
     private String factoryName;
 
     @ApiModelProperty(value = "浼樺厛绾э紙鎺掑簭鐮侊級瀛楁", example = "1")
-    @Excel(name="浼樺厛绾�" ,orderNum = "8")
+    @Excel(name="浼樺厛绾�" ,orderNum = "9")
     private Integer urgent;
 }
diff --git a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
index 1e80882..b25630b 100644
--- a/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
+++ b/server/src/main/java/doumeemes/service/ext/impl/WorkPlansExtServiceImpl.java
@@ -365,8 +365,14 @@
         if(Constants.formatIntegerNum(p.getNum())<=0){
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掔敓浜ф暟閲忋�戞暟鎹敊璇紒");
         }
+        if(p.getStartDate() == null){
+            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掑紑濮嬫棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒");
+        }
         if(p.getPlanDate() == null){
-            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掓棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒");
+            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掔粨鏉熸棩鏈熴�戞暟鎹敊璇紝姝g‘鏍煎紡涓猴細yyyy-MM-dd锛堝2022-06-07锛夛紒");
+        }
+        if(p.getPlanDate().getTime() <= p.getStartDate().getTime()){
+            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愯鍒掑紑濮嬫棩鏈熴�戣鏃╀簬銆愯鍒掔粨鏉熸棩鏈熴�戯紒");
         }
         if(StringUtils.isBlank(p.getMaterialCode())){
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝绗��"+(index+2)+"銆戣銆愪骇鍝佺紪鐮併�戞暟鎹敊璇紒");
diff --git a/web_standard/public/template/workplans_import_template.xlsx b/web_standard/public/template/workplans_import_template.xlsx
index 36a87ac..d6bc89f 100644
--- a/web_standard/public/template/workplans_import_template.xlsx
+++ b/web_standard/public/template/workplans_import_template.xlsx
Binary files differ

--
Gitblit v1.9.3