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/service/DeviceMaintenancePlanService.java | 77 ++++++++++++++++++++++++++++++++++++++
1 files changed, 77 insertions(+), 0 deletions(-)
diff --git a/cnas-device/src/main/java/com/ruoyi/device/service/DeviceMaintenancePlanService.java b/cnas-device/src/main/java/com/ruoyi/device/service/DeviceMaintenancePlanService.java
index cfa3ab3..f714788 100644
--- a/cnas-device/src/main/java/com/ruoyi/device/service/DeviceMaintenancePlanService.java
+++ b/cnas-device/src/main/java/com/ruoyi/device/service/DeviceMaintenancePlanService.java
@@ -4,10 +4,17 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.Result;
+import com.ruoyi.device.dto.DeviceMaintenancePlanDetailsDto;
import com.ruoyi.device.dto.DeviceMaintenancePlanDto;
+import com.ruoyi.device.pojo.Device;
+import com.ruoyi.device.pojo.DeviceMaintenanceAttachment;
import com.ruoyi.device.pojo.DeviceMaintenancePlan;
+import com.ruoyi.device.pojo.DeviceMaintenancePlanDetails;
+import org.springframework.web.multipart.MultipartFile;
import jakarta.servlet.http.HttpServletResponse;
+import java.time.LocalDate;
+import java.util.List;
/**
* <p>
@@ -76,4 +83,74 @@
*/
Result reviewMaintenancePlanStatus(DeviceMaintenancePlanDto deviceMaintenancePlanDto);
+ /**
+ * 鎸夊勾浠芥煡璇㈣澶囦繚鍏昏鍒掞紙涓嶅瓨鍦ㄥ垯鑷姩鍒涘缓锛夛紝骞惰嚜鍔ㄨˉ鍏ㄥ凡鍒扮偣鐨勮澶囨槑缁�
+ * @param planYear 璁″垝骞翠唤
+ * @return 璁惧淇濆吇璁″垝
+ */
+ DeviceMaintenancePlanDto getOrCreatePlanByYear(String planYear);
+
+ /**
+ * 淇濆吇璁″垝骞翠唤鍒楄〃锛氬垹闄ゆ病鏈変换浣曟槑缁嗙殑绌哄勾浠借鍒掑悗锛岃繑鍥炴湁鏄庣粏鐨勫勾浠斤紙鍊掑簭锛�
+ * @return 骞翠唤鍒楄〃
+ */
+ List<String> getMaintenancePlanYears();
+
+ /**
+ * 璁惧妗f鍙樻洿鍚庯紝绔嬪嵆鎶婅澶囩櫥璁板埌涓嬫淇濆吇鏃ユ湡鎵�鍦ㄥ勾浠界殑璁惧淇濆吇璁″垝鏄庣粏
+ * @param device 璁惧
+ */
+ void syncDeviceMaintenanceDetail(Device device);
+
+ /**
+ * 瀹℃牳閫氳繃鍚庯紝鎸夊鏍搁�氳繃褰撳ぉ婊氬姩璁惧妗f鐨勬渶杩�/涓嬫淇濆吇鏃ユ湡
+ * @param deviceId 璁惧id
+ * @param maintenanceDate 淇濆吇瀹屾垚鏃ユ湡锛堝鏍搁�氳繃褰撳ぉ锛�
+ */
+ void updateDeviceMaintenanceDate(Integer deviceId, LocalDate maintenanceDate);
+
+ /**
+ * 瀹℃牳閫氳繃鍚庯紝鎶婅鍒掓槑缁嗗綊鍒板鏍稿畬鎴愬勾浠界殑璁″垝涓嬶紙鎻愬墠瀹屾垚鐨勬槑缁嗕笉鍐嶇暀鍦ㄥ師璁″垝骞翠唤锛�
+ * @param maintenancePlanDetailId 淇濆吇璁″垝鏄庣粏id
+ * @param reviewDate 瀹℃牳瀹屾垚鏃ユ湡
+ */
+ void reclassifyMaintenanceDetailByReviewDate(Integer maintenancePlanDetailId, LocalDate reviewDate);
+
+ /**
+ * 鍒嗛〉鏌ヨ璁惧淇濆吇璁″垝璇︽儏锛堝惈鍒扮偣鏍囩孩锛�
+ */
+ IPage<DeviceMaintenancePlanDetailsDto> pageMaintenancePlanDetail(Page page, Integer planId, String deviceName, String deviceNumber);
+
+ /**
+ * 涓轰繚鍏昏褰曟壘涓�鏉″彲鍏宠仈鐨勮鍒掓槑缁嗭紱娌℃湁鍙敤鏄庣粏鏃跺湪褰撳墠骞村害璁″垝鏂板鏈疆鏄庣粏
+ * @param deviceId 璁惧id
+ * @param maintenancePlanDetailId 鎸囧畾鐨勮鍒掓槑缁唅d锛屼负绌哄垯鑷姩鍖归厤
+ * @param maintenanceDate 淇濆吇鏃ユ湡
+ */
+ DeviceMaintenancePlanDetails resolveMaintenancePlanDetail(Integer deviceId, Integer maintenancePlanDetailId, LocalDate maintenanceDate);
+
+ /**
+ * 淇敼璁惧淇濆吇璁″垝璇︽儏锛堝凡瀹℃牳鐨勬槑缁嗕笉鍏佽淇敼锛�
+ */
+ boolean updateMaintenancePlanDetail(DeviceMaintenancePlanDetails detail);
+
+ /**
+ * 鍒犻櫎璁惧淇濆吇璁″垝璇︽儏锛涘凡鍑哄鏍哥粨鏋滅殑璁板綍闅忓巻鍙茬暀妗o紝鏈鏍哥殑璁板綍闅忔槑缁嗕竴璧峰垹闄�
+ */
+ boolean removeMaintenancePlanDetail(Integer maintenancePlanDetailId);
+
+ /**
+ * 鏌ヨ璁″垝鏄庣粏闄勪欢鍒楄〃
+ */
+ List<DeviceMaintenanceAttachment> selectAttachments(Integer maintenancePlanDetailId);
+
+ /**
+ * 涓婁紶璁″垝鏄庣粏闄勪欢
+ */
+ DeviceMaintenanceAttachment uploadAttachment(Integer maintenancePlanDetailId, MultipartFile file);
+
+ /**
+ * 鍒犻櫎璁″垝鏄庣粏闄勪欢
+ */
+ boolean deleteAttachment(Long id);
}
--
Gitblit v1.9.3