From c21cb3d8cebd9cdef4df2efa372c5b9257c713e4 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期三, 28 十月 2026 17:57:40 +0800
Subject: [PATCH] feat(device,supply,satisfaction): 设备计划后端改造、耗材存放位置与满意度照片支持
---
cnas-device/src/main/java/com/ruoyi/device/controller/DeviceMaintenancePlanController.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 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 81be805..bc27f33 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
@@ -3,8 +3,10 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.Result;
+import com.ruoyi.device.dto.DeviceMaintenancePlanDetailsDto;
import com.ruoyi.device.dto.DeviceMaintenancePlanDto;
import com.ruoyi.device.pojo.DeviceMaintenancePlan;
+import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails;
import com.ruoyi.device.service.DeviceMaintenancePlanService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
@@ -13,6 +15,7 @@
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
+import java.util.List;
import java.util.Map;
/**
@@ -80,6 +83,51 @@
}
/**
+ * 鎸夊勾浠芥煡璇㈣澶囦繚鍏昏鍒掞紙涓嶅瓨鍦ㄥ垯鑷姩鍒涘缓锛夛紝骞惰嚜鍔ㄨˉ鍏ㄥ凡鍒扮偣鐨勮澶囨槑缁�
+ */
+ @Operation(summary = "鎸夊勾浠芥煡璇㈣澶囦繚鍏昏鍒掞紙鑷姩鍒涘缓骞惰ˉ鍏ㄥ埌鐐规槑缁嗭級")
+ @GetMapping("/getPlanByYear")
+ public Result<DeviceMaintenancePlanDto> getPlanByYear(String planYear) {
+ return Result.success(deviceMaintenancePlanService.getOrCreatePlanByYear(planYear));
+ }
+
+ /**
+ * 淇濆吇璁″垝骞翠唤鍒楄〃锛堣嚜鍔ㄥ垹闄ゆ病鏈夋槑缁嗙殑绌哄勾浠借鍒掞級
+ */
+ @Operation(summary = "淇濆吇璁″垝骞翠唤鍒楄〃")
+ @GetMapping("/getPlanYears")
+ public Result<List<String>> getPlanYears() {
+ return Result.success(deviceMaintenancePlanService.getMaintenancePlanYears());
+ }
+
+ /**
+ * 璁惧淇濆吇璁″垝璇︽儏鍒楄〃锛堝惈鍒扮偣鏍囩孩锛�
+ */
+ @Operation(summary = "璁惧淇濆吇璁″垝璇︽儏鍒楄〃")
+ @GetMapping("/pageMaintenancePlanDetail")
+ public Result<IPage<DeviceMaintenancePlanDetailsDto>> pageMaintenancePlanDetail(Page page, Integer planId, String deviceName, String deviceNumber) {
+ return Result.success(deviceMaintenancePlanService.pageMaintenancePlanDetail(page, planId, deviceName, deviceNumber));
+ }
+
+ /**
+ * 淇敼璁惧淇濆吇璁″垝璇︽儏
+ */
+ @Operation(summary = "淇敼璁惧淇濆吇璁″垝璇︽儏")
+ @PostMapping("/updateMaintenancePlanDetail")
+ public Result updateMaintenancePlanDetail(@RequestBody DeviceMaintenancePlanDetails deviceMaintenancePlanDetails) {
+ return Result.success(deviceMaintenancePlanService.updateMaintenancePlanDetail(deviceMaintenancePlanDetails));
+ }
+
+ /**
+ * 鍒犻櫎璁惧淇濆吇璁″垝璇︽儏
+ */
+ @Operation(summary = "鍒犻櫎璁惧淇濆吇璁″垝璇︽儏")
+ @DeleteMapping("/delMaintenancePlanDetail")
+ public Result delMaintenancePlanDetail(Integer maintenancePlanDetailId) {
+ return Result.success(deviceMaintenancePlanService.removeMaintenancePlanDetail(maintenancePlanDetailId));
+ }
+
+ /**
* 瀵煎嚭璁惧淇濆吇璁″垝
*/
@Operation(summary = "瀵煎嚭璁惧淇濆吇璁″垝")
--
Gitblit v1.9.3