From 22fee1efabe983c7c9ea9d3ee627e2a4319c0fc5 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 04 十二月 2023 15:30:06 +0800 Subject: [PATCH] *Mapper.java和*Mapper.xml中的insert方法改名为putin,哪果不改运行时会产生警告,警告insert已经加载过了,实际是MyBattisPlus的默认实现BaseMapper.java中已经存有instert方法 --- pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/Server.java | 60 ++++++++++++++++++++++++++---------------------------------- 1 files changed, 26 insertions(+), 34 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/Server.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/Server.java index 6829b00..a368845 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/Server.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/Server.java @@ -3,7 +3,10 @@ import java.util.ArrayList; import java.util.List; -import com.dy.aceMw.server.tasks.BusiConstantTask; +import com.dy.aceMw.server.*; +import com.dy.aceMw.server.rtuData.RtuDataUnit; +import com.dy.aceMw.server.rtuData.RtuDataUnitConfigVo; +import com.dy.aceMw.server.tasks.FromRtuConstantTask; import com.dy.common.mw.UnitInterface; import com.dy.common.mw.UnitStartedCallbackInterface; import com.dy.common.mw.channel.rmi.RmiConfigVo; @@ -16,16 +19,9 @@ import com.dy.common.mw.protocol.ProtocolUnit; import com.dy.common.mw.support.SupportUnit; import com.dy.common.mw.support.SupportUnitConfigVo; -import com.dy.aceMw.server.AdapterImp_CoreUnit; -import com.dy.aceMw.server.AdapterImp_ProtocolUnit; -import com.dy.aceMw.server.AdapterImp_RmiUnit; -import com.dy.aceMw.server.AdapterImp_TcpUnit; -import com.dy.aceMw.server.ServerProperties; import com.dy.aceMw.server.tasks.ToRtuConstantTask; -import com.dy.aceMw.server.AdapterImp_SupportUnit; import com.dy.aceMw.resource.ResourceUnit; import com.dy.aceMw.resource.ResourceUnitConfigVo; -import com.dy.aceMw.server.AdapterImp_ResourceUnit; import com.dy.common.springUtil.SpringContextUtil; import com.dy.common.util.ConfigXml; import com.dy.common.util.IDLongGenerator; @@ -147,7 +143,7 @@ //TCP涓婅鏁版嵁鏃跺埢缂撳瓨鏃堕暱锛屽綋杈惧埌鏃堕暱鏃讹紝TCP涓婅鏁版嵁鏃跺埢琚竻绌猴紝閲囩敤TCP涓婅鏁版嵁鏃跺埢鐩殑鏄紝闃绘涓婃暟鎹悓鏃朵笅鍙戞暟鎹紝鍥犱负RTU澶勭悊涓嶈繃鏉� ServerProperties.lastUpDataTimeLive = conf.getSetAttrPlusInt(doc, "config.base", "lastUpDataTimeLive", null, 0, 5, null) * 1000L ; //鏁版嵁搴撴暟鎹甶d鐢熸垚鍣ㄧ殑id鍚庣紑锛�0鏄粯璁ょ殑鍚庣紑锛屼竴鑸瑆eb绯荤粺搴旂敤锛屾暟鎹腑闂翠欢id鍚庣紑澶т簬绛変簬1 - ServerProperties.dbDataIdSuffix = conf.getSetAttrInt(doc, "config.base", "dbDataIdSuffix", null, 1, 9, null); + ServerProperties.dbDataIdSuffix = conf.getSetAttrInt(doc, "config.base", "dbDataIdSuffix", null, 0, 99, null); //涓婁笅琛屾暟鎹紦瀛橀槦鍒椾腑缂撳瓨鏁版嵁涓暟鐨勬姤璀﹂噺锛岃繖涓笌鐜板疄椤圭洰鎵�鎺ユ按琛ㄦ暟鐩稿叧 ServerProperties.cacheUpDownDataWarnCount = conf.getSetAttrPlusInt(doc, "config.base", "cacheUpDownDataWarnCount", null, 1, null, null) ; //涓婁笅琛屾暟鎹紦瀛橀槦鍒椾腑缂撳瓨鏁版嵁涓暟鐨勬渶澶у�硷紝杩欎釜涓庣幇瀹為」鐩墍鎺ユ按琛ㄦ暟鐩稿叧 @@ -172,10 +168,7 @@ protoAdap.setConfig(protoVo); ProtocolUnit protoUnit = ProtocolUnit.getInstance(); protoUnit.setAdapter(protoAdap); - protoUnit.start(new UnitStartedCallbackInterface(){ - @Override - public void call(Object obj) { - } + protoUnit.start(obj -> { }); units.add(protoUnit) ; @@ -225,10 +218,7 @@ supAdap.setConfig(supVo); SupportUnit supUnit = SupportUnit.getInstance() ; supUnit.setAdapter(supAdap); - supUnit.start(new UnitStartedCallbackInterface(){ - @Override - public void call(Object obj) { - } + supUnit.start(obj -> { }); units.add(supUnit) ; @@ -257,10 +247,7 @@ //褰撳墠鏀寔spring + hibernate resUnit.setSpringContext(SpringContextUtil.getApplicationContext()); - resUnit.start(new UnitStartedCallbackInterface(){ - @Override - public void call(Object obj) { - } + resUnit.start(obj -> { }); units.add(resUnit) ; @@ -277,14 +264,25 @@ rmiAdap.setConfig(rmiVo); RmiUnit rmiUnit = RmiUnit.getInstance(); rmiUnit.setAdapter(rmiAdap); - rmiUnit.start(new UnitStartedCallbackInterface(){ - @Override - public void call(Object obj) { - } + rmiUnit.start(obj -> { }); RmiSvUrl = "[ip]:" + rmiVo.port + "/" + rmiVo.context ; units.add(rmiUnit) ; } + + + ///////////////// + //RTU涓婅鏁版嵁澶勭悊妯″潡 + RtuDataUnitConfigVo rducVo = new RtuDataUnitConfigVo(); + AdapterImp_RtuDataUnit rducAdap = new AdapterImp_RtuDataUnit(); + rducAdap.setConfig(rducVo); + RtuDataUnit rducUnit = RtuDataUnit.getInstance(); + rducUnit.setAdapter(rducAdap); + rducUnit.start(obj -> { + }); + units.add(rducUnit) ; + + // /////////////// // 鏍稿績 @@ -299,11 +297,8 @@ CoreUnit coreUnit = CoreUnit.getInstance(); coreUnit.setAdapter(coreAdap); CoreUnit.addConstantTask(new ToRtuConstantTask()); - CoreUnit.addConstantTask(new BusiConstantTask()); - coreUnit.start(new UnitStartedCallbackInterface(){ - @Override - public void call(Object obj) { - } + CoreUnit.addConstantTask(new FromRtuConstantTask()); + coreUnit.start(obj -> { }); units.add(coreUnit) ; @@ -321,10 +316,7 @@ tcpAdap.setConfig(tcpVo); TcpUnit tcpUnit = TcpUnit.getInstance(); tcpUnit.setAdapter(tcpAdap); - tcpUnit.start(new UnitStartedCallbackInterface(){ - @Override - public void call(Object obj) { - } + tcpUnit.start(obj -> { }); TcpSvUrl = "[ip]:" + tcpVo.port ; units.add(tcpUnit) ; -- Gitblit v1.8.0