From 7c6b2c777ebe4ea64c492d2dd5aea69d902c94a7 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 01 六月 2023 19:52:41 +0800
Subject: [PATCH] 提交粮食定价配置

---
 igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java |  107 +++++++++++++++++++++++++++++++++++------------------
 1 files changed, 70 insertions(+), 37 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
index 709beec..72a7b16 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
@@ -1,6 +1,8 @@
 package com.ld.igds.inout.controller;
 
+import ch.qos.logback.classic.pattern.ClassNameOnlyAbbreviator;
 import com.bstek.bdf2.core.business.IUser;
+import com.bstek.bdf2.core.model.DefaultDept;
 import com.ld.igds.check.dto.CheckItemData;
 import com.ld.igds.common.manager.CommonManager;
 import com.ld.igds.constant.BizType;
@@ -320,7 +322,6 @@
 
     /**
      * 鍑哄簱鐧昏
-     *
      * @param sort 琛ㄧず浣跨敤鐨勫嚭鍏ュ簱璁惧閰嶅鍙凤紝涓嶄紶閫掗粯璁や负1
      * @return
      */
@@ -527,6 +528,7 @@
      */
     @RequestMapping("/inout-query")
     public PageResponse<InoutData> inoutQuery(@RequestBody InoutParam param) {
+        if(null == param.getCompanyId()) param.setCompanyId(ContextUtil.getCompanyId());
         return inoutManager.inoutQuery(param);
     }
 
@@ -646,34 +648,34 @@
         }
     }
 
-    /**
-     * 鏍规嵁鍏ュ簱鏁版嵁淇℃伅锛岃幏鍙栨鏌ラ」淇℃伅锛屽鏋滃綋鍓嶆暟鎹凡缁忔娴嬪畬鎴愶紝鏌ヨ妫�娴嬬粨鏋滐紝濡傛灉娌℃湁妫�娴嬪畬鎴愬垯鏍规嵁妫�娴嬮」閰嶇疆鑾峰彇闇�瑕佹娴嬬殑椤圭洰淇℃伅
-     *
-     * @param data
-     * @return
-     */
-    @RequestMapping("/get-check-item")
-    public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutData data) {
-        try {
-            return inoutManager.getCheckItem(data);
-        } catch (Exception e) {
-            log.error("鍚庡彴寮傚父:{}", e);
-            return new PageResponse<List<CheckItemData>>(
-                    RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage());
-        }
-    }
+//    /**
+//     * 鏍规嵁鍏ュ簱鏁版嵁淇℃伅锛岃幏鍙栨鏌ラ」淇℃伅锛屽鏋滃綋鍓嶆暟鎹凡缁忔娴嬪畬鎴愶紝鏌ヨ妫�娴嬬粨鏋滐紝濡傛灉娌℃湁妫�娴嬪畬鎴愬垯鏍规嵁妫�娴嬮」閰嶇疆鑾峰彇闇�瑕佹娴嬬殑椤圭洰淇℃伅
+//     *
+//     * @param data
+//     * @return
+//     */
+//    @RequestMapping("/get-check-item")
+//    public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutData data) {
+//        try {
+//            return inoutManager.getCheckItem(data);
+//        } catch (Exception e) {
+//            log.error("鍚庡彴寮傚父:{}", e);
+//            return new PageResponse<List<CheckItemData>>(
+//                    RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage());
+//        }
+//    }
 
-    /**
-     * 鍒嗛〉鑾峰彇鏁版嵁淇℃伅
-     *
-     * @param param
-     * @return
-     */
-    @RequestMapping("/page-check-data")
-    public PageResponse<Page<InoutData>> pageCheckData(
-            @RequestBody InoutParam param) {
-        return inoutManager.pageCheckData(param);
-    }
+//    /**
+//     * 鍒嗛〉鑾峰彇鏁版嵁淇℃伅
+//     *
+//     * @param param
+//     * @return
+//     */
+//    @RequestMapping("/page-check-data")
+//    public PageResponse<Page<InoutData>> pageCheckData(
+//            @RequestBody InoutParam param) {
+//        return inoutManager.pageCheckData(param);
+//    }
 
     /**
      * 閬撻椄鎺у埗
@@ -738,6 +740,8 @@
         view.addObject("bizType", BizType.INOUT_IN.getCode());
         view.addObject("type", InoutConstant.TYPE_IN);
         view.addObject("deptId", deptId);
+        DefaultDept dept = commonManager.getSubDept(user, deptId);
+        view.addObject("deptName", dept.getName());
 
         //鍏ュ簱娴佺▼
         String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(), deptId, InoutConstant.TYPE_IN);
@@ -772,7 +776,7 @@
     }
 
     /**
-     * 鍒嗛〉鑾峰彇鎵︽牱璁板綍淇℃伅
+     * 鍒嗛〉鑾峰彇鎵︽牱鏁版嵁
      *
      * @param param
      * @return
@@ -783,19 +787,48 @@
     }
 
     /**
-     * 鎵︽牱椤甸潰鎻愪氦
+     * 鎵︽牱椤甸潰鎻愪氦鏇存柊
      *
      * @param data
      * @return
      */
     @RequestMapping("/update-sample")
     public PageResponse<InoutCheckData> updateSample(@RequestBody InoutCheckData data) {
-        try {
-            return inoutManager.updateSampleData(data);
-        } catch (Exception e) {
-            log.error("鍚庡彴寮傚父:{}", e);
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鍚庡彴寮傚父锛�" + e.getMessage(), null);
-        }
+
+        return inoutManager.updateSampleData(data);
+    }
+
+    /**
+     * 鍒嗛〉鑾峰彇鍖栭獙鏁版嵁
+     *
+     * @param param
+     * @return
+     */
+    @RequestMapping("/page-check-data")
+    public PageResponse<Page<InoutCheckData>> pageCheckData(@RequestBody InoutCheckParam param) {
+        return inoutManager.pageCheckData(param);
+    }
+
+    /**
+     * 鑾峰彇鍖栭獙椤逛俊鎭�
+     *
+     * @param param
+     * @return
+     */
+    @RequestMapping("/get-check-item")
+    public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutCheckParam param) {
+            return inoutManager.getCheckItemData(param);
+    }
+
+    /**
+     * 鍖栭獙椤甸潰鎻愪氦鏇存柊
+     *
+     * @param data
+     * @return
+     */
+    @RequestMapping("/update-check1")
+    public PageResponse<InoutCheckData> updateCheck1(@RequestBody InoutCheckData data) {
+
+        return inoutManager.updateCheckData(data);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3