#
Junjie
8 天以前 8280c9eee52dd9fa3501305dfd4d1cab1564a73b
src/main/java/com/zy/core/network/fake/ZyStationFakeConnect.java
@@ -18,6 +18,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -305,8 +306,9 @@
            Integer nextStationId = null;
            Integer nextStationDeviceNo = null;
            NavigateNode nextNode = null;
            try {
                NavigateNode nextNode = navigateNodes.get(i + 1);
                nextNode = navigateNodes.get(i + 1);
                JSONObject nextValueObject = JSON.parseObject(nextNode.getNodeValue());
                nextStationId = nextValueObject.getInteger("stationId");
                nextStationDeviceNo = nextValueObject.getInteger("deviceNo");
@@ -351,6 +353,10 @@
                    continue;
                }
                lastStationId = currentStationId;
                if (nextNode.getIsInflectionPoint()) {
                    sleep(4000);
                }
            }
            i++;
@@ -553,8 +559,10 @@
                return false;
            }
            Random random = new Random();
            String barcodeTime = String.valueOf(System.currentTimeMillis());
            String barcode = barcodeTime.substring(5);
            String barcode = String.valueOf(random.nextInt(10)) + String.valueOf(random.nextInt(10)) + barcodeTime.substring(7);
            boolean result = updateStationData(lockTaskNo, currentStationId, currentStationDeviceNo, null, null, null, barcode, null);
            if (!result) {
@@ -614,7 +622,7 @@
        return executeResult;
    }
    public synchronized boolean lockExecute(Integer taskNo, Supplier<Boolean> function) {
    public boolean lockExecute(Integer taskNo, Supplier<Boolean> function) {
        if (!setLockStation(taskNo)) {
            return false;
        }
@@ -624,7 +632,7 @@
        return result;
    }
    private synchronized boolean checkTaskNoInArea(Integer taskNo) {
    private boolean checkTaskNoInArea(Integer taskNo) {
        Object fakeTaskNoAreaObj = redisUtil.get(RedisKeyType.FAKE_TASK_NO_AREA.key);
        if (fakeTaskNoAreaObj == null) {
            return false;