From e908aead856e1da187a27ae6b5f48eaf106d2acf Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期六, 02 十二月 2023 20:30:13 +0800
Subject: [PATCH] fix: 库存预警编辑问题修复

---
 consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java |   35 +++++++++++++++++------------------
 1 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java b/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
index 669e63e..142719f 100644
--- a/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
+++ b/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
@@ -2,13 +2,12 @@
 
 import com.consum.base.core.param.BaseWarehouseParam;
 import com.consum.base.core.param.DepBackWarehouseParam;
-import com.consum.base.core.tools.SqlParameter;
-import com.consum.base.core.tools.SuperMap;
-import com.consum.base.core.util.DateUtil;
+import com.consum.base.core.utils.SqlParameter;
+import com.consum.base.core.utils.SuperMap;
+import com.consum.base.core.utils.DateUtil;
 import com.consum.model.po.*;
 import com.walker.infrastructure.utils.NumberGenerator;
 import com.walker.jdbc.service.BaseServiceImpl;
-import org.bouncycastle.jcajce.provider.asymmetric.GOST;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -762,7 +761,7 @@
                 "	AND A.WAREHOUSE_ID = B.WAREHOUSE_ID \n" +
                 "	AND A.WAREHOUSE_ID = :WAREHOUSE_ID";
 
-        List<Map> list = select(sql,new SqlParameter("DEP_FORM_SCRAPPED_ID",scrapped.getId()).add("WAREHOUSE_ID",scrapped.getWarehouseId()));
+        List<Map> list = select(sql,new SqlParameter("DEP_FORM_SCRAPPED_ID",scrapped.getId()).add("WAREHOUSE_ID",scrapped.getOutWarehouseId()));
         for (Map _map : list) {
             SuperMap map = new SuperMap(_map);
 
@@ -793,26 +792,26 @@
                 his.setWhGoodsId(result.getLendingModel().getWhGoodsId());
                 his.setInitialCount(result.getInitial_count());
                 his.setEndCount(result.getEnd_count());
-                his.setWarehouseId(scrapped.getWarehouseId());
-                his.setWarehouseName(scrapped.getWarehouseName());
-                his.setDepartmentId(scrapped.getDepartmentId());
-                his.setDepartmentName(scrapped.getDepartmentName());
+                his.setWarehouseId(scrapped.getOutWarehouseId());
+                his.setWarehouseName(scrapped.getOutWarehouseName());
+//                his.setDepartmentId(scrapped.getDepartmentId());
+//                his.setDepartmentName(scrapped.getDepartmentName());
                 insert(his);
 
 
                 DepFormScrappedModel model = new DepFormScrappedModel();
                 model.setId(NumberGenerator.getLongSequenceNumber());
                 model.setDepFormScrappedGoodsId(map.getLong("DEP_FORM_SCRAPPED_GOODS_ID"));
-                model.setScrappedCode(map.getString("SCRAPPED_CODE"));
+                model.setScrappedCode(map.getLong("SCRAPPED_CODE"));
                 model.setScrappedName(map.getString("SCRAPPED_NAME"));
-                model.setUsingGoodsHisId(his.getId());
-                model.setDepFormScrappedId(scrapped.getId());
-                model.setWhGoodsId(his.getWhGoodsId());
-                model.setScrappedCounts(his.getThisCount());
-                model.setInitCount(his.getInitialCount());
-                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
-                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
-                model.setDepFormLendingId(his.getDepFormLendingId());
+//                model.setUsingGoodsHisId(his.getId());
+//                model.setDepFormScrappedId(scrapped.getId());
+//                model.setWhGoodsId(his.getWhGoodsId());
+//                model.setScrappedCounts(his.getThisCount());
+//                model.setInitCount(his.getInitialCount());
+//                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
+//                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
+//                model.setDepFormLendingId(his.getDepFormLendingId());
                 insert(model);
             }
         }

--
Gitblit v1.9.1