From af5c40a6b94479be3929cec3fa855e43a178acc3 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Tue, 23 Jun 2026 16:58:18 +0800 Subject: [PATCH] =?UTF-8?q?add:=E8=87=AA=E5=8A=A8=E9=97=A8=E4=BA=92?= =?UTF-8?q?=E9=94=81=EF=BC=8CAD4=E3=80=81AD7=E5=92=8CAD2=E3=80=81AD8?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=97=A8=E4=B8=80=E4=B8=AA=E5=BC=80=E5=90=AF?= =?UTF-8?q?=EF=BC=8C=E5=8F=A6=E4=B8=80=E4=B8=AA=E5=BF=85=E9=A1=BB=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=90=8E=E6=89=8D=E8=83=BD=E5=BC=80=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../run/TwoNDCSocketConnectionAutoRun.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java index 54dfdcc..68e95d3 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java @@ -20,6 +20,7 @@ import org.nl.acs.log.service.DeviceExecuteLogService; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.region.domain.Region; import org.nl.acs.region.service.RegionService; +import org.nl.config.MapOf; import org.nl.config.SpringContextHolder; import org.nl.config.lucene.service.LuceneExecuteLogService; import org.nl.config.lucene.service.dto.LuceneLogDto; @@ -34,6 +35,7 @@ import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; import java.util.Date; +import java.util.Map; import static org.nl.acs.agv.server.impl.NDCAgvServiceImpl.Bytes2HexString; @@ -60,7 +62,10 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { boolean requireSucessRegion = false; boolean requireSucessTake = false; boolean requireSucessPut = false; - + /** + * 两个门必须互锁,其中一个门关闭,才能给另一个门开启信号 + */ + private Map lockDoorMap = MapOf.of("AD4", "AD7", "AD7", "AD4", "AD2", "AD8", "AD8", "AD2"); @Autowired ISysParamService paramService; @@ -240,6 +245,19 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable { return; } if (ObjectUtil.isNotEmpty(device)) { + String lockDoor = lockDoorMap.get(device_code); + if (StrUtil.isNotEmpty(lockDoor)) { + Device lockDevice = deviceAppService.findDeviceByCode(lockDoor); + if (ObjectUtil.isNotEmpty(lockDevice)) { + if (lockDevice.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { + StandardAutodoorDeviceDriver lockStandardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) lockDevice.getDeviceDriver(); + if (lockStandardAutodoorDeviceDriver.getClose() != 1) { + log.info("未下发{}自动门开门信号,因为自动门{}未关到位,所以未反馈NDC信开门信息", device_code, lockDoor); + continue; + } + } + } + } if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) { standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver(); String region_code = (String) device.getExtraValue().get("region");