From 2143f8b302fbf240d04a3cfa487d10f80a0a39a0 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Mon, 21 Nov 2022 11:22:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8B=8F=E5=AE=89=E9=99=A2?= =?UTF-8?q?=E5=AE=9E=E4=BD=93IBP=E7=9B=98=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/project/DeviceController.java | 6 + .../services/VirtualRealityIbpService.java | 2 +- .../rtss/services/project/DeviceService.java | 2 + .../services/project/DeviceServiceImpl.java | 46 + .../ProjectJointSimulationServiceImpl.java | 8 + .../cbtc/data/vr/VirtualRealityIbp.java | 4 + .../real/modbustcp/PlcGatewayService.java | 4 +- .../real/modbustcp/say/SayIbpConfig.java | 30 + .../real/modbustcp/say/SayIbpServiceImpl.java | 595 +++++++++ .../vo/client/project/ProjectDeviceVO.java | 19 + .../vo/client/project/say/SayIbpConfigVO.java | 1169 +++++++++++++++++ src/main/resources/application.yml | 2 +- 12 files changed, 1883 insertions(+), 4 deletions(-) create mode 100644 src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpConfig.java create mode 100644 src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpServiceImpl.java create mode 100644 src/main/java/club/joylink/rtss/vo/client/project/say/SayIbpConfigVO.java diff --git a/src/main/java/club/joylink/rtss/controller/project/DeviceController.java b/src/main/java/club/joylink/rtss/controller/project/DeviceController.java index 6d033e0e1..949c9d44c 100644 --- a/src/main/java/club/joylink/rtss/controller/project/DeviceController.java +++ b/src/main/java/club/joylink/rtss/controller/project/DeviceController.java @@ -256,4 +256,10 @@ public class DeviceController { AccountVO accountVO) { this.deviceService.addOrUpdateHhcjDeviceConfig(accountVO); } + + @PostMapping("/say/addOrUpdate") + public void addOrUpdateSayDeviceConfig(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + AccountVO accountVO) { + this.deviceService.addOrUpdateSayDeviceConfig(accountVO); + } } diff --git a/src/main/java/club/joylink/rtss/services/VirtualRealityIbpService.java b/src/main/java/club/joylink/rtss/services/VirtualRealityIbpService.java index edc6323dd..c5b89def7 100644 --- a/src/main/java/club/joylink/rtss/services/VirtualRealityIbpService.java +++ b/src/main/java/club/joylink/rtss/services/VirtualRealityIbpService.java @@ -104,7 +104,7 @@ public class VirtualRealityIbpService implements IVirtualRealityIbpService { break; case JJTC: stands.forEach(stand -> ciApiService.standEC(simulation, stand)); - ibp.query(VirtualRealityIbp.Mean.SIGNAL_ALARM, null).orderToOn(); //考虑兼容上下行都有蜂鸣器的情况 + ibp.query(VirtualRealityIbp.Mean.SIGNAL_ALARM, element.getUp()).orderToOn(); //考虑兼容上下行都有蜂鸣器的情况 break; case QXJJTC: stands.forEach(stand -> ciApiService.cancelStandEC(simulation, stand)); diff --git a/src/main/java/club/joylink/rtss/services/project/DeviceService.java b/src/main/java/club/joylink/rtss/services/project/DeviceService.java index b9818eae4..a6c7e4a76 100644 --- a/src/main/java/club/joylink/rtss/services/project/DeviceService.java +++ b/src/main/java/club/joylink/rtss/services/project/DeviceService.java @@ -190,4 +190,6 @@ public interface DeviceService { void addOrUpdateSrDeviceConfig(AccountVO accountVO, Long mapId); void addOrUpdateHhcjDeviceConfig(AccountVO accountVO); + + void addOrUpdateSayDeviceConfig(AccountVO accountVO); } diff --git a/src/main/java/club/joylink/rtss/services/project/DeviceServiceImpl.java b/src/main/java/club/joylink/rtss/services/project/DeviceServiceImpl.java index 90519eef7..4ad9e69ee 100644 --- a/src/main/java/club/joylink/rtss/services/project/DeviceServiceImpl.java +++ b/src/main/java/club/joylink/rtss/services/project/DeviceServiceImpl.java @@ -19,6 +19,7 @@ import club.joylink.rtss.vo.client.project.hhcj.HhcjPsdConfigVO; import club.joylink.rtss.vo.client.project.richor.ZjdIbpConfigVO; import club.joylink.rtss.vo.client.project.richor.ZjdPsdConfigVO; import club.joylink.rtss.vo.client.project.richor.ZjdPslConfigVO; +import club.joylink.rtss.vo.client.project.say.SayIbpConfigVO; import club.joylink.rtss.vo.client.project.sdy.SdyPsdConfigVO; import club.joylink.rtss.vo.client.project.sdy.SdyPslConfigVO; import club.joylink.rtss.vo.client.project.sr.SrSectionConfigVO; @@ -464,6 +465,51 @@ public class DeviceServiceImpl implements DeviceService { } } + @Override + public void addOrUpdateSayDeviceConfig(AccountVO accountVO) { + // 删除旧配置 + ProjectDeviceExample example = new ProjectDeviceExample(); + example.createCriteria() + .andProjectCodeEqualTo(Project.RICHOR_HHCJ.name()) + .andTypeIn(ProjectDeviceType.PlcDeviceList().stream() + .map(Enum::name).collect(Collectors.toList())); + this.projectDeviceDAO.deleteByExample(example); + // 保存新配置 + List list = this.buildSayProjectDevices(accountVO); + for (ProjectDevice projectDevice : list) { + this.projectDeviceDAO.insert(projectDevice); + } + } + + private List buildSayProjectDevices(AccountVO accountVO) { + LocalDateTime now = LocalDateTime.now(); + List list = new ArrayList<>(); + String projectCode = Project.SAY.name(); + String prefix = "say-"; + // PLC网关 + ProjectDevice plcGateway = new ProjectDevice(); + plcGateway.setProjectCode(projectCode); + plcGateway.setCode(prefix + "gateway"); + plcGateway.setType(ProjectDeviceType.PLC_GATEWAY.name()); + plcGateway.setCreator(accountVO.getId()); + plcGateway.setCreateTime(now); + PlcGatewayConfigVO plcGatewayConfigVO = new PlcGatewayConfigVO(0, 256); + plcGateway.setConfig(plcGatewayConfigVO.toJson()); + list.add(plcGateway); + // IBP盘 + ProjectDevice ibp = new ProjectDevice(); + ibp.setProjectCode(projectCode); + ibp.setCode(prefix + "ibp"); + ibp.setType(ProjectDeviceType.IBP.name()); + ibp.setCreator(accountVO.getId()); + ibp.setCreateTime(now); + SayIbpConfigVO ibpConfigVO = new SayIbpConfigVO(); + ibp.setConfig(ibpConfigVO.toJson()); + list.add(ibp); + + return list; + } + private List buildHhcjProjectDevices(AccountVO accountVO) { LocalDateTime now = LocalDateTime.now(); List list = new ArrayList<>(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ProjectJointSimulationServiceImpl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ProjectJointSimulationServiceImpl.java index c005adfdc..339892ba7 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ProjectJointSimulationServiceImpl.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ProjectJointSimulationServiceImpl.java @@ -16,6 +16,7 @@ import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.heb.device.Heb1Ps import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.heb.device.Heb1PslConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.hhcj.HhcjIbpConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.hhcj.HhcjPsdConfig; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.say.SayIbpConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.xty.XtyPsdConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.zjd.ZjdIbpConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.zjd.ZjdPslConfig; @@ -181,6 +182,13 @@ public class ProjectJointSimulationServiceImpl implements ProjectJointSimulation } break; } + case SAY: { + switch (config.getDeviceType()) { + case IBP: + return ((SayIbpConfig) config).getConfigVO().getIbpCode(); + } + break; + } } return null; } diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java index a28cf01fb..f9c48e560 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityIbp.java @@ -191,6 +191,10 @@ public class VirtualRealityIbp extends VirtualRealityDevice { this.turnOn = false; this.turnOff = true; } + + public boolean isLight() { + return Type.LIGHT.equals(this.type); + } } @Getter diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/PlcGatewayService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/PlcGatewayService.java index c267c2f73..98f2c42a1 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/PlcGatewayService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/PlcGatewayService.java @@ -1,10 +1,10 @@ package club.joylink.rtss.simulation.cbtc.device.real.modbustcp; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.handler.ModbusMessageHandler2; +import club.joylink.rtss.vo.client.project.PlcGatewayConfigVO; import com.digitalpetri.modbus.requests.ModbusRequest; import com.digitalpetri.modbus.requests.ReadCoilsRequest; import com.digitalpetri.modbus.responses.ReadCoilsResponse; -import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.handler.ModbusMessageHandler2; -import club.joylink.rtss.vo.client.project.PlcGatewayConfigVO; import io.netty.channel.Channel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpConfig.java b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpConfig.java new file mode 100644 index 000000000..da5172d59 --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpConfig.java @@ -0,0 +1,30 @@ +package club.joylink.rtss.simulation.cbtc.device.real.modbustcp.say; + +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.device.RealDeviceConfig; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.vo.client.project.ProjectDeviceVO; +import club.joylink.rtss.vo.client.project.say.SayIbpConfigVO; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class SayIbpConfig extends RealDeviceConfig { + private SayIbpConfigVO configVO; + + //防淹门(上行关门到位) + private boolean fymSxKmdw; + private boolean fymXxKmdw; + //排烟风机(1号风机运行) + private boolean pyfj1Yx; + private boolean pyfj2Yx; + //消防水泵(1/2号运行) + private boolean xfsbYx; + + public SayIbpConfig(ProjectDeviceVO projectDevice) { + super(projectDevice); + if (projectDevice != null) { + this.configVO = JsonUtils.read(projectDevice.getConfig(), SayIbpConfigVO.class); + } + } +} diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpServiceImpl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpServiceImpl.java new file mode 100644 index 000000000..5b20f2c2c --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/say/SayIbpServiceImpl.java @@ -0,0 +1,595 @@ +package club.joylink.rtss.simulation.cbtc.device.real.modbustcp.say; + +import club.joylink.rtss.services.IVirtualRealityIbpService; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.PlcGatewayService; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.RealDeviceService; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.device.PlcGateway; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.device.RealDeviceConfig; +import club.joylink.rtss.vo.client.project.say.SayIbpConfigVO; +import io.netty.buffer.ByteBuf; +import io.netty.channel.Channel; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Objects; + +@Service +public class SayIbpServiceImpl implements RealDeviceService { + @Autowired + private IVirtualRealityIbpService iVirtualRealityIbpService; + @Autowired + private PlcGatewayService plcGatewayService; + + @Override + public boolean canHandle(RealDeviceConfig deviceConfig) { + return deviceConfig instanceof SayIbpConfig; + } + + @Override + public void init(Simulation simulation, RealDeviceConfig deviceConfig) { + PlcGateway plcGateway = simulation.queryPlcGatewayDevice(); + if (plcGateway == null) + return; + SayIbpConfig config = (SayIbpConfig) deviceConfig; + VirtualRealityIbp vrIbp = (VirtualRealityIbp) config.getMapElement(); + if (vrIbp == null) + return; + SayIbpConfigVO configVO = config.getConfigVO(); + int baseAddr = plcGateway.getConfig().getAddr() + configVO.getAddr(); + Channel channel = plcGateway.getChannel(); + //防淹门默认车站控制 + plcGatewayService.writeSingleCoil(baseAddr, configVO.getFym_w_sxczkz_d(), true, channel); + plcGatewayService.writeSingleCoil(baseAddr, configVO.getFym_w_xxczkz_d(), true, channel); + plcGatewayService.writeSingleCoil(baseAddr, configVO.getFym_w_sxjdkz_d(), false, channel); + plcGatewayService.writeSingleCoil(baseAddr, configVO.getFym_w_xxjdkz_d(), false, channel); + } + + @Override + public void handle(Simulation simulation, RealDeviceConfig deviceConfig, ByteBuf byteBuf) { + PlcGateway plcGateway = simulation.queryPlcGatewayDevice(); + if (plcGateway == null) + return; + SayIbpConfig config = (SayIbpConfig) deviceConfig; + VirtualRealityIbp vrIbp = (VirtualRealityIbp) config.getMapElement(); + if (vrIbp == null) + return; + SayIbpConfigVO configVO = config.getConfigVO(); + ByteBuf deviceStatus = RealDeviceConfig.getDeviceCoilStatus(byteBuf, configVO.getAddr(), configVO.getQuantity()); + //总试灯 + boolean zsd_r_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZsd_r_kg()); + //------------------------------ 信号 ------------------------------ + boolean xh_r_xxkc_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_xxkc_kg()); + boolean xh_r_xxqxkc_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_xxqxkc_kg()); + boolean xh_r_xxjjtc_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_xxjjtc_kg()); + boolean xh_r_xxqxjt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_xxqxjt_kg()); + boolean xh_r_xxqdbj_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_xxqdbj_kg()); + boolean xh_r_sxkc_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_sxkc_kg()); + boolean xh_r_sxqxkc_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_sxqxkc_kg()); + boolean xh_r_sxjjtc_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_sxjjtc_kg()); + boolean xh_r_sxqxjt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_sxqxjt_kg()); + boolean xh_r_sxqdbj_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_sxqdbj_kg()); + boolean xh_r_sd_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_r_xhsd_kg()); + + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KC, false, xh_r_xxkc_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.ZZKC, false, xh_r_xxqxkc_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.JJTC, false, xh_r_xxjjtc_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.QXJJTC, false, xh_r_xxqxjt_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.BJQC, false, xh_r_xxqdbj_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KC, true, xh_r_sxkc_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.ZZKC, true, xh_r_sxqxkc_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.JJTC, true, xh_r_sxjjtc_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.QXJJTC, true, xh_r_sxqxjt_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.BJQC, true, xh_r_sxqdbj_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.SD, null, xh_r_sd_kg); + + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.KC, false, xh_r_xxkc_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.JJTC, false, xh_r_xxjjtc_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.QXJJTC, false, xh_r_xxqxjt_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.BJQC, false, xh_r_xxqdbj_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.KC, true, xh_r_sxkc_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.JJTC, true, xh_r_sxjjtc_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.QXJJTC, true, xh_r_sxqxjt_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.BJQC, true, xh_r_sxqdbj_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.SD, null, xh_r_sd_kg); + + boolean xh_w_xxkc_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_xxkc_d()); + boolean xh_w_xxqxkc_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_xxqxkc_kgd()); + boolean xh_w_xxjjtc_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_xxjjtc_d()); + boolean xh_w_xxjtbj_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_xxjtbj_fmq()); + boolean xh_w_sxkc_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_sxkc_d()); + boolean xh_w_sxqxkc_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_sxqxkc_kgd()); + boolean xh_w_sxjjtc_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_sxjjtc_d()); + boolean xh_w_sxjtbj_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXh_w_sxjtbj_fmq()); + + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.kcLight, false, xh_w_xxkc_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.ZZKC, false, xh_w_xxqxkc_kgd); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.jjtcLight, false, xh_w_xxjjtc_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.SIGNAL_ALARM, false, xh_w_xxjtbj_fmq); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.kcLight, true, xh_w_sxkc_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.ZZKC, true, xh_w_sxqxkc_kgd); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.jjtcLight, true, xh_w_sxjjtc_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.SIGNAL_ALARM, true, xh_w_sxjtbj_fmq); + + //------------------------------ 屏蔽门 ------------------------------ + + boolean psd_r_xxkm_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_xxkm_kg()); + boolean psd_r_xxgm_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_xxgm_kg()); + boolean psd_r_xxpy_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_xxpy_kg()); + boolean psd_r_xxqk_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_xxqk_kg()); + boolean psd_r_sxkm_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_sxkm_kg()); + boolean psd_r_sxgm_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_sxgm_kg()); + boolean psd_r_sxpy_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_sxpy_kg()); + boolean psd_r_sxqk_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_sxqk_kg()); + boolean psd_r_sd_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_r_sd_kg()); + + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KM, false, psd_r_xxkm_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.GM, false, psd_r_xxgm_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.KM, true, psd_r_sxkm_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.GM, true, psd_r_sxgm_kg); + iVirtualRealityIbpService.pressOrRelease(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_SD, null, psd_r_sd_kg); + + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.KM, false, psd_r_xxkm_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.GM, false, psd_r_xxgm_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.KM, true, psd_r_sxkm_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.GM, true, psd_r_sxgm_kg); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.PSD_SD, null, psd_r_sd_kg); + + boolean psd_w_xxkmzt_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_xxkmzt_d()); + boolean psd_w_xxgbsj_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_xxgbsj_d()); + boolean psd_w_xxpy_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_xxpy_d()); + boolean psd_w_xxqk_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_xxqk_d()); + boolean psd_w_sxkmzt_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_sxkmzt_d()); + boolean psd_w_sxgbsj_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_sxgbsj_d()); + boolean psd_w_sxpy_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_sxpy_d()); + boolean psd_w_sxqk_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPsd_w_sxqk_d()); + + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.kmLight, false, psd_w_xxkmzt_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.gmLight, false, psd_w_xxgbsj_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.kmLight, true, psd_w_sxkmzt_d); + iVirtualRealityIbpService.updateOnOrOff(simulation, vrIbp, VirtualRealityIbp.Mean.gmLight, true, psd_w_sxgbsj_d); + + int baseAddr = plcGateway.getConfig().getAddr() + configVO.getAddr(); + Channel channel = plcGateway.getChannel(); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getPsd_w_xxpy_d(), psd_w_xxpy_d, psd_r_xxpy_kg || psd_r_sd_kg || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getPsd_w_xxqk_d(), psd_w_xxqk_d, psd_r_xxqk_kg || psd_r_sd_kg || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getPsd_w_sxpy_d(), psd_w_sxpy_d, psd_r_sxpy_kg || psd_r_sd_kg || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getPsd_w_sxqk_d(), psd_w_sxqk_d, psd_r_sxqk_kg || psd_r_sd_kg || zsd_r_kg, channel); + + for (VirtualRealityIbp.IbpElement element : vrIbp.getAllElements()) { + Boolean on; + if (element.isLight() && zsd_r_kg) { + on = true; + } else { + if (element.isTurnOn()) { + on = true; + } else if (element.isTurnOff()) { + on = false; + } else { + continue; + } + } + if (element.isLight() && zsd_r_kg) { + on = true; + } + if (element.getMean() == null) { + continue; + } + boolean currentIsOn = false; + Integer addr = null; + switch (element.getMean()) { + case KC: + break; + case ZZKC: + if (Objects.equals(true, element.getUp())) { + addr = configVO.getXh_w_sxqxkc_kgd(); + currentIsOn = xh_w_sxqxkc_kgd; + } else { + addr = configVO.getXh_w_xxqxkc_kgd(); + currentIsOn = xh_w_xxqxkc_kgd; + } + break; + case JJTC: + break; + case QXJJTC: + break; + case BJQC: + break; + case SIGNAL_ALARM: + if (Objects.equals(true, element.getUp())) { + addr = configVO.getXh_w_sxjtbj_fmq(); + currentIsOn = xh_w_sxjtbj_fmq; + } else { + addr = configVO.getXh_w_xxjtbj_fmq(); + currentIsOn = xh_w_xxjtbj_fmq; + } + break; + case kcLight: + if (Objects.equals(true, element.getUp())) { + addr = configVO.getXh_w_sxkc_d(); + currentIsOn = xh_w_sxkc_d; + } else if (Objects.equals(false, element.getUp())) { + addr = configVO.getXh_w_xxkc_d(); + currentIsOn = xh_w_xxkc_d; + } + break; + case jjtcLight: + if (Objects.equals(true, element.getUp())) { + addr = configVO.getXh_w_sxjjtc_d(); + currentIsOn = xh_w_sxjjtc_d; + } else if (Objects.equals(false, element.getUp())) { + addr = configVO.getXh_w_xxjjtc_d(); + currentIsOn = xh_w_xxjjtc_d; + } + break; + case SD: + break; + case KM: + break; + case PSD_SMKM: + break; + case GM: + break; + case XXYS: + break; + case SXYS: + break; + case PSD_HSJC: + break; + case PSD_ALARM: + break; + case PSD_BJQC: + break; + case gmLight: + if (Objects.equals(true, element.getUp())) { + addr = configVO.getPsd_w_sxgbsj_d(); + currentIsOn = psd_w_sxgbsj_d; + } else if (Objects.equals(false, element.getUp())) { + addr = configVO.getPsd_w_xxgbsj_d(); + currentIsOn = psd_w_xxgbsj_d; + } + break; + case kmLight: + if (Objects.equals(true, element.getUp())) { + addr = configVO.getPsd_w_sxkmzt_d(); + currentIsOn = psd_w_sxkmzt_d; + } else if (Objects.equals(false, element.getUp())) { + addr = configVO.getPsd_w_xxkmzt_d(); + currentIsOn = psd_w_xxkmzt_d; + } + break; + case PSD_CZYX_LIGHT: + break; + case PSD_HSJC_LIGHT: + break; + case PSD_SDCZ_LIGHT: + break; + case PSD_GZBJ_LIGHT: + break; + case PSD_SD: + break; + case AXLE_RESET: + break; + case AXLE_PRE_RESET: + break; + case PRERESET_Z: + break; + } + if (addr != null) { + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, addr, currentIsOn, on, channel); + } + } + + //------------------------------ 防淹门 ------------------------------ + boolean fym_r_xxjzqq_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_xxjzqq_kg()); + boolean fym_r_xxgb_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_xxgb_kg()); + boolean fym_r_sxkq_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_sxkq_kg()); + boolean fym_r_sxtz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_sxtz_kg()); + boolean fym_r_sxgb_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_sxgb_kg()); + boolean fym_r_sxjzqq_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_sxjzqq_kg()); + boolean fym_r_bjqr_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_bjqr_kg()); + boolean fym_r_xxkq_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_xxkq_kg()); + boolean fym_r_xxtz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_r_xxtz_kg()); + + boolean fym_w_sxgb_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxgb_kgd()); + boolean fym_w_sxkq_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxkq_kgd()); + boolean fym_w_sdzzdw_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sdzzdw_d()); + boolean fym_w_xxyjbj_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxyjbj_d()); + boolean fym_w_sxjdkz_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxjdkz_d()); + boolean fym_w_sxejbj_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxejbj_d()); + boolean fym_w_sxczkz_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxczkz_d()); + boolean fym_w_sxyjbj_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxyjbj_d()); + boolean fym_w_sxgmdw_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxgmdw_d()); + boolean fym_w_sxyxgm_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxyxgm_d()); + boolean fym_w_sxkmdw_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxkmdw_d()); + boolean fym_w_sxjxzt_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxjxzt_d()); + boolean fym_w_xxczkz_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxczkz_d()); + boolean fym_w_xxjdkz_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxjdkz_d()); + boolean fym_w_xxjxzt_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxjxzt_d()); + boolean fym_w_xxejbj_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxejbj_d()); + boolean fym_w_xxkmdw_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxkmdw_d()); + boolean fym_w_xxyxgm_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxyxgm_d()); + boolean fym_w_sxsdzzdw_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_sxsdzzdw_d()); + boolean fym_w_xxgmdw_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxgmdw_d()); + boolean fym_w_xxkq_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxkq_kgd()); + boolean fym_w_xxgb_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_xxgb_kgd()); + boolean fym_w_jl_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_jl_fmq()); + boolean fym_w_jd_fmq = RealDeviceConfig.getBitOf(deviceStatus, configVO.getFym_w_jd_fmq()); + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxgb_kgd(), fym_w_sxgb_kgd, fym_r_sxgb_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxgb_kgd(), fym_w_sxkq_kgd, fym_r_sxkq_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxgb_kgd(), fym_w_xxgb_kgd, fym_r_xxgb_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxgb_kgd(), fym_w_xxkq_kgd, fym_r_xxkq_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sdzzdw_d(), fym_w_sdzzdw_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxyjbj_d(), fym_w_xxyjbj_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxjdkz_d(), fym_w_sxjdkz_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxejbj_d(), fym_w_sxejbj_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxczkz_d(), fym_w_sxczkz_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxyjbj_d(), fym_w_sxyjbj_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxgmdw_d(), fym_w_sxgmdw_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxyxgm_d(), fym_w_sxyxgm_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxkmdw_d(), fym_w_sxkmdw_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxjxzt_d(), fym_w_sxjxzt_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxczkz_d(), fym_w_xxczkz_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxjdkz_d(), fym_w_xxjdkz_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxjxzt_d(), fym_w_xxjxzt_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxejbj_d(), fym_w_xxejbj_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxkmdw_d(), fym_w_xxkmdw_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxyxgm_d(), fym_w_xxyxgm_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxsdzzdw_d(), fym_w_sxsdzzdw_d, zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_xxgmdw_d(), fym_w_xxgmdw_d, zsd_r_kg, channel); + + //虚拟防淹门开关门 + if (fym_r_sxkq_kg) { + config.setFymSxKmdw(true); + } else if (fym_r_sxgb_kg) { + config.setFymSxKmdw(false); + } + if (fym_r_xxkq_kg) { + config.setFymXxKmdw(true); + } else if (fym_r_xxgb_kg) { + config.setFymXxKmdw(false); + } + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxkmdw_d(), fym_w_sxkmdw_d, config.isFymSxKmdw() || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxkmdw_d(), fym_w_sxgmdw_d, !config.isFymSxKmdw() || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxkmdw_d(), fym_w_xxkmdw_d, config.isFymXxKmdw() || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getFym_w_sxkmdw_d(), fym_w_xxgmdw_d, !config.isFymXxKmdw() || zsd_r_kg, channel); + + //------------------------------ 隧道通风模式 ------------------------------ + boolean sdtf_r_xpxxcwhz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xpxxcwhz_kg()); + boolean sdtf_r_xpxxcthz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xpxxcthz_kg()); + boolean sdtf_r_pmxxcthz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_pmxxcthz_kg()); + boolean sdtf_r_pmxxcwhz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_pmxxcwhz_kg()); + boolean sdtf_r_xpxxzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xpxxzs_kg()); + boolean sdtf_r_xxczsdhz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xxczsdhz_kg()); + boolean sdtf_r_pmxxzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_pmxxzs_kg()); + boolean sdtf_r_xpsxzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xpsxzs_kg()); + boolean sdtf_r_sxczsdhz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_sxczsdhz_kg()); + boolean sdtf_r_pmsxzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_pmsxzs_kg()); + boolean sdtf_r_xpsxcthz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xpsxcthz_kg()); + boolean sdtf_r_xpsxcwhz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_xpsxcwhz_kg()); + boolean sdtf_r_pmsxcwhz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_pmsxcwhz_kg()); + boolean sdtf_r_pmsxcthz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_r_pmsxcthz_kg()); + + boolean sdtf_w_xpxxcwhz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xpxxcwhz_kgd()); + boolean sdtf_w_xpxxcthz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xpxxcthz_kgd()); + boolean sdtf_w_pmxxcthz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_pmxxcthz_kgd()); + boolean sdtf_w_pmxxcwhz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_pmxxcwhz_kgd()); + boolean sdtf_w_xpxxzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xpxxzs_kgd()); + boolean sdtf_w_xxczsdhz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xxczsdhz_kgd()); + boolean sdtf_w_pmxxzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_pmxxzs_kgd()); + boolean sdtf_w_xpsxzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xpsxzs_kgd()); + boolean sdtf_w_sxczsdhz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_sxczsdhz_kgd()); + boolean sdtf_w_pmsxzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_pmsxzs_kgd()); + boolean sdtf_w_xpsxcthz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xpsxcthz_kgd()); + boolean sdtf_w_xpsxcwhz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_xpsxcwhz_kgd()); + boolean sdtf_w_pmsxcwhz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_pmsxcwhz_kgd()); + boolean sdtf_w_pmsxcthz_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getSdtf_w_pmsxcthz_kgd()); + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xpxxcwhz_kgd(), sdtf_w_xpxxcwhz_kgd, sdtf_r_xpxxcwhz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xpxxcthz_kgd(), sdtf_w_xpxxcthz_kgd, sdtf_r_xpxxcthz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_pmxxcthz_kgd(), sdtf_w_pmxxcthz_kgd, sdtf_r_pmxxcthz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_pmxxcwhz_kgd(), sdtf_w_pmxxcwhz_kgd, sdtf_r_pmxxcwhz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xpxxzs_kgd(), sdtf_w_xpxxzs_kgd, sdtf_r_xpxxzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xxczsdhz_kgd(), sdtf_w_xxczsdhz_kgd, sdtf_r_xxczsdhz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_pmxxzs_kgd(), sdtf_w_pmxxzs_kgd, sdtf_r_pmxxzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xpsxzs_kgd(), sdtf_w_xpsxzs_kgd, sdtf_r_xpsxzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_sxczsdhz_kgd(), sdtf_w_sxczsdhz_kgd, sdtf_r_sxczsdhz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_pmsxzs_kgd(), sdtf_w_pmsxzs_kgd, sdtf_r_pmsxzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xpsxcthz_kgd(), sdtf_w_xpsxcthz_kgd, sdtf_r_xpsxcthz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_xpsxcwhz_kgd(), sdtf_w_xpsxcwhz_kgd, sdtf_r_xpsxcwhz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_pmsxcwhz_kgd(), sdtf_w_pmsxcwhz_kgd, sdtf_r_pmsxcwhz_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getSdtf_w_pmsxcthz_kgd(), sdtf_w_pmsxcthz_kgd, sdtf_r_pmsxcthz_kg, channel); + + //------------------------------ 车站火灾模式 ------------------------------ + boolean hz_r_A_04kv_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_04kv_kg()); + boolean hz_r_A_zlbyqs2_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_zlbyqs2_kg()); + boolean hz_r_A_xdcs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_xdcs_kg()); + boolean hz_r_A_hkdks_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_hkdks_kg()); + boolean hz_r_A_zykggs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_zykggs_kg()); + boolean hz_r_A_zlbyqs1_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_zlbyqs1_kg()); + boolean hz_r_A_kzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_kzs_kg()); + boolean hz_r_A_zszdzzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_zszdzzs_kg()); + boolean hz_r_A_sbjchkjf_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_sbjchkjf_kg()); + boolean hz_r_B_xdcs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_xdcs_kg()); + boolean hz_r_A_lsjf_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_lsjf_kg()); + boolean hz_r_fyfq1_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_fyfq1_kg()); + boolean hz_r_fyfq2_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_fyfq2_kg()); + boolean hz_r_ehcrktd_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_ehcrktd_kg()); + boolean hz_r_B_hkdks_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_hkdks_kg()); + boolean hz_r_A_hkjf_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_A_hkjf_kg()); + boolean hz_r_B_hkjf_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_hkjf_kg()); + boolean hz_r_B_zhjksbs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_zhjksbs_kg()); + boolean hz_r_B_rdzhdys_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_rdzhdys_kg()); + boolean hz_r_B_txsbs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_txsbs_kg()); + boolean hz_r_B_mytxsbs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_mytxsbs_kg()); + boolean hz_r_B_gasbs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_gasbs_kg()); + boolean hz_r_B_aqmkzs_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_aqmkzs_kg()); + boolean hz_r_B_xhsbjdys_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_B_xhsbjdys_kg()); + boolean hz_r_zdsd_xn = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_zdsd_xn()); + boolean hz_r_qtqy_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_r_qtqy_kg()); + + boolean hz_w_B_xdcs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_xdcs_kgd()); + boolean hz_w_B_hkdks_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_hkdks_kgd()); + boolean hz_w_fyfq2_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_fyfq2_kgd()); + boolean hz_w_ehcrktd_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_ehcrktd_kgd()); + boolean hz_w_A_zszdzzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_zszdzzs_kgd()); + boolean hz_w_A_zykggs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_zykggs_kgd()); + boolean hz_w_A_zlbyqs2_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_zlbyqs2_kgd()); + boolean hz_w_A_zlbyqs1_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_zlbyqs1_kgd()); + boolean hz_w_A_xdcs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_xdcs_kgd()); + boolean hz_w_A_kzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_kzs_kgd()); + boolean hz_w_A_04kv_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_04kv_kgd()); + boolean hz_w_A_hkdks_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_hkdks_kgd()); + boolean hz_w_A_sbjchkjf_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_sbjchkjf_kgd()); + boolean hz_w_A_hkjf_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_hkjf_kgd()); + boolean hz_w_fyfq1_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_fyfq1_kgd()); + boolean hz_w_A_lsjf_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_A_lsjf_kgd()); + boolean hz_w_B_gasbs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_gasbs_kgd()); + boolean hz_w_B_zhjksbs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_zhjksbs_kgd()); + boolean hz_w_B_hkjf_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_hkjf_kgd()); + boolean hz_w_B_xhsbjdys_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_xhsbjdys_kgd()); + boolean hz_w_B_txsbs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_txsbs_kgd()); + boolean hz_w_B_rdzhdys_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_rdzhdys_kgd()); + boolean hz_w_B_mytxsbs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_mytxsbs_kgd()); + boolean hz_w_B_aqmkzs_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_B_aqmkzs_kgd()); + boolean hz_w_qtqy_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getHz_w_qtqy_kgd()); + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_xdcs_kgd(), hz_w_B_xdcs_kgd, hz_r_B_xdcs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_hkdks_kgd(), hz_w_B_hkdks_kgd, hz_r_B_hkdks_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_fyfq2_kgd(), hz_w_fyfq2_kgd, hz_r_fyfq2_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_ehcrktd_kgd(), hz_w_ehcrktd_kgd, hz_r_ehcrktd_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_zszdzzs_kgd(), hz_w_A_zszdzzs_kgd, hz_r_A_zszdzzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_zykggs_kgd(), hz_w_A_zykggs_kgd, hz_r_A_zykggs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_zlbyqs2_kgd(), hz_w_A_zlbyqs2_kgd, hz_r_A_zlbyqs2_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_zlbyqs1_kgd(), hz_w_A_zlbyqs1_kgd, hz_r_A_zlbyqs1_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_xdcs_kgd(), hz_w_A_xdcs_kgd, hz_r_A_xdcs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_kzs_kgd(), hz_w_A_kzs_kgd, hz_r_A_kzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_04kv_kgd(), hz_w_A_04kv_kgd, hz_r_A_04kv_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_hkdks_kgd(), hz_w_A_hkdks_kgd, hz_r_A_hkdks_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_sbjchkjf_kgd(), hz_w_A_sbjchkjf_kgd, hz_r_A_sbjchkjf_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_hkjf_kgd(), hz_w_A_hkjf_kgd, hz_r_A_hkjf_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_fyfq1_kgd(), hz_w_fyfq1_kgd, hz_r_fyfq1_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_A_lsjf_kgd(), hz_w_A_lsjf_kgd, hz_r_A_lsjf_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_gasbs_kgd(), hz_w_B_gasbs_kgd, hz_r_B_gasbs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_zhjksbs_kgd(), hz_w_B_zhjksbs_kgd, hz_r_B_zhjksbs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_hkjf_kgd(), hz_w_B_hkjf_kgd, hz_r_B_hkjf_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_xhsbjdys_kgd(), hz_w_B_xhsbjdys_kgd, hz_r_B_xhsbjdys_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_txsbs_kgd(), hz_w_B_txsbs_kgd, hz_r_B_txsbs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_rdzhdys_kgd(), hz_w_B_rdzhdys_kgd, hz_r_B_rdzhdys_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_mytxsbs_kgd(), hz_w_B_mytxsbs_kgd, hz_r_B_mytxsbs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_B_aqmkzs_kgd(), hz_w_B_aqmkzs_kgd, hz_r_B_aqmkzs_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getHz_w_qtqy_kgd(), hz_w_qtqy_kgd, hz_r_qtqy_kg, channel); + + //------------------------------ 排烟风机 ------------------------------ + boolean pyfj_r_1_qd_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPyfj_r_1_qd_kg()); + boolean pyfj_r_1_tz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPyfj_r_1_tz_kg()); + boolean pyfj_r_2_qd_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPyfj_r_2_qd_kg()); + boolean pyfj_r_2_tz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPyfj_r_2_tz_kg()); + + boolean pyfj_w_1_yx_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPyfj_w_1_yx_d()); + boolean pyfj_w_2_yx_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getPyfj_w_2_yx_d()); + + //虚拟排烟风机开关 + if (pyfj_r_1_qd_kg) { + config.setPyfj1Yx(true); + } else if (pyfj_r_1_tz_kg) { + config.setPyfj1Yx(false); + } + if (pyfj_r_2_qd_kg) { + config.setPyfj2Yx(true); + } else if (pyfj_r_2_tz_kg) { + config.setPyfj2Yx(false); + } + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getPyfj_w_1_yx_d(), pyfj_w_1_yx_d, config.isPyfj1Yx() || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getPyfj_w_2_yx_d(), pyfj_w_2_yx_d, config.isPyfj2Yx() || zsd_r_kg, channel); + + //------------------------------ 消防水泵 ------------------------------ + boolean xfsb_r_qd_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXfsb_r_qd_kg()); + boolean xfsb_r_tz_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXfsb_r_tz_kg()); + + boolean xfsb_w_1mhsb_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXfsb_w_1mhsb_d()); + boolean xfsb_w_2mhsb_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getXfsb_w_2mhsb_d()); + + //虚拟消防水泵开关 + if (xfsb_r_qd_kg) { + config.setXfsbYx(true); + } else if (xfsb_r_tz_kg) { + config.setXfsbYx(false); + } + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getXfsb_w_1mhsb_d(), xfsb_w_1mhsb_d, config.isXfsbYx() || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getXfsb_w_2mhsb_d(), xfsb_w_2mhsb_d, config.isXfsbYx() || zsd_r_kg, channel); + + //------------------------------ AFC ------------------------------ + boolean afc_r_jjsf_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getAfc_r_jjsf_kg()); + boolean afc_r_zdsd_xn = RealDeviceConfig.getBitOf(deviceStatus, configVO.getAfc_r_zdsd_xn()); + + boolean afc_w_jjsfzs_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getAfc_w_jjsfzs_d()); + boolean afc_w_zdsd_xn = RealDeviceConfig.getBitOf(deviceStatus, configVO.getAfc_w_zdsd_xn()); + boolean afc_w_jjsf_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getAfc_w_jjsf_kgd()); + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getAfc_w_jjsf_kgd(), afc_w_jjsf_kgd, afc_r_jjsf_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getAfc_w_jjsfzs_d(), afc_w_jjsfzs_d, afc_r_jjsf_kg || zsd_r_kg, channel); + + //------------------------------ 门禁 ------------------------------ + boolean mj_r_zdsd_xn = RealDeviceConfig.getBitOf(deviceStatus, configVO.getMj_r_zdsd_xn()); + boolean mj_r_jjsf_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getMj_r_jjsf_kg()); + + boolean mj_w_zczt_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getMj_w_zczt_d()); + boolean mj_w_jjsf_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getMj_w_jjsf_kgd()); + boolean mj_w_sfzt_d = RealDeviceConfig.getBitOf(deviceStatus, configVO.getMj_w_sfzt_d()); + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getMj_w_jjsf_kgd(), mj_w_jjsf_kgd, mj_r_jjsf_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getMj_w_sfzt_d(), mj_w_sfzt_d, mj_r_jjsf_kg || zsd_r_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getMj_w_zczt_d(), mj_w_zczt_d, zsd_r_kg, channel); + + //------------------------------ 自动扶梯 ------------------------------ + boolean zdft_r_dt_3jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_3jt_kg()); + boolean zdft_r_dt_2jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_2jt_kg()); + boolean zdft_r_dt_6jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_6jt_kg()); + boolean zdft_r_jzyx_xn = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_jzyx_xn()); + boolean zdft_r_dt_5jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_5jt_kg()); + boolean zdft_r_dt_7jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_7jt_kg()); + boolean zdft_r_dt_4jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_4jt_kg()); + boolean zdft_r_tt_1jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_1jt_kg()); + boolean zdft_r_tt_2jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_2jt_kg()); + boolean zdft_r_tt_3jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_3jt_kg()); + boolean zdft_r_tt_4jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_4jt_kg()); + boolean zdft_r_tt_7jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_7jt_kg()); + boolean zdft_r_tt_5jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_5jt_kg()); + boolean zdft_r_dt_1jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_dt_1jt_kg()); + boolean zdft_r_tt_6jt_kg = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_r_tt_6jt_kg()); + + boolean zdft_w_dt_3jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_3jt_kgd()); + boolean zdft_w_dt_2jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_2jt_kgd()); + boolean zdft_w_dt_6jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_6jt_kgd()); + boolean zdft_w_dt_5jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_5jt_kgd()); + boolean zdft_w_dt_7jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_7jt_kgd()); + boolean zdft_w_dt_4jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_4jt_kgd()); + boolean zdft_w_tt_1jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_1jt_kgd()); + boolean zdft_w_tt_2jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_2jt_kgd()); + boolean zdft_w_tt_3jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_3jt_kgd()); + boolean zdft_w_tt_4jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_4jt_kgd()); + boolean zdft_w_tt_7jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_7jt_kgd()); + boolean zdft_w_tt_5jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_5jt_kgd()); + boolean zdft_w_dt_1jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_dt_1jt_kgd()); + boolean zdft_w_tt_6jt_kgd = RealDeviceConfig.getBitOf(deviceStatus, configVO.getZdft_w_tt_6jt_kgd()); + + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_3jt_kgd(), zdft_w_dt_3jt_kgd, zdft_r_dt_3jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_2jt_kgd(), zdft_w_dt_2jt_kgd, zdft_r_dt_2jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_6jt_kgd(), zdft_w_dt_6jt_kgd, zdft_r_dt_6jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_5jt_kgd(), zdft_w_dt_5jt_kgd, zdft_r_dt_5jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_7jt_kgd(), zdft_w_dt_7jt_kgd, zdft_r_dt_7jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_4jt_kgd(), zdft_w_dt_4jt_kgd, zdft_r_dt_4jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_1jt_kgd(), zdft_w_tt_1jt_kgd, zdft_r_tt_1jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_2jt_kgd(), zdft_w_tt_2jt_kgd, zdft_r_tt_2jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_3jt_kgd(), zdft_w_tt_3jt_kgd, zdft_r_tt_3jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_4jt_kgd(), zdft_w_tt_4jt_kgd, zdft_r_tt_4jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_7jt_kgd(), zdft_w_tt_7jt_kgd, zdft_r_tt_7jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_5jt_kgd(), zdft_w_tt_5jt_kgd, zdft_r_tt_5jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_dt_1jt_kgd(), zdft_w_dt_1jt_kgd, zdft_r_dt_1jt_kg, channel); + plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getZdft_w_tt_6jt_kgd(), zdft_w_tt_6jt_kgd, zdft_r_tt_6jt_kg, channel); + } +} diff --git a/src/main/java/club/joylink/rtss/vo/client/project/ProjectDeviceVO.java b/src/main/java/club/joylink/rtss/vo/client/project/ProjectDeviceVO.java index 7eb70181d..8f28d14d0 100644 --- a/src/main/java/club/joylink/rtss/vo/client/project/ProjectDeviceVO.java +++ b/src/main/java/club/joylink/rtss/vo/client/project/ProjectDeviceVO.java @@ -11,6 +11,7 @@ import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.gzb.GzbSwitchConf import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.heb.device.*; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.hhcj.HhcjIbpConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.hhcj.HhcjPsdConfig; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.say.SayIbpConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.sdy.SdyPsdConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.sdy.SdyPslConfig; import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.xty.XtyPsdConfig; @@ -124,12 +125,30 @@ public class ProjectDeviceVO { case RICHOR_HHCJ: { return hhcjDeviceConfigConvert(voList); } + case SAY: { + return sayDeviceConfigConvert(voList); + } } } return list; } + private static List sayDeviceConfigConvert(List voList) { + List list = new ArrayList<>(); + for (ProjectDeviceVO deviceVO : voList) { + switch (deviceVO.getType()) { + case IBP: + list.add(new SayIbpConfig(deviceVO)); + break; + case PLC_GATEWAY: + list.add(new PlcGateway(deviceVO)); + break; + } + } + return list; + } + private static List hhcjDeviceConfigConvert(List voList) { List list = new ArrayList<>(); for (ProjectDeviceVO deviceVO : voList) { diff --git a/src/main/java/club/joylink/rtss/vo/client/project/say/SayIbpConfigVO.java b/src/main/java/club/joylink/rtss/vo/client/project/say/SayIbpConfigVO.java new file mode 100644 index 000000000..cc74a26c0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/vo/client/project/say/SayIbpConfigVO.java @@ -0,0 +1,1169 @@ +package club.joylink.rtss.vo.client.project.say; + +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.vo.client.project.RealConfigVO; +import lombok.Getter; + +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@Getter +public class SayIbpConfigVO extends RealConfigVO { + public List allLightAddr; + + private String ibpCode = "Station25166_IBP"; + + /** + * 车站火灾模式-A端-0.4KV-开关柜式-开关 + */ + private Integer hz_r_A_04kv_kg = 0; + + /** + * 车站火灾模式-A端-整流变压器室二-开关 + */ + private Integer hz_r_A_zlbyqs2_kg = 1; + + /** + * 车站火灾模式-A端-蓄电池室-开关 + */ + private Integer hz_r_A_xdcs_kg = 2; + + /** + * 车站火灾模式-A端-环控电控室-开关 + */ + private Integer hz_r_A_hkdks_kg = 3; + + /** + * 车站火灾模式-A端-中压-开关柜室-开关 + */ + private Integer hz_r_A_zykggs_kg = 4; + + /** + * 车站火灾模式-A端-整流变压器室一-开关 + */ + private Integer hz_r_A_zlbyqs1_kg = 5; + + /** + * 车站火灾模式-A端-控制室-开关 + */ + private Integer hz_r_A_kzs_kg = 6; + + /** + * 车站火灾模式-A端-再生制动装置室-开关 + */ + private Integer hz_r_A_zszdzzs_kg = 7; + + /** + * 车站火灾模式-A端-设备夹层环控机房-开关 + */ + private Integer hz_r_A_sbjchkjf_kg = 8; + + /** + * 车站火灾模式-B端-蓄电池室-开关 + */ + private Integer hz_r_B_xdcs_kg = 9; + + /** + * 车站火灾模式-公安设备室-开关A端-站厅(站台)冷水机房-开关 + */ + private Integer hz_r_A_lsjf_kg = 10; + + /** + * 车站火灾模式-防烟分区一-开关 + */ + private Integer hz_r_fyfq1_kg = 11; + + /** + * 车站火灾模式-防烟分区二-开关 + */ + private Integer hz_r_fyfq2_kg = 12; + + /** + * 车站火灾模式-二号出入门通道-开关 + */ + private Integer hz_r_ehcrktd_kg = 13; + + /** + * 车站火灾模式-B端-环控电控室-开关 + */ + private Integer hz_r_B_hkdks_kg = 14; + + /** + * 车站火灾模式-A端-环控机房-开关 + */ + private Integer hz_r_A_hkjf_kg = 15; + + /** + * 车站火灾模式-B端-环控机房-开关 + */ + private Integer hz_r_B_hkjf_kg = 16; + + /** + * 车站火灾模式-B端-公安设备室-开关综合监控设备室-开关 + */ + private Integer hz_r_B_zhjksbs_kg = 17; + + /** + * 车站火灾模式-B端-弱电综合电源室-开关 + */ + private Integer hz_r_B_rdzhdys_kg = 18; + + /** + * 车站火灾模式-B端-通信设备室-开关 + */ + private Integer hz_r_B_txsbs_kg = 19; + + /** + * 车站火灾模式-B端-民用通信设备室-开关 + */ + private Integer hz_r_B_mytxsbs_kg = 20; + + /** + * 车站火灾模式-B端-公安设备室-开关 + */ + private Integer hz_r_B_gasbs_kg = 21; + + /** + * 车站火灾模式-B端-安全门控制室-开关 + */ + private Integer hz_r_B_aqmkzs_kg = 22; + + /** + * 车站火灾模式-B端-信号设备及电源室-开关 + */ + private Integer hz_r_B_xhsbjdys_kg = 23; + + /** + * 车站火灾模式-自动/手动-旋钮 + */ + private Integer hz_r_zdsd_xn = 24; + + /** + * 车站火灾模式-其他区域-开关 + */ + private Integer hz_r_qtqy_kg = 25; + + + /** + * 自动扶梯-地面到站厅-EI06/3急停-开关 + */ + private Integer zdft_r_dt_3jt_kg = 26; + + /** + * 自动扶梯-地面到站厅-EI06/2急停-开关 + */ + private Integer zdft_r_dt_2jt_kg = 27; + + /** + * 自动扶梯-地面到站厅-EI06/6急停-开关 + */ + private Integer zdft_r_dt_6jt_kg = 28; + + /** + * 自动扶梯-禁止/允许-旋钮 + */ + private Integer zdft_r_jzyx_xn = 29; + + /** + * 总试灯-开关 + */ + private Integer zsd_r_kg = 30; + + /** + * 自动扶梯-地面到站厅-EI06/5急停-开关 + */ + private Integer zdft_r_dt_5jt_kg = 31; + + /** + * 自动扶梯-地面到站厅-EI06/7急停-开关 + */ + private Integer zdft_r_dt_7jt_kg = 32; + + /** + * 自动扶梯-地面到站厅-EI06/4急停-开关 + */ + private Integer zdft_r_dt_4jt_kg = 33; + + /** + * 消防水泵-启动-开关 + */ + private Integer xfsb_r_qd_kg = 34; + + /** + * 消防水泵-停止-开关 + */ + private Integer xfsb_r_tz_kg = 35; + + /** + * 自动扶梯-站厅到站台-EI06/1急停-开关(点位图I8.0) + */ + private Integer zdft_r_tt_1jt_kg = 40; + + /** + * 自动扶梯-站厅到站台-EI06/2急停-开关 + */ + private Integer zdft_r_tt_2jt_kg = 41; + + /** + * 自动扶梯-站厅到站台-EI06/3急停-开关 + */ + private Integer zdft_r_tt_3jt_kg = 42; + + /** + * 自动扶梯-站厅到站台-EI06/4急停-开关 + */ + private Integer zdft_r_tt_4jt_kg = 43; + + /** + * 自动扶梯-站厅到站台-EI06/7急停-开关 + */ + private Integer zdft_r_tt_7jt_kg = 44; + + /** + * 自动扶梯-站厅到站台-EI06/5急停-开关 + */ + private Integer zdft_r_tt_5jt_kg = 45; + + /** + * 自动扶梯-地面到站厅-EI06/1急停-开关 + */ + private Integer zdft_r_dt_1jt_kg = 46; + + /** + * 自动扶梯-站厅到站台-EI06/6急停-开关 + */ + private Integer zdft_r_tt_6jt_kg = 47; + + /** + * 门禁-自动/手动-旋钮 + */ + private Integer mj_r_zdsd_xn = 48; + + /** + * 门禁-紧急释放-开关 + */ + private Integer mj_r_jjsf_kg = 49; + + /** + * 排烟风机-1号风机-启动-开关 + */ + private Integer pyfj_r_1_qd_kg = 50; + + /** + * 排烟风机-1号风机-停止-开关 + */ + private Integer pyfj_r_1_tz_kg = 51; + + /** + * AFC-紧急释放-开关 + */ + private Integer afc_r_jjsf_kg = 52; + + /** + * AFC-自动/手动-旋钮 + */ + private Integer afc_r_zdsd_xn = 53; + + /** + * 排烟风机-2号风机-启动-开关 + */ + private Integer pyfj_r_2_qd_kg = 54; + + /** + * 排烟风机-2号风机-停止-开关 + */ + private Integer pyfj_r_2_tz_kg = 55; + + /** + * 车站火灾模式-B端-蓄电池室-开关(Q0.0)灯 + */ + private Integer hz_w_B_xdcs_kgd = 56; + + /** + * 车站火灾模式-B端-环控电控室-开关灯 + */ + private Integer hz_w_B_hkdks_kgd = 57; + + /** + * 车站火灾模式-防烟分区二-开关灯 + */ + private Integer hz_w_fyfq2_kgd = 58; + + /** + * 车站火灾模式-二号出入门通道-开关灯 + */ + private Integer hz_w_ehcrktd_kgd = 59; + + /** + * 车站火灾模式-A端-再生制动装置室-开关灯 + */ + private Integer hz_w_A_zszdzzs_kgd = 60; + + /** + * 车站火灾模式-A端-中压-开关柜室-开关灯 + */ + private Integer hz_w_A_zykggs_kgd = 61; + + /** + * 车站火灾模式-A端-整流变压器室二-开关灯 + */ + private Integer hz_w_A_zlbyqs2_kgd = 62; + + /** + * 车站火灾模式-A端-整流变压器室一-开关灯 + */ + private Integer hz_w_A_zlbyqs1_kgd = 63; + + /** + * 车站火灾模式-A端-蓄电池室-开关灯 + */ + private Integer hz_w_A_xdcs_kgd = 64; + + /** + * 车站火灾模式-A端-控制室-开关灯 + */ + private Integer hz_w_A_kzs_kgd = 65; + + /** + * 车站火灾模式-A端-0.4KV-开关柜式-开关灯 + */ + private Integer hz_w_A_04kv_kgd = 66; + + /** + * 车站火灾模式-A端-环控电控室-开关灯 + */ + private Integer hz_w_A_hkdks_kgd = 67; + + /** + * 车站火灾模式-A端-设备夹层环控机房-开关灯 + */ + private Integer hz_w_A_sbjchkjf_kgd = 68; + + /** + * 车站火灾模式-A端-环控机房-开关灯 + */ + private Integer hz_w_A_hkjf_kgd = 69; + + /** + * 车站火灾模式-防烟分区一-开关灯 + */ + private Integer hz_w_fyfq1_kgd = 70; + + /** + * 车站火灾模式-公安设备室-开关A端-站厅(站台)冷水机房-开关灯 + */ + private Integer hz_w_A_lsjf_kgd = 71; + + /** + * 车站火灾模式-B端-公安设备室-开关灯 + */ + private Integer hz_w_B_gasbs_kgd = 72; + + /** + * 车站火灾模式-B端-公安设备室-开关综合监控设备室-开关灯 + */ + private Integer hz_w_B_zhjksbs_kgd = 73; + + /** + * 车站火灾模式-B端-环控机房-开关灯 + */ + private Integer hz_w_B_hkjf_kgd = 74; + + /** + * 车站火灾模式-B端-信号设备及电源室-开关灯 + */ + private Integer hz_w_B_xhsbjdys_kgd = 75; + + /** + * 车站火灾模式-B端-通信设备室-开关灯 + */ + private Integer hz_w_B_txsbs_kgd = 76; + + /** + * 车站火灾模式-B端-弱电综合电源室-开关灯 + */ + private Integer hz_w_B_rdzhdys_kgd = 77; + + /** + * 车站火灾模式-B端-民用通信设备室-开关灯 + */ + private Integer hz_w_B_mytxsbs_kgd = 78; + + /** + * 车站火灾模式-B端-安全门控制室-开关灯 + */ + private Integer hz_w_B_aqmkzs_kgd = 79; + + /** + * 自动扶梯-站厅到站台-EI06/7下行-灯(Q8.0) + */ + private Integer zdft_w_tt_7xx_d = 80; + + /** + * 自动扶梯-站厅到站台-EI06/3急停-开关灯 + */ + private Integer zdft_w_tt_3jt_kgd = 81; + + /** + * 自动扶梯-站厅到站台-EI06/4急停-开关灯 + */ + private Integer zdft_w_tt_4jt_kgd = 82; + + /** + * 自动扶梯-站厅到站台-EI06/2急停-开关灯 + */ + private Integer zdft_w_tt_2jt_kgd = 83; + + /** + * 自动扶梯-站厅到站台-EI06/1急停-开关灯 + */ + private Integer zdft_w_tt_1jt_kgd = 84; + + /** + * 车站火灾模式-其他区域-开关灯 + */ + private Integer hz_w_qtqy_kgd = 88; + + /** + * 自动扶梯-站厅到站台-EI06/2上行-灯 + */ + private Integer zdft_w_tt_2sx_d = 89; + + /** + * 自动扶梯-站厅到站台-EI06/2下行-灯 + */ + private Integer zdft_w_tt_2xx_d = 90; + + /** + * 自动扶梯-站厅到站台-EI06/3上行-灯 + */ + private Integer zdft_w_tt_3sx_d = 91; + + /** + * 自动扶梯-站厅到站台-EI06/3下行-灯 + */ + private Integer zdft_w_tt_3xx_d = 92; + + /** + * 自动扶梯-站厅到站台-EI06/6下行-灯 + */ + private Integer zdft_w_tt_6xx_d = 93; + + /** + * 自动扶梯-站厅到站台-EI06/6上行-灯 + */ + private Integer zdft_w_tt_6sx_d = 94; + + /** + * 自动扶梯-站厅到站台-EI06/7上行-灯 + */ + private Integer zdft_w_tt_7sx_d = 95; + + /** + * 自动扶梯-地面到站厅-EI06/4急停-开关灯(Q12.0) + */ + private Integer zdft_w_dt_4jt_kgd = 96; + + /** + * 自动扶梯-地面到站厅-EI06/5急停-开关灯 + */ + private Integer zdft_w_dt_5jt_kgd = 97; + + /** + * 自动扶梯-地面到站厅-EI06/3急停-开关灯 + */ + private Integer zdft_w_dt_3jt_kgd = 98; + + /** + * 自动扶梯-地面到站厅-EI06/2急停-开关灯 + */ + private Integer zdft_w_dt_2jt_kgd = 99; + + /** + * 自动扶梯-站厅到站台-EI06/5急停-开关灯 + */ + private Integer zdft_w_tt_5jt_kgd = 100; + + /** + * 自动扶梯-站厅到站台-EI06/7急停-开关灯 + */ + private Integer zdft_w_tt_7jt_kgd = 101; + + /** + * 自动扶梯-地面到站厅-EI06/1急停-开关灯 + */ + private Integer zdft_w_dt_1jt_kgd = 102; + + /** + * 自动扶梯-站厅到站台-EI06/6急停-开关灯 + */ + private Integer zdft_w_tt_6jt_kgd = 103; + + /** + * 自动扶梯-地面到站厅-EI06/1上行-灯 + */ + private Integer zdft_w_dt_1sx_d = 104; + + /** + * 自动扶梯-地面到站厅-EI06/2上行-灯 + */ + private Integer zdft_w_dt_2sx_d = 105; + + /** + * 自动扶梯-地面到站厅-EI06/6下行-灯 + */ + private Integer zdft_w_dt_6xx_d = 106; + + /** + * 自动扶梯-地面到站厅-EI06/6上行-灯 + */ + private Integer zdft_w_dt_6sx_d = 107; + + /** + * 自动扶梯-地面到站厅-EI06/5上行-灯 + */ + private Integer zdft_w_dt_5sx_d = 108; + + /** + * 自动扶梯-地面到站厅-EI06/5下行-灯 + */ + private Integer zdft_w_dt_5xx_d = 109; + + /** + * 自动扶梯-地面到站厅-EI06/2下行-灯 + */ + private Integer zdft_w_dt_2xx_d = 110; + + /** + * 自动扶梯-地面到站厅-EI06/1下行-灯 + */ + private Integer zdft_w_dt_1xx_d = 111; + + /** + * 自动扶梯-站厅到站台-EI06/1下行-灯(Q16.0) + */ + private Integer zdft_w_tt_1xx_d = 112; + + /** + * 自动扶梯-地面到站厅-EI06/7急停-开关灯 + */ + private Integer zdft_w_dt_7jt_kgd = 113; + + /** + * 自动扶梯-地面到站厅-EI06/6急停-开关灯 + */ + private Integer zdft_w_dt_6jt_kgd = 114; + + /** + * 自动扶梯-站厅到站台-EI06/1上行-灯 + */ + private Integer zdft_w_tt_1sx_d = 115; + + /** + * 自动扶梯-站厅到站台-EI06/4上行-灯 + */ + private Integer zdft_w_tt_4sx_d = 116; + + /** + * 自动扶梯-站厅到站台-EI06/4下行-灯 + */ + private Integer zdft_w_tt_4xx_d = 117; + + /** + * 自动扶梯-站厅到站台-EI06/5上行-灯 + */ + private Integer zdft_w_tt_5sx_d = 118; + + /** + * 自动扶梯-站厅到站台-EI06/5下行-灯 + */ + private Integer zdft_w_tt_5xx_d = 119; + + /** + * 消防水泵-1号灭火栓泵运行-灯 + */ + private Integer xfsb_w_1mhsb_d = 120; + + /** + * 消防水泵-2号灭火栓泵运行-灯 + */ + private Integer xfsb_w_2mhsb_d = 121; + + /** + * 自动扶梯-地面到站厅-EI06/7下行-灯 + */ + private Integer zdft_w_dt_7xx_d = 122; + + /** + * 自动扶梯-地面到站厅-EI06/7上行-灯 + */ + private Integer zdft_w_dt_7sx_d = 123; + + /** + * 门禁-正常状态-灯 + */ + private Integer mj_w_zczt_d = 124; + + /** + * 门禁-紧急释放-开关灯 + */ + private Integer mj_w_jjsf_kgd = 125; + + /** + * 排烟风机-1号风机运行-灯 + */ + private Integer pyfj_w_1_yx_d = 126; + + /** + * 排烟风机-2号风机运行-灯 + */ + private Integer pyfj_w_2_yx_d = 127; + + /** + * 自动扶梯-地面到站厅-EI06/4下行-灯(Q20.0) + */ + private Integer zdft_w_dt_4xx_d = 128; + + /** + * 自动扶梯-地面到站厅-EI06/3上行-灯 + */ + private Integer zdft_w_dt_3sx_d = 137; + + /** + * AFC-紧急释放指示-灯 + */ + private Integer afc_w_jjsfzs_d = 138; + + /** + * 门禁-释放状态-灯 + */ + private Integer mj_w_sfzt_d = 139; + + /** + * AFC-紧急释放-开关灯 + */ + private Integer afc_w_jjsf_kgd = 140; + + /** + * AFC-自动手动-旋钮(点位表上是写在了自动/手动旋钮那一栏) + */ + private Integer afc_w_zdsd_xn = 141; + + /** + * 自动扶梯-地面到站厅-EI06/4上行-灯 + */ + private Integer zdft_w_dt_4sx_d = 142; + + /** + * 自动扶梯-地面到站厅-EI06/3下行-灯 + */ + private Integer zdft_w_dt_3xx_d = 143; + + /** + * 屏蔽门-下行开门-开关(I0.0-2号plc) + */ + private Integer psd_r_xxkm_kg = 144; + + /** + * 屏蔽门-下行关门-开关 + */ + private Integer psd_r_xxgm_kg = 145; + + /** + * 屏蔽门-下行排烟-开关 + */ + private Integer psd_r_xxpy_kg = 146; + + /** + * 屏蔽门-下行全开-开关 + */ + private Integer psd_r_xxqk_kg = 147; + + /** + * 屏蔽门-上行开门-开关 + */ + private Integer psd_r_sxkm_kg = 148; + + /** + * 屏蔽门-上行关门-开关 + */ + private Integer psd_r_sxgm_kg = 149; + + /** + * 屏蔽门-上行排烟-开关 + */ + private Integer psd_r_sxpy_kg = 150; + + /** + * 屏蔽门-上行全开-开关 + */ + private Integer psd_r_sxqk_kg = 151; + + /** + * 屏蔽门-试灯-开关 + */ + private Integer psd_r_sd_kg = 152; + + /** + * 信号-下行紧急停车-开关 + */ + private Integer xh_r_xxjjtc_kg = 153; + + /** + * 信号-下行取消紧停-开关 + */ + private Integer xh_r_xxqxjt_kg = 154; + + /** + * 信号-下行切断报警-开关 + */ + private Integer xh_r_xxqdbj_kg = 155; + + /** + * 信号-下行扣车-开关 + */ + private Integer xh_r_xxkc_kg = 156; + + /** + * 信号-下行取消扣车-开关 + */ + private Integer xh_r_xxqxkc_kg = 157; + + /** + * 信号-上行紧急停车-开关 + */ + private Integer xh_r_sxjjtc_kg = 158; + + /** + * 信号-上行取消紧停-开关 + */ + private Integer xh_r_sxqxjt_kg = 159; + + /** + * 信号-上行切断报警-开关 + */ + private Integer xh_r_sxqdbj_kg = 160; + + /** + * 信号-上行扣车-开关 + */ + private Integer xh_r_sxkc_kg = 161; + + /** + * 信号-上行取消扣车-开关 + */ + private Integer xh_r_sxqxkc_kg = 162; + + /** + * 信号-信号试灯-开关 + */ + private Integer xh_r_xhsd_kg = 163; + + /** + * 隧道通风-徐彭区间下行车尾火灾-开关 + */ + private Integer sdtf_r_xpxxcwhz_kg = 164; + + /** + * 隧道通风-徐彭区间下行车头火灾-开关 + */ + private Integer sdtf_r_xpxxcthz_kg = 165; + + /** + * 隧道通风-彭民区间下行车头火灾-开关 + */ + private Integer sdtf_r_pmxxcthz_kg = 166; + + /** + * 隧道通风-彭民区间下行车尾火灾-开关 + */ + private Integer sdtf_r_pmxxcwhz_kg = 167; + + /** + * 隧道通风-徐彭区间下行阻塞-开关 + */ + private Integer sdtf_r_xpxxzs_kg = 168; + + /** + * 隧道通风-下行车站隧道火灾-开关 + */ + private Integer sdtf_r_xxczsdhz_kg = 169; + + /** + * 隧道通风-彭民区间下行阻塞-开关 + */ + private Integer sdtf_r_pmxxzs_kg = 170; + + /** + * 隧道通风-徐彭区间上行阻塞-开关 + */ + private Integer sdtf_r_xpsxzs_kg = 171; + + /** + * 防淹门-下行禁止关门/请求关门-开关 + */ + private Integer fym_r_xxjzqq_kg = 172; + + /** + * 防淹门-下行关闭-开关 + */ + private Integer fym_r_xxgb_kg = 173; + + /** + * 防淹门-上行开启-开关 + */ + private Integer fym_r_sxkq_kg = 174; + + /** + * 防淹门-上行停止-开关 + */ + private Integer fym_r_sxtz_kg = 175; + + /** + * 防淹门-上行关闭-开关 + */ + private Integer fym_r_sxgb_kg = 176; + + /** + * 防淹门-上行禁止关门/请求关门-开关 + */ + private Integer fym_r_sxjzqq_kg = 177; + + /** + * 防淹门-报警确认-开关 + */ + private Integer fym_r_bjqr_kg = 178; + + /** + * 隧道通风-上行车站隧道火灾-开关(I8.0-2) + */ + private Integer sdtf_r_sxczsdhz_kg = 184; + + /** + * 隧道通风-彭民区间上行阻塞-开关 + */ + private Integer sdtf_r_pmsxzs_kg = 185; + + /** + * 隧道通风-徐彭区间上行车头火灾-开关 + */ + private Integer sdtf_r_xpsxcthz_kg = 186; + + /** + * 隧道通风-徐彭区间上行车尾火灾-开关 + */ + private Integer sdtf_r_xpsxcwhz_kg = 187; + + /** + * 隧道通风-彭民区间上行车尾火灾-开关 + */ + private Integer sdtf_r_pmsxcwhz_kg = 188; + + /** + * 隧道通风-彭民区间上行车头火灾-开关 + */ + private Integer sdtf_r_pmsxcthz_kg = 189; + + /** + * 防淹门-下行开启-开关 + */ + private Integer fym_r_xxkq_kg = 190; + + /** + * 防淹门-下行停止-开关 + */ + private Integer fym_r_xxtz_kg = 191; + + /** + * 屏蔽门-下行开门状态-灯(Q0.0-2) + */ + private Integer psd_w_xxkmzt_d = 192; + + /** + * 屏蔽门-下行门关闭且锁紧-灯 + */ + private Integer psd_w_xxgbsj_d = 193; + + /** + * 屏蔽门-下行排烟-灯 + */ + private Integer psd_w_xxpy_d = 194; + + /** + * 屏蔽门-下行全开-灯 + */ + private Integer psd_w_xxqk_d = 195; + + /** + * 信号-下行紧急停车-灯 + */ + private Integer xh_w_xxjjtc_d = 196; + + /** + * 信号-下行紧停报警-蜂鸣器 + */ + private Integer xh_w_xxjtbj_fmq = 197; + + /** + * 信号-下行扣车-灯 + */ + private Integer xh_w_xxkc_d = 198; + + /** + * 信号-上行紧急停车-灯 + */ + private Integer xh_w_sxjjtc_d = 199; + + /** + * 屏蔽门-上行开门状态-开关灯 + */ + private Integer psd_w_sxkmzt_d = 200; + + /** + * 屏蔽门-上行门关闭且锁紧-灯 + */ + private Integer psd_w_sxgbsj_d = 201; + + /** + * 屏蔽门-上行排烟-灯 + */ + private Integer psd_w_sxpy_d = 202; + + /** + * 屏蔽门-上行全开-灯 + */ + private Integer psd_w_sxqk_d = 203; + + /** + * 信号-上行紧停报警-蜂鸣器 + */ + private Integer xh_w_sxjtbj_fmq = 204; + + /** + * 信号-上行扣车-灯 + */ + private Integer xh_w_sxkc_d = 205; + + /** + * 信号-下行取消扣车-开关灯 + */ + private Integer xh_w_xxqxkc_kgd = 206; + + /** + * 信号-上行取消扣车-开关灯 + */ + private Integer xh_w_sxqxkc_kgd = 207; + + /** + * 防淹门-锁定装置到位-灯 + */ + private Integer fym_w_sdzzdw_d = 208; + + /** + * 防淹门-上行关闭-开关灯 + */ + private Integer fym_w_sxgb_kgd = 209; + + /** + * 防淹门-下行一级报警-灯 + */ + private Integer fym_w_xxyjbj_d = 210; + + /** + * 防淹门-上行开启-开关灯 + */ + private Integer fym_w_sxkq_kgd = 211; + + /** + * 防淹门-上行就地控制-灯 + */ + private Integer fym_w_sxjdkz_d = 212; + + /** + * 防淹门-上行二级报警-灯 + */ + private Integer fym_w_sxejbj_d = 213; + + /** + * 防淹门-上行车站控制-灯 + */ + private Integer fym_w_sxczkz_d = 214; + + /** + * 防淹门-上行一级报警-灯 + */ + private Integer fym_w_sxyjbj_d = 215; + + /** + * 防淹门-上行关门到位-灯(Q8.0-2) + */ + private Integer fym_w_sxgmdw_d = 216; + + /** + * 防淹门-上行允许关门-灯 + */ + private Integer fym_w_sxyxgm_d = 217; + + /** + * 防淹门-上行开门到位-灯 + */ + private Integer fym_w_sxkmdw_d = 218; + + /** + * 防淹门-上行检修状态-灯 + */ + private Integer fym_w_sxjxzt_d = 219; + + /** + * 防淹门-下行车站控制-灯 + */ + private Integer fym_w_xxczkz_d = 220; + + /** + * 防淹门-下行就地控制-灯 + */ + private Integer fym_w_xxjdkz_d = 221; + + /** + * 防淹门-下行检修状态-灯 + */ + private Integer fym_w_xxjxzt_d = 222; + + /** + * 防淹门-下行二级报警-灯 + */ + private Integer fym_w_xxejbj_d = 223; + + /** + * 防淹门-下行开门到位-灯 + */ + private Integer fym_w_xxkmdw_d = 224; + + /** + * 防淹门-下行允许关门-灯 + */ + private Integer fym_w_xxyxgm_d = 225; + + /** + * 防淹门-上行锁定装置到位-灯 + */ + private Integer fym_w_sxsdzzdw_d = 226; + + /** + * 防淹门-下行关门到位-灯 + */ + private Integer fym_w_xxgmdw_d = 227; + + /** + * 隧道通风-徐彭上行车头火灾-开关灯 + */ + private Integer sdtf_w_xpsxcthz_kgd = 228; + + /** + * 隧道通风-徐彭上行车尾火灾-开关灯 + */ + private Integer sdtf_w_xpsxcwhz_kgd = 229; + + /** + * 隧道通风-彭民上行阻塞-开关灯 + */ + private Integer sdtf_w_pmsxzs_kgd = 230; + + /** + * 隧道通风-上行车站隧道火灾-开关灯 + */ + private Integer sdtf_w_sxczsdhz_kgd = 231; + + /** + * 隧道通风-彭民下行车头火灾-开关灯(Q12.0-2) + */ + private Integer sdtf_w_pmxxcthz_kgd = 232; + + /** + * 隧道通风-徐彭下行车尾火灾-开关灯 + */ + private Integer sdtf_w_xpxxcwhz_kgd = 233; + + /** + * 隧道通风-彭民下行车尾火灾-开关灯 + */ + private Integer sdtf_w_pmxxcwhz_kgd = 234; + + /** + * 隧道通风-徐彭下行车头火灾-开关灯 + */ + private Integer sdtf_w_xpxxcthz_kgd = 235; + + /** + * 防淹门-下行开启-开关灯 + */ + private Integer fym_w_xxkq_kgd = 236; + + /** + * 防淹门-下行关闭-开关灯 + */ + private Integer fym_w_xxgb_kgd = 237; + + /** + * 隧道通风-彭民上行车头火灾-开关灯 + */ + private Integer sdtf_w_pmsxcthz_kgd = 238; + + /** + * 隧道通风-彭民上行车尾火灾-开关灯 + */ + private Integer sdtf_w_pmsxcwhz_kgd = 239; + + /** + * 隧道通风-徐彭区间下行阻塞-开关灯 + */ + private Integer sdtf_w_xpxxzs_kgd = 240; + + /** + * 隧道通风-彭民区间下行阻塞-开关灯 + */ + private Integer sdtf_w_pmxxzs_kgd = 241; + + /** + * 隧道通风-下行车站隧道火灾-开关灯 + */ + private Integer sdtf_w_xxczsdhz_kgd = 242; + + /** + * 隧道通风-徐彭区间上行阻塞-开关灯 + */ + private Integer sdtf_w_xpsxzs_kgd = 243; + + /** + * 防淹门-警铃-蜂鸣器 + */ + private Integer fym_w_jl_fmq = 244; + + /** + * 防淹门-警笛-蜂鸣器 + */ + private Integer fym_w_jd_fmq = 245; + + public SayIbpConfigVO() { + super(0, 250); + } + + public List getAllLightAddr() { + if (allLightAddr == null) { + Class aClass = this.getClass(); + Field[] declaredFields = aClass.getDeclaredFields(); + allLightAddr = Arrays.stream(declaredFields) + .filter(field -> field.getName().endsWith("_d")) + .map(field -> { + try { + return field.getInt(this); + } catch (IllegalAccessException e) { + throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception("反射异常", e); + } + }).collect(Collectors.toList()); + } + return allLightAddr; + } +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 35cd1b219..c62082413 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -191,7 +191,7 @@ common: spring: profiles: local datasource: - url: jdbc:mysql://192.168.0.254:3306/joylink?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true + url: jdbc:mysql://192.168.1.254:3306/joylink?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: root password: localdb