From e76f0739e647fe8a7e0e2618914e2faff554b1b7 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 17 十一月 2025 17:33:23 +0800
Subject: [PATCH] 解决冲突

---
 mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java |  194 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 194 insertions(+), 0 deletions(-)

diff --git a/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java b/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java
new file mode 100644
index 0000000..52971fc
--- /dev/null
+++ b/mes-processes/mes-plcSend/src/main/java/com/mes/device/service/DeviceGroupConfigService.java
@@ -0,0 +1,194 @@
+package com.mes.device.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mes.device.entity.DeviceGroupConfig;
+import com.mes.device.vo.DeviceGroupConfigVO;
+import com.mes.device.vo.DeviceGroupVO;
+import com.mes.device.vo.StatisticsVO;
+
+/**
+ * 璁惧缁勯厤缃湇鍔℃帴鍙�
+ */
+public interface DeviceGroupConfigService extends IService<DeviceGroupConfig> {
+
+    /**
+     * 鍒涘缓璁惧缁勯厤缃�
+     * @param groupConfig 璁惧缁勯厤缃俊鎭�
+     * @return 鏄惁鍒涘缓鎴愬姛
+     */
+    boolean createDeviceGroup(DeviceGroupConfig groupConfig);
+
+    /**
+     * 鏇存柊璁惧缁勯厤缃�
+     * @param groupConfig 璁惧缁勯厤缃俊鎭�
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean updateDeviceGroup(DeviceGroupConfig groupConfig);
+
+    /**
+     * 鍒犻櫎璁惧缁勯厤缃�
+     * @param id 璁惧缁処D
+     * @return 鏄惁鍒犻櫎鎴愬姛
+     */
+    boolean deleteDeviceGroup(Long id);
+
+    /**
+     * 鏌ヨ璁惧缁勯厤缃鎯�
+     * @param id 璁惧缁処D
+     * @return 璁惧缁勯厤缃俊鎭�
+     */
+    DeviceGroupConfig getDeviceGroupById(Long id);
+
+    /**
+     * 鏍规嵁璁惧缁勭紪鍙锋煡璇㈣澶囩粍閰嶇疆
+     * @param groupCode 璁惧缁勭紪鍙�
+     * @return 璁惧缁勯厤缃俊鎭�
+     */
+    DeviceGroupConfig getDeviceGroupByCode(String groupCode);
+
+    /**
+     * 鏌ヨ璁惧缁勯厤缃垪琛�
+     * @param projectId 椤圭洰ID
+     * @param groupType 璁惧缁勭被鍨�
+     * @param status 璁惧缁勭姸鎬�
+     * @return 璁惧缁勯厤缃垪琛�
+     */
+    java.util.List<DeviceGroupConfig> getDeviceGroupList(Long projectId, Integer groupType, Integer status);
+
+    /**
+     * 鍒嗛〉鏌ヨ璁惧缁勯厤缃垪琛�
+     * @param projectId 椤圭洰ID
+     * @param groupType 璁惧缁勭被鍨�
+     * @param groupStatus 璁惧缁勭姸鎬�
+     * @param keyword 鎼滅储鍏抽敭璇�
+     * @param page 椤电爜
+     * @param size 姣忛〉澶у皬
+     * @return 璁惧缁勫垎椤靛垪琛�
+     */
+  Page<DeviceGroupVO.GroupInfo> getDeviceGroupList(
+            Long projectId, String groupType, String groupStatus, String keyword, Integer page, Integer size);
+
+    /**
+     * 鏌ヨ璁惧缁勯厤缃甐O鍒楄〃
+     * @param projectId 椤圭洰ID
+     * @param groupType 璁惧缁勭被鍨�
+     * @param status 璁惧缁勭姸鎬�
+     * @return 璁惧缁勯厤缃甐O鍒楄〃
+     */
+    java.util.List<DeviceGroupConfigVO.GroupInfo> getDeviceGroupVOList(Long projectId, Integer groupType, Integer status);
+
+    /**
+     * 妫�鏌ヨ澶囩粍缂栧彿鏄惁瀛樺湪
+     * @param groupCode 璁惧缁勭紪鍙�
+     * @param excludeId 鎺掗櫎鐨勮澶囩粍ID
+     * @return 鏄惁瀛樺湪
+     */
+    boolean isGroupCodeExists(String groupCode, Long excludeId);
+
+    /**
+     * 鏇存柊璁惧缁勭姸鎬�
+     * @param id 璁惧缁処D
+     * @param status 鏂扮姸鎬�
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean updateDeviceGroupStatus(Long id, Integer status);
+
+    /**
+     * 鎵归噺鏇存柊璁惧缁勭姸鎬�
+     * @param ids 璁惧缁処D鍒楄〃
+     * @param status 鏂扮姸鎬�
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean batchUpdateDeviceGroupStatus(java.util.List<Long> ids, Integer status);
+
+    /**
+     * 鑾峰彇璁惧缁勭殑鎵╁睍閰嶇疆
+     * @param id 璁惧缁処D
+     * @return 鎵╁睍閰嶇疆瀛楀吀
+     */
+    java.util.Map<String, Object> getExtraConfig(Long id);
+
+    /**
+     * 鏇存柊璁惧缁勭殑鎵╁睍閰嶇疆
+     * @param id 璁惧缁処D
+     * @param extraConfig 鎵╁睍閰嶇疆瀛楀吀
+     * @return 鏄惁鏇存柊鎴愬姛
+     */
+    boolean updateExtraConfig(Long id, java.util.Map<String, Object> extraConfig);
+
+    /**
+     * 鑾峰彇璁惧缁勪笅鐨勮澶囨暟閲�
+     * @param groupId 璁惧缁処D
+     * @return 璁惧鏁伴噺
+     */
+    int getDeviceCountByGroupId(Long groupId);
+
+    /**
+     * 鑾峰彇鍦ㄧ嚎璁惧缁勬暟閲�
+     * @param projectId 椤圭洰ID
+     * @return 鍦ㄧ嚎璁惧缁勬暟閲�
+     */
+    int getOnlineDeviceGroupCount(Long projectId);
+
+    /**
+     * 鑾峰彇璁惧缁勭粺璁′俊鎭�
+     * @param projectId 椤圭洰ID
+     * @return 璁惧缁勭粺璁′俊鎭�
+     */
+    StatisticsVO.GroupStatistics getDeviceGroupStatistics(Long projectId);
+
+    /**
+     * 鑾峰彇璁惧缁勬�ц兘缁熻
+     * @param groupId 璁惧缁処D
+     * @return 璁惧缁勬�ц兘缁熻淇℃伅
+     */
+    DeviceGroupVO.PerformanceStats getGroupPerformance(Long groupId);
+
+    /**
+     * 鎵ц璁惧缁勫仴搴锋鏌�
+     * @param groupId 璁惧缁処D
+     * @return 鍋ュ悍妫�鏌ョ粨鏋�
+     */
+    DeviceGroupVO.HealthCheckResult performGroupHealthCheck(Long groupId);
+
+    /**
+     * 鍚敤璁惧缁�
+     * @param id 璁惧缁処D
+     * @return 鏄惁鍚敤鎴愬姛
+     */
+    boolean enableDeviceGroup(Long id);
+
+    /**
+     * 绂佺敤璁惧缁�
+     * @param id 璁惧缁処D
+     * @return 鏄惁绂佺敤鎴愬姛
+     */
+    boolean disableDeviceGroup(Long id);
+
+    /**
+     * 鎵归噺鍚敤璁惧缁�
+     * @param groupIds 璁惧缁処D鍒楄〃
+     * @return 鏄惁鍚敤鎴愬姛
+     */
+    boolean batchEnableDeviceGroups(java.util.List<Long> groupIds);
+
+    /**
+     * 鎵归噺绂佺敤璁惧缁�
+     * @param groupIds 璁惧缁処D鍒楄〃
+     * @return 鏄惁绂佺敤鎴愬姛
+     */
+    boolean batchDisableDeviceGroups(java.util.List<Long> groupIds);
+
+    /**
+     * 鑾峰彇鎵�鏈夎澶囩粍绫诲瀷
+     * @return 璁惧缁勭被鍨嬪垪琛�
+     */
+    java.util.List<String> getAllGroupTypes();
+
+    /**
+     * 鑾峰彇鎵�鏈夎澶囩粍鐘舵��
+     * @return 璁惧缁勭姸鎬佸垪琛�
+     */
+    java.util.List<String> getAllGroupStatuses();
+}
\ No newline at end of file

--
Gitblit v1.8.0