From 8b4d7246fb735d965195201e80178b5d1528a486 Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期五, 18 四月 2025 14:48:49 +0800 Subject: [PATCH] 1.设备使用授权导出 2.设备维护保养导出 --- cnas-device/src/main/java/com/ruoyi/device/controller/DeviceDocumentsController.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceDocumentsController.java b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceDocumentsController.java index 0725f6f..6cfe1a7 100644 --- a/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceDocumentsController.java +++ b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceDocumentsController.java @@ -34,7 +34,7 @@ */ @ApiOperation(value = "鏂板璁惧妗f") @PostMapping("/addDocument") - public Result addDocument(DeviceDocuments document) { + public Result addDocument(@RequestBody DeviceDocuments document) { if (document.getDeviceId() == null) { throw new RuntimeException("璁惧id涓虹┖"); } @@ -48,7 +48,7 @@ * @return */ @ApiOperation(value = "鏌ヨ璁惧妗f淇℃伅") - @GetMapping("/id") + @GetMapping("/getDocumentById") public Result getDocumentById(Integer id) { return Result.success(deviceDocumentsService.getById(id)); } @@ -77,14 +77,14 @@ /** * 鏌ヨ璁惧妗f鍒楄〃 - * @param id + * @param deviceId * @return */ @ApiOperation(value = "鏌ヨ璁惧妗f鍒楄〃") @GetMapping("/getAllDocuments") - public Result getAllDocuments(Integer id) { + public Result getAllDocuments(Integer deviceId) { LambdaQueryWrapper<DeviceDocuments> lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(DeviceDocuments::getDeviceId, id); + lambdaQueryWrapper.eq(DeviceDocuments::getDeviceId, deviceId); return Result.success(deviceDocumentsService.list(lambdaQueryWrapper)); } -- Gitblit v1.9.3