From 1566e4c7604d85737ea67fe6757e71b8185fa48e Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期二, 18 十一月 2025 16:52:42 +0800
Subject: [PATCH] 添加设备管理页面,添加测试设备任务监控页面

---
 mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceGroupController.java |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceGroupController.java b/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceGroupController.java
index 88e657c..37ea229 100644
--- a/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceGroupController.java
+++ b/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceGroupController.java
@@ -8,8 +8,8 @@
 import com.mes.device.vo.DeviceGroupVO;
 import com.mes.device.vo.StatisticsVO;
 import com.mes.vo.Result;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -29,7 +29,7 @@
 @Slf4j
 @RestController
 @RequestMapping("device/group")
-@Tag(name = "璁惧缁勭鐞�", description = "璁惧缁勭鐞嗙浉鍏虫帴鍙�")
+@Api(tags = "璁惧缁勭鐞�")
 public class DeviceGroupController {
 
     @Resource
@@ -42,7 +42,7 @@
      * 鍒涘缓璁惧缁�
      */
     @PostMapping("/create")
-    @Operation(summary = "鍒涘缓璁惧缁�", description = "鍒涘缓璁惧缁勪俊鎭�")
+    @ApiOperation("鍒涘缓璁惧缁�")
     public Result<DeviceGroupConfig> createGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -65,7 +65,7 @@
      * 鏇存柊璁惧缁勯厤缃�
      */
     @PostMapping("/update")
-    @Operation(summary = "鏇存柊璁惧缁勯厤缃�", description = "鏇存柊鎸囧畾ID鐨勮澶囩粍閰嶇疆")
+    @ApiOperation("鏇存柊璁惧缁勯厤缃�")
     public Result<DeviceGroupConfig> updateGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -89,7 +89,7 @@
      * 鍒犻櫎璁惧缁勯厤缃�
      */
     @PostMapping("/delete")
-    @Operation(summary = "鍒犻櫎璁惧缁勯厤缃�", description = "鍒犻櫎鎸囧畾ID鐨勮澶囩粍閰嶇疆")
+    @ApiOperation("鍒犻櫎璁惧缁勯厤缃�")
     public Result<Void> deleteGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -105,7 +105,7 @@
      * 鏍规嵁ID鑾峰彇璁惧缁勯厤缃�
      */
     @PostMapping("/detail")
-    @Operation(summary = "鑾峰彇璁惧缁勯厤缃鎯�", description = "鏍规嵁ID鑾峰彇璁惧缁勯厤缃殑璇︾粏淇℃伅")
+    @ApiOperation("鑾峰彇璁惧缁勯厤缃鎯�")
     public Result<DeviceGroupConfig> getGroupById(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -121,7 +121,7 @@
      * 鍒嗛〉鏌ヨ璁惧缁勫垪琛�
      */
     @PostMapping("/list")
-    @Operation(summary = "鍒嗛〉鏌ヨ璁惧缁勫垪琛�", description = "鍒嗛〉鏌ヨ璁惧缁勫垪琛�")
+    @ApiOperation("鍒嗛〉鏌ヨ璁惧缁勫垪琛�")
     public Result<Page<DeviceGroupVO.GroupInfo>> getGroupList(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -146,7 +146,7 @@
      * 鍚敤璁惧缁�
      */
     @PostMapping("/enable")
-    @Operation(summary = "鍚敤璁惧缁�", description = "鍚敤鎸囧畾璁惧缁�")
+    @ApiOperation("鍚敤璁惧缁�")
     public Result<Void> enableGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -162,7 +162,7 @@
      * 绂佺敤璁惧缁�
      */
     @PostMapping("/disable")
-    @Operation(summary = "绂佺敤璁惧缁�", description = "绂佺敤鎸囧畾璁惧缁�")
+    @ApiOperation("绂佺敤璁惧缁�")
     public Result<Void> disableGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -178,7 +178,7 @@
      * 鎵归噺鍚敤璁惧缁�
      */
     @PostMapping("/batch-enable")
-    @Operation(summary = "鎵归噺鍚敤璁惧缁�", description = "鎵归噺鍚敤鎸囧畾ID鍒楄〃鐨勮澶囩粍")
+    @ApiOperation("鎵归噺鍚敤璁惧缁�")
     public Result<Void> batchEnableGroups(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -194,7 +194,7 @@
      * 鎵归噺绂佺敤璁惧缁�
      */
     @PostMapping("/batch-disable")
-    @Operation(summary = "鎵归噺绂佺敤璁惧缁�", description = "鎵归噺绂佺敤鎸囧畾ID鍒楄〃鐨勮澶囩粍")
+    @ApiOperation("鎵归噺绂佺敤璁惧缁�")
     public Result<Void> batchDisableGroups(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -210,7 +210,7 @@
      * 鑾峰彇璁惧缁勭粺璁′俊鎭�
      */
     @PostMapping("/statistics/groups")
-    @Operation(summary = "鑾峰彇璁惧缁勭粺璁′俊鎭�", description = "鑾峰彇璁惧缁勭浉鍏崇殑缁熻淇℃伅")
+    @ApiOperation("鑾峰彇璁惧缁勭粺璁′俊鎭�")
     public Result<StatisticsVO.GroupStatistics> getGroupStatistics(
             @RequestBody(required = false) Map<String, Object> request) {
         try {
@@ -227,7 +227,7 @@
      * 妫�鏌ヨ澶囩粍缂栫爜鏄惁宸插瓨鍦�
      */
     @PostMapping("/check-code")
-    @Operation(summary = "妫�鏌ヨ澶囩粍缂栫爜", description = "妫�鏌ヨ澶囩粍缂栫爜鏄惁宸插瓨鍦�")
+    @ApiOperation("妫�鏌ヨ澶囩粍缂栫爜")
     public Result<Boolean> checkGroupCodeExists(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -247,7 +247,7 @@
      * 鑾峰彇璁惧缁勭被鍨嬪垪琛�
      */
     @PostMapping("/types")
-    @Operation(summary = "鑾峰彇璁惧缁勭被鍨嬪垪琛�", description = "鑾峰彇鎵�鏈夊彲鐢ㄧ殑璁惧缁勭被鍨�")
+    @ApiOperation("鑾峰彇璁惧缁勭被鍨嬪垪琛�")
     public Result<List<String>> getGroupTypes() {
         try {
             List<String> groupTypes = deviceGroupConfigService.getAllGroupTypes();
@@ -262,7 +262,7 @@
      * 鑾峰彇璁惧缁勭姸鎬佸垪琛�
      */
     @PostMapping("/statuses")
-    @Operation(summary = "鑾峰彇璁惧缁勭姸鎬佸垪琛�", description = "鑾峰彇鎵�鏈夊彲鐢ㄧ殑璁惧缁勭姸鎬�")
+    @ApiOperation("鑾峰彇璁惧缁勭姸鎬佸垪琛�")
     public Result<List<String>> getGroupStatuses() {
         try {
             List<String> groupStatuses = deviceGroupConfigService.getAllGroupStatuses();
@@ -277,7 +277,7 @@
      * 娣诲姞璁惧鍒拌澶囩粍
      */
     @PostMapping("/devices")
-    @Operation(summary = "娣诲姞璁惧鍒拌澶囩粍", description = "灏嗘寚瀹氳澶囨坊鍔犲埌璁惧缁勪腑")
+    @ApiOperation("娣诲姞璁惧鍒拌澶囩粍")
     public Result<Void> addDeviceToGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -294,7 +294,7 @@
      * 浠庤澶囩粍绉婚櫎璁惧
      */
     @PostMapping("/devices/remove")
-    @Operation(summary = "浠庤澶囩粍绉婚櫎璁惧", description = "浠庤澶囩粍涓Щ闄ゆ寚瀹氳澶�")
+    @ApiOperation("浠庤澶囩粍绉婚櫎璁惧")
     public Result<Void> removeDeviceFromGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -310,7 +310,7 @@
      * 鏇存柊璁惧瑙掕壊
      */
     @PostMapping("/devices/role")
-    @Operation(summary = "鏇存柊璁惧瑙掕壊", description = "鏇存柊璁惧鍦ㄨ澶囩粍涓殑瑙掕壊")
+    @ApiOperation("鏇存柊璁惧瑙掕壊")
     public Result<Void> updateDeviceRole(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -327,7 +327,7 @@
      * 鑾峰彇璁惧缁勮澶囧垪琛�
      */
     @PostMapping("/devices/list")
-    @Operation(summary = "鑾峰彇璁惧缁勮澶囧垪琛�", description = "鑾峰彇鎸囧畾璁惧缁勪笅鐨勬墍鏈夎澶�")
+    @ApiOperation("鑾峰彇璁惧缁勮澶囧垪琛�")
     public Result<List<DeviceGroupVO.DeviceInfo>> getGroupDevices(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -343,7 +343,7 @@
      * 鑾峰彇璁惧璁惧缁勫垪琛�
      */
     @PostMapping("/devices/groups")
-    @Operation(summary = "鑾峰彇璁惧璁惧缁勫垪琛�", description = "鑾峰彇鎸囧畾璁惧鎵�灞炵殑鎵�鏈夎澶囩粍")
+    @ApiOperation("鑾峰彇璁惧璁惧缁勫垪琛�")
     public Result<List<DeviceGroupVO.GroupInfo>> getDeviceGroups(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -359,7 +359,7 @@
      * 鎵归噺娣诲姞璁惧鍒拌澶囩粍
      */
     @PostMapping("/batch-add-devices")
-    @Operation(summary = "鎵归噺娣诲姞璁惧鍒拌澶囩粍", description = "鎵归噺灏嗘寚瀹氳澶囧垪琛ㄦ坊鍔犲埌璁惧缁勪腑")
+    @ApiOperation("鎵归噺娣诲姞璁惧鍒拌澶囩粍")
     public Result<Void> batchAddDevicesToGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -375,7 +375,7 @@
      * 鎵归噺浠庤澶囩粍绉婚櫎璁惧
      */
     @PostMapping("/devices/batch-remove")
-    @Operation(summary = "鎵归噺浠庤澶囩粍绉婚櫎璁惧", description = "鎵归噺浠庤澶囩粍涓Щ闄ゆ寚瀹氳澶囧垪琛�")
+    @ApiOperation("鎵归噺浠庤澶囩粍绉婚櫎璁惧")
     public Result<Void> batchRemoveDevicesFromGroup(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -391,7 +391,7 @@
      * 璁惧缁勫仴搴锋鏌�
      */
     @PostMapping("/health-check")
-    @Operation(summary = "璁惧缁勫仴搴锋鏌�", description = "瀵规寚瀹氳澶囩粍杩涜鍋ュ悍妫�鏌�")
+    @ApiOperation("璁惧缁勫仴搴锋鏌�")
     public Result<DeviceGroupVO.HealthCheckResult> performGroupHealthCheck(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {
@@ -407,7 +407,7 @@
      * 鑾峰彇璁惧缁勬�ц兘缁熻
      */
     @PostMapping("/performance")
-    @Operation(summary = "鑾峰彇璁惧缁勬�ц兘缁熻", description = "鑾峰彇鎸囧畾璁惧缁勭殑鎬ц兘缁熻淇℃伅")
+    @ApiOperation("鑾峰彇璁惧缁勬�ц兘缁熻")
     public Result<DeviceGroupVO.PerformanceStats> getGroupPerformance(
             @Valid @RequestBody DeviceGroupRequest request) {
         try {

--
Gitblit v1.8.0