From 4e4047e9b523e37fd4d83cbf9fdd5abe201ba278 Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期六, 15 二月 2025 13:29:30 +0800 Subject: [PATCH] 添加设备档案导入 --- cnas-server/src/main/java/com/yuanchu/mom/controller/DeviceController.java | 34 ++++++++++++++++++++++++++++++---- 1 files changed, 30 insertions(+), 4 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..a266330 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,7 +151,7 @@ } @ApiOperation(value = "閫氳繃璁惧缂栧彿鑾峰彇璁惧鍒楄〃") - @PostMapping("/selectDeviceByCode") + @GetMapping("/selectDeviceByCode") @ValueAuth public Result selectDeviceByCode(String code) { return Result.success(deviceService.selectDeviceByCode(code)); @@ -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