From 05c3f58d6561c89019532bdeb65365f8129504c3 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期三, 16 十月 2024 08:47:45 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java
index 7d5ced8..927c1b0 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/CommandInnerDeaLer.java
@@ -1,6 +1,6 @@
 package com.dy.rtuMw.server.local;
 
-import com.dy.common.mw.UnitStartedCallbackInterface;
+import com.dy.common.mw.UnitCallbackInterface;
 import com.dy.common.mw.channel.tcp.TcpUnit;
 import com.dy.common.mw.protocol.Command;
 import com.dy.rtuMw.server.local.localProtocol.*;
@@ -23,13 +23,15 @@
             return this.clock(com) ;
         }else if(code.equals(CodeLocal.onLine)){
             return this.onLine(com) ;
+        }else if(code.equals(CodeLocal.onLineStatistics)){
+            return this.onLineStateStatistics(com) ;
         }else if(code.equals(CodeLocal.allProtocols)){
             return this.allProtocols(com) ;
         }else if(code.equals(CodeLocal.stopTcpSv)){
             return this.stopTcpSv(com) ;
         }else if(code.equals(CodeLocal.recoverTcpSv)){
             return this.recoverTcpSv(com) ;
-        }else if(code.equals(CodeLocal.mwInfo)){
+        }else if(code.equals(CodeLocal.mwState)){
             return this.mwInfo(com) ;
         }
         return ReturnCommand.errored("鍑洪敊锛屾敹鍒板唴閮ㄥ懡浠ょ殑鍔熻兘鐮佷笉鑳借瘑鍒紒", com.getId(), com.getCode()) ;
@@ -54,6 +56,15 @@
     }
 
     /**
+     * 缁熻鍦ㄧ嚎涓庝笉鍦ㄧ嚎鎯呭喌
+     * @throws Exception
+     */
+    private Command onLineStateStatistics(Command command) throws Exception{
+        RtuOnLineStateStatisticsVo vo = new RtuOnLineStateStatisticsDeal().deal() ;
+        return ReturnCommand.successed("鏌ヨ鎵�鏈夋祴绔欏湪绾挎儏鍐电粨鏋�", command.getId(), command.getCode(), vo) ;
+    }
+
+    /**
      * 鏌ヨ鎵�鏈塕TU鍗忚閰嶇疆
      * @throws Exception
      */
@@ -67,7 +78,7 @@
      * @throws Exception
      */
     private Command stopTcpSv(Command command) throws Exception{
-        TcpUnit.getInstance().stop(new UnitStartedCallbackInterface(){
+        TcpUnit.getInstance().stop(new UnitCallbackInterface(){
             public void call(Object obj) throws Exception {
 
             }

--
Gitblit v1.8.0