From 56ae1f2dd863cb1c3b564695435c69414c935dab Mon Sep 17 00:00:00 2001
From: houjie <714924425@qq.com>
Date: 星期四, 31 八月 2023 14:57:53 +0800
Subject: [PATCH] 库存信息 实体类  调整

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java |   33 ++-------------------------------
 lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java               |   25 +++++++++++++------------
 2 files changed, 15 insertions(+), 43 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java
index 6a9aa12..56fa79a 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/controller/SparesPartInventoryController.java
@@ -188,7 +188,7 @@
             try {
                 List<SparesPartInventory> list = ExcelImportUtil.importExcel(file.getInputStream(), SparesPartInventory.class, params);
                 for (SparesPartInventory temp : list) {
-                    temp.setId(mainId);
+                    temp.setSparePartId(mainId);
                 }
                 long start = System.currentTimeMillis();
                 sparesPartInventoryService.saveBatch(list);
@@ -207,36 +207,7 @@
         }
         return Result.error("鏂囦欢瀵煎叆澶辫触锛�");
     }
-   /* @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-            // 鑾峰彇涓婁紶鏂囦欢瀵硅薄
-            MultipartFile file = entity.getValue();
-            ImportParams params = new ImportParams();
-            params.setTitleRows(2);
-            params.setHeadRows(1);
-            params.setNeedSave(true);
-            try {
-                List<SparesPartInventory> list = ExcelImportUtil.importExcel(file.getInputStream(), SparesPartInventory.class, params);
-                long start = System.currentTimeMillis();
-                sparesPartInventoryService.saveBatch(list);
-                log.info("娑堣�楁椂闂�" + (System.currentTimeMillis() - start) + "姣");
-                return Result.OK("鏂囦欢瀵煎叆鎴愬姛锛佹暟鎹鏁帮細" + list.size());
-            } catch (Exception e) {
-                log.error(e.getMessage(), e);
-                return Result.error("鏂囦欢瀵煎叆澶辫触:" + e.getMessage());
-            } finally {
-                try {
-                    file.getInputStream().close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        return Result.error("鏂囦欢瀵煎叆澶辫触锛�");
-    }*/
+
 
 
     /**
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java
index d6dde01..7b5386f 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/spare/entity/SparesPartInventory.java
@@ -27,6 +27,7 @@
     /**
      * 澶囦欢id
      */
+    @Excel(name = "澶囦欢id", width = 15)
     @ApiModelProperty(value = "澶囦欢id")
     private java.lang.String sparePartId;
     /**
@@ -53,36 +54,36 @@
     /**
      * 鍒堕�犲晢
      */
-    @Excel(name = "鍒堕�犲晢", width = 15,dictTable = "mom_base_constructor", dicCode = "id", dicText = "name")
+    @Excel(name = "鍒堕�犲晢", width = 15)
     @ApiModelProperty(value = "鍒堕�犲晢")
     @Dict(dictTable = "mom_base_constructor", dicCode = "id", dicText = "name")
     private java.lang.String constructorId;
     /**
      * 涓诲崟浣峣d
      */
-    @Excel(name = "涓诲崟浣峣d", width = 15,dictTable = "mom_base_unit", dicCode = "id", dicText = "name")
+    @Excel(name = "涓诲崟浣峣d", width = 15)
     @ApiModelProperty(value = "涓诲崟浣峣d")
     @Dict(dictTable = "mom_base_unit", dicCode = "id", dicText = "name")
     private java.lang.String mainUnitId;
     /**
      * 杈呭崟浣峣d
      */
-
+    @Excel(name = "杈呭崟浣峣d", width = 15)
     @ApiModelProperty(value = "杈呭崟浣峣d")
     @Dict(dictTable = "mom_base_unit", dicCode = "id", dicText = "name")
     private java.lang.String auxiliaryUnitId;
 
-    @Excel(name = "浠撳簱id", width = 15,dictTable = "mom_base_warehouse", dicCode = "id", dicText = "name")
+    @Excel(name = "浠撳簱id", width = 15)
     @ApiModelProperty(value = "浠撳簱id")
     @Dict(dictTable = "mom_base_warehouse", dicCode = "id", dicText = "name")
     private java.lang.String warehouseId;
 
-    @Excel(name = "搴撳尯id", width = 15,dictTable = "mom_base_warehouse_area", dicCode = "id", dicText = "name")
+    @Excel(name = "搴撳尯id", width = 15)
     @ApiModelProperty(value = "搴撳尯id")
     @Dict(dictTable = "mom_base_warehouse_area", dicCode = "id", dicText = "name")
     private java.lang.String warehouseAreaId;
 
-    @Excel(name = "搴撲綅id", width = 15,dictTable = "mom_base_warehouse_location", dicCode = "id", dicText = "name")
+    @Excel(name = "搴撲綅id", width = 15)
     @ApiModelProperty(value = "搴撲綅id")
     @Dict(dictTable = "mom_base_warehouse_location", dicCode = "id", dicText = "name")
     private java.lang.String warehouseLocationId;
@@ -95,6 +96,7 @@
     /**
      * 杈呮暟閲�
      */
+    @Excel(name = "杈呮暟閲�", width = 15)
     @ApiModelProperty(value = "杈呮暟閲�")
     private java.lang.Double auxiliaryQuantity;
 
@@ -111,7 +113,6 @@
      * 渚涘簲鍟唅d
      */
     @Excel(name = "渚涘簲鍟唅d", width = 15)
-    @Dict(dictTable = "mom_base_supplier", dicCode = "id", dicText = "name")
     @ApiModelProperty(value = "渚涘簲鍟唅d")
     private String supplierId;
 
@@ -153,31 +154,31 @@
     /**
      * 澶囩敤瀛楁1
      */
-
+    @Excel(name = "澶囩敤瀛楁1", width = 15)
     @ApiModelProperty(value = "澶囩敤瀛楁1")
     private java.lang.String sparesUda1;
     /**
      * 澶囩敤瀛楁2
      */
-
+    @Excel(name = "澶囩敤瀛楁2", width = 15)
     @ApiModelProperty(value = "澶囩敤瀛楁2")
     private java.lang.String sparesUda2;
     /**
      * 澶囩敤瀛楁3
      */
-
+    @Excel(name = "澶囩敤瀛楁3", width = 15)
     @ApiModelProperty(value = "澶囩敤瀛楁3")
     private java.lang.String sparesUda3;
     /**
      * 澶囩敤瀛楁4
      */
-
+    @Excel(name = "澶囩敤瀛楁4", width = 15)
     @ApiModelProperty(value = "澶囩敤瀛楁4")
     private java.lang.String sparesUda4;
     /**
      * 澶囩敤瀛楁5
      */
-
+    @Excel(name = "澶囩敤瀛楁5", width = 15)
     @ApiModelProperty(value = "澶囩敤瀛楁5")
     private java.lang.String sparesUda5;
 

--
Gitblit v1.9.3