From 3e451c90f8734835743e9cebcf02ce30e577c28d Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期一, 24 十一月 2025 11:27:18 +0800
Subject: [PATCH] yys 1.新增入职导入,下载模板
---
src/main/java/com/ruoyi/device/controller/DeviceRepairController.java | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java b/src/main/java/com/ruoyi/device/controller/DeviceRepairController.java
index 8c103ed..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")
@@ -37,9 +40,6 @@
@PostMapping()
@ApiModelProperty("娣诲姞璁惧鎶ヤ慨")
public AjaxResult add( @RequestBody DeviceRepair deviceRepair) {
- DeviceLedger byId = deviceLedgerService.getById(deviceRepair.getDeviceLedgerId());
- deviceRepair.setDeviceName(byId.getDeviceName());
- deviceRepair.setDeviceModel(byId.getDeviceModel());
return deviceRepairService.saveDeviceRepair(deviceRepair);
}
@@ -78,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