From 9d4cf882be7a2ad8d3cc422bcd0dbc461f626f58 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期二, 20 一月 2026 15:12:30 +0800
Subject: [PATCH] feat(production): 迁移生产管控

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

diff --git a/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java b/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
index 37ce27d..bf241b1 100644
--- a/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
+++ b/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
@@ -3,7 +3,9 @@
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.device.dto.DeviceMaintenanceDto;
+import com.ruoyi.device.dto.DeviceMonthlyRepairTableDTO;
 import com.ruoyi.device.dto.DeviceRepairDto;
+import com.ruoyi.device.dto.RepairAmountGroupDTO;
 import com.ruoyi.device.pojo.DeviceLedger;
 import com.ruoyi.device.pojo.DeviceMaintenance;
 import com.ruoyi.device.pojo.DeviceRepair;
@@ -19,6 +21,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 
 @Api(tags = "璁惧淇濆吇")
 @RestController
@@ -65,7 +68,6 @@
     @PostMapping ("maintenance")
     @ApiModelProperty("淇敼璁惧淇濆吇")
     public AjaxResult maintenance(@RequestBody DeviceMaintenance deviceMaintenance) {
-        deviceMaintenance.setStatus(1);
         return deviceMaintenanceService.updateDeviceDeviceMaintenance(deviceMaintenance);
     }
 
@@ -87,4 +89,27 @@
     }
 
 
+    /**
+     * 鎸夊勾浠芥煡璇㈡瘡鏈堟姤淇噾棰濓紙鎸夎澶囧彴璐﹀垎缁勶級
+     * @param year 鍓嶇浼犲叆鐨勫勾浠斤紙濡�2025锛�
+     */
+    @GetMapping("/monthlyAmount")
+    @ApiModelProperty("鎸夊勾浠芥煡璇㈡瘡鏈堟姤淇噾棰濓紙鎸夎澶囧彴璐﹀垎缁勶級")
+    public AjaxResult getMonthlyAmount(@RequestParam(defaultValue = "2025", required = true,name = "year") String year) {
+        List<DeviceMonthlyRepairTableDTO> result = deviceMaintenanceService.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 = deviceMaintenanceService.getRepairAmountByYear(year);
+        return AjaxResult.success(result);
+    }
+
+
 }

--
Gitblit v1.9.3