From 0100359605ba05638c1f683d68a2948cc273b0d2 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期一, 08 十二月 2025 11:21:29 +0800
Subject: [PATCH] yys 修改设备模块
---
src/main/java/com/ruoyi/device/controller/DeviceRepairController.java | 29 +++++++++++++++++++++++++++++
1 files changed, 29 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 55e8189..7b386bd 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.DeviceLedger;
import com.ruoyi.device.pojo.DeviceRepair;
import com.ruoyi.device.service.IDeviceLedgerService;
@@ -16,6 +18,7 @@
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
@Api(tags = "璁惧鎶ヤ慨绠$悊")
@RequestMapping("/device/repair")
@@ -24,6 +27,9 @@
@Autowired
private IDeviceRepairService deviceRepairService;
+
+ @Autowired
+ private IDeviceLedgerService deviceLedgerService;
@ApiModelProperty("璁惧鎶ヤ慨鍒楄〃")
@GetMapping("/page")
@@ -72,4 +78,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