From b701cf0331e91900bf8055009a745d4953a6c510 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 30 三月 2026 17:58:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/hxsj' into hxsj
---
src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java b/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
index 09e7b22..8b41ba0 100644
--- a/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
+++ b/src/main/java/com/ruoyi/device/controller/DeviceMaintenanceController.java
@@ -3,6 +3,8 @@
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.RepairAmountGroupDTO;
import com.ruoyi.device.pojo.DeviceLedger;
import com.ruoyi.device.pojo.DeviceMaintenance;
import com.ruoyi.device.service.IDeviceLedgerService;
@@ -15,6 +17,7 @@
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
+import java.util.List;
@Api(tags = "璁惧淇濆吇")
@RestController
@@ -61,6 +64,7 @@
@PostMapping ("maintenance")
@ApiModelProperty("淇敼璁惧淇濆吇")
public AjaxResult maintenance(@RequestBody DeviceMaintenance deviceMaintenance) {
+ deviceMaintenance.setStatus(1);
return deviceMaintenanceService.updateDeviceDeviceMaintenance(deviceMaintenance);
}
@@ -82,4 +86,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