|
|
@@ -71,10 +71,13 @@ public class DeviceRemoteController {
|
|
|
try {
|
|
|
// ops.write(ReUtil.hexStringToByteArray(instruct));
|
|
|
// ops.flush();
|
|
|
- pushMsgService.push(cabinetV2Lock.getRelayCode(), ReUtil.hexStringToByteArray(instruct));
|
|
|
- logger.info("柜锁开锁指令:" + instruct);
|
|
|
+ for (int i = 0; i < 5; i++) {
|
|
|
+ pushMsgService.push(cabinetV2Lock.getRelayCode(), ReUtil.hexStringToByteArray(instruct));
|
|
|
+ logger.info("柜锁开锁指令:" + instruct);
|
|
|
+
|
|
|
+ Thread.sleep(1000);
|
|
|
+ }
|
|
|
|
|
|
- Thread.sleep(2000);
|
|
|
// ops.write(ReUtil.hexStringToByteArray(instruct));
|
|
|
// ops.flush();
|
|
|
//
|
|
|
@@ -90,9 +93,9 @@ public class DeviceRemoteController {
|
|
|
// ops.write(ReUtil.hexStringToByteArray(instruct));
|
|
|
// ops.flush();
|
|
|
pushMsgService.push(cabinetV2Lock.getRelayCode(), ReUtil.hexStringToByteArray(instruct));
|
|
|
- timer-=2;
|
|
|
+ timer-=3;
|
|
|
|
|
|
- Thread.sleep(1900);
|
|
|
+ Thread.sleep(3000);
|
|
|
status = redisService.getCacheObject(relayCode + ":" + cabinetV2Lock.getLockId());
|
|
|
logger.info("柜锁开锁锁状态查询:" + instruct + ",开锁结果:" + status);
|
|
|
if(status != null && status == 1){
|