From 20b400c3fd2d1c0540a739c81ca0a145e7a3ce7b Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期一, 23 六月 2025 14:09:23 +0800 Subject: [PATCH] refactor(card): 根据水卡编号获取卡信息 --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java index 42d074e..23b2675 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java @@ -185,6 +185,7 @@ /** * 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛� + * @param comId 鍛戒护ID * @param code 鍛戒护code * @return */ @@ -197,7 +198,42 @@ } /** + * 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛� + * @param rtuAddr 鎺у埗鍣ㄥ湴鍧� + * @param comId 鍛戒护ID + * @param code 鍛戒护code + * @return + */ + public Command createOuterCommand(String rtuAddr, String comId, String code) { + Command com = new Command(); + com.id = comId; + com.rtuAddr = rtuAddr; + com.code = code ; + com.type = CommandType.outerCommand; + return com ; + } + + /** + * 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛� + * @param fboxId FBox璁惧搴忓垪鍙� + * @param comId 鍛戒护ID + * @param code 鍛戒护code + * @return + */ + public Command createMQTTCommand(String fboxId, String comId, String protocol, Short protocolVer, String code) { + Command com = new Command(); + com.id = comId; + com.rtuAddr = fboxId; + com.code = code ; + com.protocol = protocol ; + com.protocolVersion = protocolVer ; + com.type = CommandType.mqttCommand; + return com ; + } + + /** * 鍒涘缓澶栭儴閫忎紶鍛戒护锛堝彂缁欐帶鍒跺櫒锛� + * @param comId 鍛戒护ID * @param code 鍛戒护code * @return */ @@ -210,6 +246,22 @@ } /** + * 鍒涘缓澶栭儴閫忎紶鍛戒护锛堝彂缁欐帶鍒跺櫒锛� + * @param rtuAddr 鎺у埗鍣ㄥ湴鍧� + * @param comId 鍛戒护ID + * @param code 鍛戒护code + * @return + */ + public Command createOuterTransparentCommand(String rtuAddr, String comId, String code) { + Command com = new Command(); + com.id = comId; + com.rtuAddr = rtuAddr; + com.code = code ; + com.type = CommandType.outerTransCommand; + return com ; + } + + /** * 鍒涘缓鍐呴儴鍛戒护 * @param code 鍛戒护code * @return -- Gitblit v1.8.0