From 087991c76f078defe5eb55d84223021b4199fb3d Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 17 二月 2025 11:22:50 +0800
Subject: [PATCH] 设备模块修改bug

---
 cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java |   51 +++++++++++++++++++++++++++++----------------------
 1 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java b/cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
index 2725613..959a9a5 100644
--- a/cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
+++ b/cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java
@@ -7,10 +7,8 @@
 import com.yuanchu.mom.dto.DataConfigDto;
 import com.yuanchu.mom.dto.DeviceDto;
 import com.yuanchu.mom.pojo.Device;
-import com.yuanchu.mom.pojo.PkMaster;
 import com.yuanchu.mom.service.DataConfigService;
 import com.yuanchu.mom.service.DeviceService;
-import com.yuanchu.mom.service.PkMasterService;
 import com.yuanchu.mom.utils.JackSonUtil;
 import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
@@ -22,6 +20,7 @@
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -47,16 +46,24 @@
     @Autowired
     private DataConfigService dataConfigService;
 
-    @Autowired
-    private PkMasterService pkMasterService;
+    /**
+     * 鑾峰彇浜哄憳淇℃伅
+     * @return
+     * @throws Exception
+     */
+    @ValueAuth
+    @GetMapping("/selectUserList")
+    public Result selectUserList() {
+        return  Result.success(deviceService.selectUserList());
+    }
 
     @ValueClassify("璁惧")
     @ApiOperation(value = "鏌ヨ璁惧璇︽儏鍒楄〃")
     @PostMapping("/selectDeviceParameter")
-    public Result selectDeviceParameter(@RequestBody Map<String, Object> data) throws Exception {
+    public Result selectDeviceParameter(@RequestBody Map<String, Object> data,@RequestParam(value = "laboratoryNameIsNull", required = false) Boolean laboratoryNameIsNull) throws Exception {
         Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
         DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class);
-        return Result.success(deviceService.selectDeviceParameter(page, itemParameter));
+        return Result.success(deviceService.selectDeviceParameter(page, itemParameter,laboratoryNameIsNull));
     }
 
     @ValueClassify("璁惧")
@@ -144,10 +151,10 @@
     }
 
     @ApiOperation(value = "閫氳繃璁惧缂栧彿鑾峰彇璁惧鍒楄〃")
-    @PostMapping("/selectDeviceByCode")
+    @GetMapping("/selectDeviceByCode")
     @ValueAuth
-    public Result selectDeviceByCode(String code) {
-        return Result.success(deviceService.selectDeviceByCode(code));
+    public Result selectDeviceByCode(Integer id) {
+        return Result.success(deviceService.selectDeviceByCode(id));
     }
 
     @ValueAuth
@@ -203,13 +210,6 @@
     }
 
 
-    @ValueClassify("璁惧")
-    @ApiOperation(value = "娓╁害寰幆鏁伴噰")
-    @PostMapping("/temDataAcquisition")
-    public Result<?> temDataAcquisition(@RequestBody PkMaster pkMaster) {
-        return Result.success(pkMasterService.temDataAcquisition(pkMaster));
-    }
-
     @ApiOperation(value = "宸︿晶璁惧鏍戝舰鏍�")
     @GetMapping("/treeDevice")
     @ValueAuth
@@ -217,11 +217,18 @@
         return Result.success(deviceService.treeDevice(deviceName));
     }
 
-
-    @ApiOperation(value = "娓╁害寰幆鏁伴噰鎬讳綋")
-    @PostMapping("/temDataAcquisition2")
+    @ApiOperation(value = "璁惧妗f瀵煎嚭")
+    @GetMapping("/exportDeviceFile")
     @ValueAuth
-    public Result<?> temDataAcquisition2(@RequestBody PkMaster pkMaster) {
-        return Result.success(pkMasterService.temDataAcquisition2(pkMaster));
+    public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response) throws Exception {
+        deviceService.exportDeviceFile(deviceId,response);
     }
-}
\ No newline at end of file
+
+    @ApiOperation(value = "浠櫒璁惧涓�瑙堣〃瀵煎嚭")
+    @GetMapping("/exportEquipmentDetails")
+    @ValueAuth
+    public void exportEquipmentDetails(HttpServletResponse response) throws Exception {
+        deviceService.exportEquipmentDetails(response);
+    }
+
+}

--
Gitblit v1.9.3