From 74205424049d169a8d3bbabb74b4c8c9adf1ec99 Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期六, 15 二月 2025 16:05:51 +0800 Subject: [PATCH] 设备列表查询接口修改 --- cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java | 38 ++++++++++++++++++++++++++++++++------ 1 files changed, 32 insertions(+), 6 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 49b6559..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 @@ -20,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; @@ -45,13 +46,24 @@ @Autowired private DataConfigService dataConfigService; + /** + * 鑾峰彇浜哄憳淇℃伅 + * @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("璁惧") @@ -139,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 @@ -205,4 +217,18 @@ return Result.success(deviceService.treeDevice(deviceName)); } -} \ No newline at end of file + @ApiOperation(value = "璁惧妗f瀵煎嚭") + @GetMapping("/exportDeviceFile") + @ValueAuth + public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response) throws Exception { + deviceService.exportDeviceFile(deviceId,response); + } + + @ApiOperation(value = "浠櫒璁惧涓�瑙堣〃瀵煎嚭") + @GetMapping("/exportEquipmentDetails") + @ValueAuth + public void exportEquipmentDetails(HttpServletResponse response) throws Exception { + deviceService.exportEquipmentDetails(response); + } + +} -- Gitblit v1.9.3