From dde876eb26278a6f335455d29abec8a4c3b03885 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 23 Jul 2026 08:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/controller/PqDevController.java | 21 +- .../device/mapper/mapping/PqDevMapper.xml | 2 +- .../gather/device/pojo/param/PqDevParam.java | 5 +- .../com/njcn/gather/device/pojo/po/PqDev.java | 4 - .../gather/device/pojo/vo/PqDevImageVO.java | 17 ++ .../njcn/gather/device/pojo/vo/PqDevVO.java | 4 +- .../gather/device/service/IPqDevService.java | 4 +- .../device/service/PqDevImageFileService.java | 288 ++++++++++++++++++ .../device/service/impl/PqDevServiceImpl.java | 117 ++++--- .../gather/device/util/PqDevImageSupport.java | 107 +++---- .../device/util/PqDevImageSupportTest.java | 196 ++++++++++-- entrance/src/main/resources/application.yml | 33 +- 12 files changed, 636 insertions(+), 162 deletions(-) create mode 100644 detection/src/main/java/com/njcn/gather/device/pojo/vo/PqDevImageVO.java create mode 100644 detection/src/main/java/com/njcn/gather/device/service/PqDevImageFileService.java diff --git a/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java b/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java index f51ddd54..1130c76b 100644 --- a/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java +++ b/detection/src/main/java/com/njcn/gather/device/controller/PqDevController.java @@ -100,11 +100,26 @@ public class PqDevController extends BaseController { } @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD) - @GetMapping("/image/download") + @GetMapping("/image/preview") @ApiOperation("下载设备图片") @ApiImplicitParam(name = "id", value = "被检设备id", required = true) - public void downloadImage(@RequestParam("id") String id, HttpServletResponse response) { - pqDevService.downloadImage(id, response); + public void previewImage(@RequestParam("id") String id, + @RequestParam("fileName") String fileName, + HttpServletResponse response) { + pqDevService.previewImage(id, fileName, response); + } + + @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD) + @GetMapping("/image/download") + @ApiOperation("download device image") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "id", required = true), + @ApiImplicitParam(name = "fileName", value = "fileName", required = true) + }) + public void downloadImage(@RequestParam("id") String id, + @RequestParam("fileName") String fileName, + HttpServletResponse response) { + pqDevService.downloadImage(id, fileName, response); } @OperateInfo(operateType = OperateType.DELETE) diff --git a/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml b/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml index bee3f825..7508a3d0 100644 --- a/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml +++ b/detection/src/main/java/com/njcn/gather/device/mapper/mapping/PqDevMapper.xml @@ -154,7 +154,7 @@