From 0efbf246a22f7331cf2e16bd659caea22a494102 Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期一, 29 五月 2023 12:05:48 +0800
Subject: [PATCH] 调整模块货位和库存2

---
 igds-core/src/main/java/com/ld/igds/view/service/HDepotService.java |   34 +++-------------------------------
 1 files changed, 3 insertions(+), 31 deletions(-)

diff --git a/igds-core/src/main/java/com/ld/igds/view/service/HDepotService.java b/igds-core/src/main/java/com/ld/igds/view/service/HDepotService.java
index 55fdefd..b7f8469 100644
--- a/igds-core/src/main/java/com/ld/igds/view/service/HDepotService.java
+++ b/igds-core/src/main/java/com/ld/igds/view/service/HDepotService.java
@@ -97,6 +97,8 @@
             Map<String, Object> args = new HashMap<>();
             args.put("companyId", companyId);
             list = this.getData(args);
+
+
             coreCommonService.setCacheDepot(list, companyId);
         } catch (Exception e) {
             e.printStackTrace();
@@ -147,7 +149,7 @@
      *
      * @throws Exception
      */
-    public void updataDepot(Depot depot) throws Exception {
+    public void updateDepot(Depot depot) throws Exception {
         Session session = this.getSessionFactory().openSession();
         try {
             flushCache(depot.getCompanyId());
@@ -253,15 +255,6 @@
         coreCommonService.setCacheDepotConf(list, companyId);
     }
 
-//    public void initInoutRecord(InoutRecord inoutRecord) {
-//        Session session = this.getSessionFactory().openSession();
-//        try {
-//            session.saveOrUpdate(inoutRecord);
-//        } finally {
-//            session.flush();
-//            session.close();
-//        }
-//    }
 
     public void updateFreq(String freq) {
         String sql = "UPDATE D_DEPOT_CONF SET GRAIN_FREQ_ =:freq WHERE COMPANY_ID_ =:companyId";
@@ -306,27 +299,6 @@
         if (null == list || list.isEmpty()) return;
         for (Depot depot : list) {
             ContextUtil.updateSubDept(depot.getId(), depot.getDeptId());
-        }
-    }
-
-    public void updateByStore(DepotStore depotStore) {
-        String sql = "UPDATE D_DEPOT SET STORAGE_REAL_ =:storageReal,DEPOT_STATUS_=:depotStatus ";
-        Session session = this.getSessionFactory().openSession();
-        String companyId = depotStore.getCompanyId();
-        if (null == companyId) {
-            companyId = ContextUtil.getCompanyId();
-        }
-        try {
-            sql += " WHERE COMPANY_ID_ =:companyId AND ID_=:id";
-            SQLQuery query = session.createSQLQuery(sql);
-            query.setDouble("storageReal", depotStore.getStorageReal());
-            query.setString("depotStatus", depotStore.getDepotStatus());
-            query.setString("companyId", companyId);
-            query.setString("id", depotStore.getDepotId());
-            query.executeUpdate();
-        } finally {
-            session.flush();
-            session.close();
         }
     }
 }

--
Gitblit v1.9.3