From dad4c3efeedd1971235d7907d9066ea06dc30e11 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 11 七月 2023 18:02:21 +0800
Subject: [PATCH] 倒仓和性质变更优化

---
 igds-inout/src/main/java/com/ld/igds/inout/controller/InoutReportController.java |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutReportController.java b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutReportController.java
index 33e6d42..c7c1617 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutReportController.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutReportController.java
@@ -3,14 +3,15 @@
 import com.ld.igds.constant.RespCodeEnum;
 import com.ld.igds.data.PageResponse;
 import com.ld.igds.inout.InoutConstant;
+import com.ld.igds.inout.dto.InoutCheckData;
 import com.ld.igds.inout.dto.InoutData;
 import com.ld.igds.inout.manager.InoutReportManager;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
 import java.util.Date;
 
 /**
@@ -18,10 +19,10 @@
  */
 @Slf4j
 @RestController
-@RequestMapping("basic/inout-report")
+@RequestMapping("basic/inout/report")
 public class InoutReportController {
 
-    @Autowired
+    @Resource
     private InoutReportManager reportManager;
 
 
@@ -31,7 +32,7 @@
      * @param data
      * @return
      */
-    @RequestMapping("/inout-bill-weight")
+    @RequestMapping("/bill-weight")
     public PageResponse<String> inoutWeightBill(@RequestBody InoutData data) {
         try {
             String html;
@@ -45,7 +46,31 @@
             return new PageResponse<>(RespCodeEnum.CODE_0000, html);
         } catch (Exception e) {
             log.error("鍚庡彴寮傚父:{}", e);
-            return new PageResponse<String>(RespCodeEnum.CODE_1111.getCode(),
+            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                    "鍚庡彴寮傚父锛�" + e.getMessage());
+        }
+    }
+
+
+    /**
+     * 鎵撳嵃鎵︽牱鍗�
+     *
+     * @param data
+     * @return
+     */
+    @RequestMapping("/bill-simple")
+    public PageResponse<String> simpleBill(@RequestBody InoutCheckData data) {
+        try {
+            String html = reportManager.simpleBill(data);
+            if (null == html) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "鐢熸垚鎵撳嵃鐮佸け璐�");
+            }
+
+            return new PageResponse<>(RespCodeEnum.CODE_0000, html);
+        } catch (Exception e) {
+            log.error("鍚庡彴寮傚父:{}", e);
+            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                     "鍚庡彴寮傚父锛�" + e.getMessage());
         }
     }

--
Gitblit v1.9.3