From 5c5544a07c683965b86a2bfd4c878503c4c73a48 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 30 三月 2026 18:08:26 +0800
Subject: [PATCH] yys 1.设备备件字段补全

---
 src/main/java/com/ruoyi/device/controller/DeviceRepairController.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java b/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
index d33b340..fe9ee2c 100644
--- a/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
+++ b/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
@@ -2,7 +2,9 @@
 
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.device.dto.DeviceMonthlyRepairTableDTO;
 import com.ruoyi.device.dto.DeviceRepairDto;
+import com.ruoyi.device.dto.RepairAmountGroupDTO;
 import com.ruoyi.device.pojo.DeviceRepair;
 import com.ruoyi.device.service.IDeviceLedgerService;
 import com.ruoyi.device.service.IDeviceRepairService;
@@ -14,6 +16,7 @@
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.Arrays;
+import java.util.List;
 
 @Api(tags = "璁惧鎶ヤ慨绠$悊")
 @RequestMapping("/device/repair")
@@ -54,6 +57,7 @@
     @PostMapping ("repair")
     @ApiModelProperty("璁惧缁翠慨")
     public AjaxResult repair( @RequestBody DeviceRepair deviceRepair) {
+        deviceRepair.setStatus(1);
         return deviceRepairService.updateDeviceRepair(deviceRepair);
     }
 
@@ -72,4 +76,27 @@
     public void export(HttpServletResponse response, Long[] ids) {
         deviceRepairService.export(response, ids);
     }
+
+    /**
+     * 鎸夊勾浠芥煡璇㈡瘡鏈堟姤淇噾棰濓紙鎸夎澶囧彴璐﹀垎缁勶級
+     * @param year 鍓嶇浼犲叆鐨勫勾浠斤紙濡�2025锛�
+     */
+    @GetMapping("/monthlyAmount")
+    @ApiModelProperty("鎸夊勾浠芥煡璇㈡瘡鏈堟姤淇噾棰濓紙鎸夎澶囧彴璐﹀垎缁勶級")
+    public AjaxResult getMonthlyAmount(@RequestParam(defaultValue = "2025", required = true,name = "year") String year) {
+        List<DeviceMonthlyRepairTableDTO> result = deviceRepairService.getMonthlyRepairAmountByYear(year);
+        return AjaxResult.success(result);
+    }
+
+    /**
+     * 鎸夊勾浠芥煡璇㈡姤淇噾棰濓紙鎸夎澶囧彴璐﹀垎缁勶級
+     * @param year 鍓嶇浼犲叆鐨勫勾浠斤紙濡�2025锛�
+     */
+    @GetMapping("/yearlyAmount")
+    @ApiModelProperty("鎸夊勾浠芥煡璇㈡姤淇噾棰濓紙鎸夎澶囧彴璐﹀垎缁勶級")
+    public AjaxResult yearlyAmount(@RequestParam(defaultValue = "2025", required = true,name = "year") String year) {
+        List<RepairAmountGroupDTO> result = deviceRepairService.getRepairAmountByYear(year);
+        return AjaxResult.success(result);
+    }
+
 }

--
Gitblit v1.9.3