From b42b180f5c2bc89e494b2274d8d454a4bd6dbf9c Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期五, 21 三月 2025 17:27:59 +0800
Subject: [PATCH] art: 系统管理-用户管理-添加选择设备,并根据是否有设备管理模块功能区分加载 哪个模块的设备倏

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 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 fdb9c2a..0433218 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
@@ -12,6 +12,7 @@
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.modules.eam.entity.EamEquipment;
 import org.jeecg.modules.eam.service.IEamEquipmentService;
+import org.jeecg.modules.eam.vo.EamEquipmentTree;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
@@ -19,6 +20,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
+import java.util.List;
 
 /**
  * @Description: 璁惧鍙拌处
@@ -66,8 +68,8 @@
     @ApiOperation(value = "璁惧鍙拌处-娣诲姞", notes = "璁惧鍙拌处-娣诲姞")
     @PostMapping(value = "/add")
     public Result<?> add(@RequestBody EamEquipment eamEquipment) {
-        boolean b = eamEquipmentService.saveEquipment(eamEquipment);
-        if (!b) {
+        EamEquipment entity = eamEquipmentService.saveEquipment(eamEquipment);
+        if (entity == null) {
             Result.OK("娣诲姞澶辫触锛�");
         }
         return Result.OK("娣诲姞鎴愬姛锛�");
@@ -152,4 +154,19 @@
         return super.importExcel(request, response, EamEquipment.class);
     }
 
+    @AutoLog(value = "璁惧琛�-閫氳繃杞﹂棿ids鑾峰彇璁惧鏍�")
+    @ApiOperation(value = "璁惧琛�-閫氳繃杞﹂棿ids鑾峰彇璁惧鏍�", notes = "璁惧琛�-閫氳繃杞﹂棿ids鑾峰彇璁惧鏍�")
+    @GetMapping(value = "/loadTreeListByProductionIds")
+    public Result<List<EamEquipmentTree>> loadTreeListByProductionIds(@RequestParam(name = "ids", required = true) String ids) {
+        Result<List<EamEquipmentTree>> result = new Result<>();
+        try {
+            List<EamEquipmentTree> mdcEquipmentTreeList = eamEquipmentService.loadTreeListByProductionIds(ids);
+            result.setSuccess(true);
+            result.setResult(mdcEquipmentTreeList);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+        }
+        return result;
+    }
+
 }

--
Gitblit v1.9.3