From 88cbf1a8c50a15f35dd78a50adc43e71a6530775 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期一, 26 五月 2025 16:22:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/opctask/controller/EdgStorageDeviceTaskHistoryController.java | 71 ++++++++++-------------------------
1 files changed, 20 insertions(+), 51 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/opctask/controller/EdgStorageDeviceTaskHistoryController.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/opctask/controller/EdgStorageDeviceTaskHistoryController.java
index 362b306..47fc151 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/opctask/controller/EdgStorageDeviceTaskHistoryController.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/opctask/controller/EdgStorageDeviceTaskHistoryController.java
@@ -1,15 +1,20 @@
package com.mes.opctask.controller;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mes.largenscreen.entity.DailyProductionVO;
+import com.mes.largenscreen.entity.RunTime;
import com.mes.opctask.entity.EdgStorageDeviceTaskHistory;
+import com.mes.opctask.entity.request.TaskHistoryRequest;
import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService;
import com.mes.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
-import java.io.Serializable;
+import java.util.Date;
import java.util.List;
/**
@@ -18,6 +23,7 @@
* @author makejava
* @since 2024-10-27 21:04:29
*/
+@Api(tags = "鍗х悊鍘嗗彶浠诲姟")
@RestController
@RequestMapping("edgStorageDeviceTaskHistory")
public class EdgStorageDeviceTaskHistoryController {
@@ -27,60 +33,23 @@
@Resource
private EdgStorageDeviceTaskHistoryService edgStorageDeviceTaskHistoryService;
- /**
- * 鍒嗛〉鏌ヨ鎵�鏈夋暟鎹�
- *
- * @param page 鍒嗛〉瀵硅薄
- * @param edgStorageDeviceTaskHistory 鏌ヨ瀹炰綋
- * @return 鎵�鏈夋暟鎹�
- */
- @GetMapping
- public Result selectAll(Page<EdgStorageDeviceTaskHistory> page, EdgStorageDeviceTaskHistory edgStorageDeviceTaskHistory) {
- return Result.success(this.edgStorageDeviceTaskHistoryService.page(page, new QueryWrapper<>(edgStorageDeviceTaskHistory)));
- }
-
- /**
- * 閫氳繃涓婚敭鏌ヨ鍗曟潯鏁版嵁
- *
- * @param id 涓婚敭
- * @return 鍗曟潯鏁版嵁
- */
- @GetMapping("{id}")
- public Result selectOne(@PathVariable Serializable id) {
- return Result.success(this.edgStorageDeviceTaskHistoryService.getById(id));
- }
-
- /**
- * 鏂板鏁版嵁
- *
- * @param edgStorageDeviceTaskHistory 瀹炰綋瀵硅薄
- * @return 鏂板缁撴灉
- */
+ @ApiOperation(value = "鏌ヨ鏈潯绾挎墽琛岃繃鐨勫巻鍙蹭换鍔℃暟鎹�", notes = "鏌ヨ鏈潯绾挎墽琛岃繃鐨勫巻鍙蹭换鍔℃暟鎹�")
@PostMapping
- public Result insert(@RequestBody EdgStorageDeviceTaskHistory edgStorageDeviceTaskHistory) {
- return Result.success(this.edgStorageDeviceTaskHistoryService.save(edgStorageDeviceTaskHistory));
+ public Result<Page<EdgStorageDeviceTaskHistory>> queryEdgStorageDeviceTaskHistory(@RequestBody @Validated TaskHistoryRequest request) {
+ return Result.success(edgStorageDeviceTaskHistoryService.queryEdgStorageDeviceTaskHistory(request));
}
- /**
- * 淇敼鏁版嵁
- *
- * @param edgStorageDeviceTaskHistory 瀹炰綋瀵硅薄
- * @return 淇敼缁撴灉
- */
- @PutMapping
- public Result update(@RequestBody EdgStorageDeviceTaskHistory edgStorageDeviceTaskHistory) {
- return Result.success(this.edgStorageDeviceTaskHistoryService.updateById(edgStorageDeviceTaskHistory));
+ @ApiOperation(value = "鏌ヨ鏈潯绾垮巻鍙叉寚瀹氭棩鏈熺殑鏃ョ敓浜ф暟鎹�", notes = "鏌ヨ鏈潯绾垮巻鍙叉寚瀹氭棩鏈熺殑鏃ョ敓浜ф暟鎹�")
+ @PostMapping("/queryEdgDailyProduction")
+ public Result<DailyProductionVO> queryEdgDailyProduction(@RequestBody TaskHistoryRequest request) {
+ return Result.success(edgStorageDeviceTaskHistoryService.queryEdgDailyProduction(request));
}
- /**
- * 鍒犻櫎鏁版嵁
- *
- * @param idList 涓婚敭缁撳悎
- * @return 鍒犻櫎缁撴灉
- */
- @DeleteMapping
- public Result delete(@RequestParam("idList") List<Long> idList) {
- return Result.success(this.edgStorageDeviceTaskHistoryService.removeByIds(idList));
+ @ApiOperation(value = "鏌ヨ鐢熶骇绾胯繍琛屾儏鍐�", notes = "鏌ヨ鐢熶骇绾胯繍琛屾儏鍐�")
+ @GetMapping("/queryRunTimes")
+ public Result<List<RunTime>> queryRunTimes(String days) {
+ return Result.success(edgStorageDeviceTaskHistoryService.queryRunTimes(days));
}
+
}
--
Gitblit v1.8.0