From 189c22920f56eccf89090197e82de8dae57c4a01 Mon Sep 17 00:00:00 2001
From: hyingbo <1363390067@qq.com>
Date: 星期五, 12 九月 2025 17:32:08 +0800
Subject: [PATCH] 根据车间筛选设备调整

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
index f0615fc..cca786c 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -10,6 +10,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.compress.utils.Lists;
 import org.apache.commons.lang3.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.constant.CommonConstant;
@@ -18,6 +19,7 @@
 import org.jeecg.modules.eam.entity.EamEquipment;
 import org.jeecg.modules.eam.entity.EamEquipmentExtend;
 import org.jeecg.modules.eam.request.EamEquipmentQuery;
+import org.jeecg.modules.eam.dto.EquipmentCategoryStatistics;
 import org.jeecg.modules.eam.service.IEamEquipmentExtendService;
 import org.jeecg.modules.eam.service.IEamEquipmentService;
 import org.jeecg.modules.eam.vo.EamEquipmentTree;
@@ -82,6 +84,29 @@
         IPage<EamEquipment> page = new Page<>(pageNo, pageSize);
         IPage<EamEquipment> pageList = eamEquipmentService.queryPageList(page, eamEquipment);
         return Result.OK(pageList);
+    }
+
+    /**
+     * 璁惧鍙拌处-鍙拌处缁熻
+     *
+     * @return
+     */
+//    @AutoLog(value = "璁惧鍙拌处-鍒嗛〉鍒楄〃鏌ヨ")
+    @ApiOperation(value = "璁惧鍙拌处-鍙拌处缁熻", notes = "璁惧鍙拌处-鍙拌处缁熻")
+    @GetMapping(value = "/queryLedgerStatistics")
+    public Result<?> queryLedgerStatistics() {
+        List<EquipmentCategoryStatistics> list = eamEquipmentService.queryLedgerStatistics();
+        return Result.OK(list);
+    }
+
+    /**
+     * 瀵煎嚭鍙拌处缁熻excel
+     *
+     * @param request
+     */
+    @RequestMapping(value = "/exportLedgerStatisticsXls")
+    public ModelAndView exportLedgerStatisticsXls(HttpServletRequest request) {
+        return eamEquipmentService.exportLedgerStatisticsXls(request, EquipmentCategoryStatistics.class, "鍙拌处缁熻");
     }
 
     /**
@@ -338,4 +363,22 @@
         return Result.ok(resultList);
     }
 
+    /**
+     * 鏍规嵁鐢宠杞﹂棿鏌ヨ
+     * @param productionId 杞﹂棿id
+     * @return
+     */
+    @ApiOperation(value = "璁惧琛�-寮傛鍔犺浇璁惧鍒楄〃", notes = "璁惧琛�-寮傛鍔犺浇璁惧鍒楄〃")
+    @GetMapping(value = "/asyncLoadEquipmentByProduction")
+    public Result<?> asyncLoadEquipmentByProduction(@RequestParam(name="productionId",required = false) String productionId) {
+        List<String> partProduction = Lists.newArrayList();
+        if (StringUtils.isNotEmpty(productionId)) {
+            //key涓嶄负绌猴紝鏌ヨ鎵�鏈変笅绾т骇绾縤d
+            partProduction = mdcEquipmentService.findAllProductions(productionId);
+            partProduction.add(productionId);
+        }
+        List<EquipmentSearchResult> resultList = eamEquipmentService.asyncLoadEquipmentByProduction(partProduction);
+        return Result.ok(resultList);
+    }
+
 }

--
Gitblit v1.9.3