From 4cceee2ced8d9ed1d8e8d08213372cc8a77ac601 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 30 三月 2026 11:24:54 +0800
Subject: [PATCH] yys 转移设备相关代码

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

diff --git a/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java b/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
index 55e8189..fe9ee2c 100644
--- a/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
+++ b/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
@@ -2,8 +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.pojo.DeviceLedger;
+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,8 +15,8 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 
 @Api(tags = "璁惧鎶ヤ慨绠$悊")
 @RequestMapping("/device/repair")
@@ -24,6 +25,9 @@
 
     @Autowired
     private IDeviceRepairService deviceRepairService;
+
+    @Autowired
+    private IDeviceLedgerService deviceLedgerService;
 
     @ApiModelProperty("璁惧鎶ヤ慨鍒楄〃")
     @GetMapping("/page")
@@ -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