From 8ad863082097ffdcab4a8e7f426d344a1fe6f892 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期六, 07 十一月 2026 00:27:02 +0800
Subject: [PATCH] 修复人员管理接口校验与导出,完善设备保养计划与文件受控功能
---
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenancePlanController.java | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenancePlanController.java b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenancePlanController.java
index bc27f33..bed07d2 100644
--- a/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenancePlanController.java
+++ b/cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenancePlanController.java
@@ -5,6 +5,7 @@
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.device.dto.DeviceMaintenancePlanDetailsDto;
import com.ruoyi.device.dto.DeviceMaintenancePlanDto;
+import com.ruoyi.device.pojo.DeviceMaintenanceAttachment;
import com.ruoyi.device.pojo.DeviceMaintenancePlan;
import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails;
import com.ruoyi.device.service.DeviceMaintenancePlanService;
@@ -12,6 +13,7 @@
import io.swagger.v3.oas.annotations.Operation;
import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
@@ -132,7 +134,8 @@
*/
@Operation(summary = "瀵煎嚭璁惧淇濆吇璁″垝")
@GetMapping("/exportDeviceMaintenancePlan")
- public Result exportDeviceMaintenancePlan(@RequestParam("maintenancePlanId") Integer maintenancePlanId, HttpServletResponse response) {
+ public Result exportDeviceMaintenancePlan(@RequestParam("maintenancePlanId") Integer maintenancePlanId,
+ HttpServletResponse response) {
return deviceMaintenancePlanService.exportDeviceMaintenancePlanDto(maintenancePlanId, response);
}
@@ -153,4 +156,32 @@
public Result reviewMaintenancePlanStatus(@RequestBody DeviceMaintenancePlanDto deviceMaintenancePlanDto) {
return deviceMaintenancePlanService.reviewMaintenancePlanStatus(deviceMaintenancePlanDto);
}
+
+ /**
+ * 鏌ヨ淇濆吇璁″垝鏄庣粏闄勪欢
+ */
+ @Operation(summary = "鏌ヨ淇濆吇璁″垝鏄庣粏闄勪欢")
+ @GetMapping("/selectAttachments")
+ public Result<List<DeviceMaintenanceAttachment>> selectAttachments(Integer maintenancePlanDetailId) {
+ return Result.success(deviceMaintenancePlanService.selectAttachments(maintenancePlanDetailId));
+ }
+
+ /**
+ * 涓婁紶淇濆吇璁″垝鏄庣粏闄勪欢
+ */
+ @Operation(summary = "涓婁紶淇濆吇璁″垝鏄庣粏闄勪欢")
+ @PostMapping("/uploadAttachment")
+ public Result uploadAttachment(@RequestParam("maintenancePlanDetailId") Integer maintenancePlanDetailId,
+ @RequestParam("file") MultipartFile file) {
+ return Result.success(deviceMaintenancePlanService.uploadAttachment(maintenancePlanDetailId, file));
+ }
+
+ /**
+ * 鍒犻櫎淇濆吇璁″垝鏄庣粏闄勪欢
+ */
+ @Operation(summary = "鍒犻櫎淇濆吇璁″垝鏄庣粏闄勪欢")
+ @DeleteMapping("/deleteAttachment")
+ public Result deleteAttachment(Long id) {
+ return Result.success(deviceMaintenancePlanService.deleteAttachment(id));
+ }
}
--
Gitblit v1.9.3