From b1798fdc3ef26d88e53c1578a242011db2b6c7cf Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 29 十二月 2025 18:10:48 +0800
Subject: [PATCH] 合同增加仓库字段,关联公司、库区联动下拉

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/export/ReportController.java |   78 ++++++++++++++++++++++++++++++++++----
 1 files changed, 69 insertions(+), 9 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/export/ReportController.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/export/ReportController.java
index 88f67e1..a6b1681 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/export/ReportController.java
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/export/ReportController.java
@@ -2,14 +2,20 @@
 
 
 import com.fzzy.igds.ReportInDetailPR;
+import com.fzzy.igds.ReportOutDetailPR;
+import com.fzzy.igds.SuperInventoryReportPR;
 import com.fzzy.igds.data.InoutParam;
+import com.fzzy.igds.data.SuperInventoryReportData;
+import com.fzzy.igds.data.SuperInventoryReportParam;
+import com.fzzy.igds.domain.Company;
+import com.fzzy.igds.domain.Depot;
 import com.fzzy.igds.domain.Dept;
 import com.fzzy.igds.domain.InoutRecord;
-import com.fzzy.igds.service.InoutRecordService;
-import com.fzzy.igds.service.SysDeptService;
+import com.fzzy.igds.service.*;
 import com.fzzy.igds.utils.ContextUtil;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -17,7 +23,10 @@
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -25,7 +34,6 @@
  *
  * @author sgj
  * @date 2025/12/24
-
  */
 @Controller
 @RequestMapping("export")
@@ -38,8 +46,26 @@
     @Resource
     private SysDeptService sysDeptService;
 
+
+    @Resource
+    private CoreDeptService coreDeptService;
+    @Resource
+    private DepotService depotService;
+
+    @Resource
+    private CoreCompanyService coreCompanyService;
+
+
     @Autowired
     private ReportInDetailPR reportInDetailPR;
+
+    @Autowired
+    private ReportOutDetailPR reportOutDetailPR;
+    @Autowired
+    private SuperInventoryReportPR superInventoryReportPR;
+
+
+
 
 
 
@@ -47,14 +73,24 @@
      * 鍑哄叆搴撴姤琛ㄥ鍑�
      * @return
      */
-    @RequestMapping("/inReport-excel")
+    @RequestMapping("/inOutReport-excel")
     @ResponseBody
-    public AjaxResult inReportExcel(InoutParam param) {
-        //鏌ヨ鏁版嵁
-        List<InoutRecord> list = reportInDetailPR.listRecord(param);
-
+    public AjaxResult inOutReport(InoutParam param) {
         //璁剧疆鏍囬
-        String sheetName = "鍏ュ簱鎶ヨ〃鏁版嵁";
+        String sheetName = "鎶ヨ〃鏁版嵁";
+        //鏌ヨ鏁版嵁
+        List<InoutRecord> list = new ArrayList<>();
+
+        if (StringUtils.isNotEmpty(param.getType()) && "IN".equals(param.getType())) {
+            sheetName = "鍏ュ簱鎶ヨ〃鏁版嵁";
+            list = reportInDetailPR.listRecord(param);
+        }
+
+        if (StringUtils.isNotEmpty(param.getType()) && "OUT".equals(param.getType())) {
+            sheetName = "鍑哄簱鎶ヨ〃鏁版嵁";
+            list = reportOutDetailPR.listRecord(param);
+        }
+
         //鑾峰彇鍒嗗簱缂栫爜瀵瑰簲鐨勫垎搴撳悕绉�
         String deptName = "";
         SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null));
@@ -67,4 +103,28 @@
         return util.exportExcel(list, sheetName, deptName);
     }
 
+
+    /**
+     * 搴撳瓨鎶ヨ〃瀵煎嚭
+     * @return
+     */
+    @RequestMapping("/superInventoryReport-excel")
+    @ResponseBody
+    public AjaxResult superInventoryReport(SuperInventoryReportParam param) {
+        //璁剧疆鏍囬
+        String sheetName = "搴撳瓨鎶ヨ〃鏁版嵁";
+        //鏌ヨ鏁版嵁
+        List<SuperInventoryReportData> list = superInventoryReportPR.getReportData(param);
+        //鑾峰彇鍒嗗簱缂栫爜瀵瑰簲鐨勫垎搴撳悕绉�
+        String deptName = "";
+        SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null));
+        if (null != subDept) {
+            deptName = subDept.getDeptName();
+        }
+
+        //瀵煎嚭
+        ExcelUtil<SuperInventoryReportData> util = new ExcelUtil<SuperInventoryReportData>(SuperInventoryReportData.class);
+        return util.exportExcel(list, sheetName, deptName);
+    }
+
 }

--
Gitblit v1.9.3