Kaynağa Gözat

修改锁逻辑

hanzhiwei 2 yıl önce
ebeveyn
işleme
6138501c5d

+ 9 - 6
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/device/DeviceRemoteController.java

@@ -60,13 +60,16 @@ public class DeviceRemoteController {
         try {
 //            ops.write(ReUtil.hexStringToByteArray(instruct));
 //            ops.flush();
-            for (int i = 0; i < 5; i++) {
-                NettyPushMsgService.push(cabinetV2Lock.getRelayCode(), ReUtil.hexStringToByteArray(instruct));
-                logger.info("柜锁开锁指令:" + instruct);
-
-                Thread.sleep(1000);
-            }
+//            for (int i = 0; i < 5; i++) {
+//                NettyPushMsgService.push(cabinetV2Lock.getRelayCode(), ReUtil.hexStringToByteArray(instruct));
+//                logger.info("柜锁开锁指令:" + instruct);
+//
+//                Thread.sleep(1000);
+//            }
 
+            NettyPushMsgService.push(cabinetV2Lock.getRelayCode(), ReUtil.hexStringToByteArray(instruct));
+            logger.info("柜锁开锁指令:" + instruct);
+            Thread.sleep(1000);
 //            ops.write(ReUtil.hexStringToByteArray(instruct));
 //            ops.flush();
 //