#
zjj
昨天 15b5002fd412a5d33be5d5c6deb63b3d02c77c41
src/main/java/com/zy/core/thread/impl/NyLiftThread.java
@@ -3,13 +3,10 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.DateUtils;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.BasLift;
import com.zy.asrs.entity.DeviceConfig;
import com.zy.asrs.entity.DeviceDataLog;
import com.zy.asrs.service.BasLiftService;
import com.zy.asrs.service.DeviceDataLogService;
import com.zy.asrs.utils.Utils;
import com.zy.common.ExecuteSupport;
@@ -395,6 +392,7 @@
                || this.liftProtocol.getPlcTaskNo() == null
                || this.liftProtocol.getProtocolStatus() == null
                || this.liftProtocol.getModel() == null
                || this.liftProtocol.getDeviceStatus() == null
                || this.liftProtocol.getErrorCode() == null
                || this.liftProtocol.getExtend() == null
        ) {
@@ -407,6 +405,7 @@
//                && this.liftProtocol.getPlcTaskNo() == 0
                && this.liftProtocol.getTaskNo() == 0
                && this.liftProtocol.getModel() == 2
                && this.liftProtocol.getDeviceStatus() == LiftDeviceStatusType.IDLE.id
                && this.liftProtocol.getErrorCode() == 0
                && !extend.getFrontOverrun()
                && !extend.getBackOverrun()
@@ -434,6 +433,7 @@
        if (this.liftProtocol.getProtocolStatus() == null
                || this.liftProtocol.getModel() == null
                || this.liftProtocol.getDeviceStatus() == null
                || this.liftProtocol.getErrorCode() == null
                || this.liftProtocol.getExtend() == null
        ) {
@@ -444,6 +444,7 @@
        boolean res = this.liftProtocol.getProtocolStatus() == LiftProtocolStatusType.IDLE.id
                && this.liftProtocol.getModel() == 2
                && this.liftProtocol.getDeviceStatus() == LiftDeviceStatusType.IDLE.id
                && this.liftProtocol.getErrorCode() == 0
                && !extend.getFrontOverrun()
                && !extend.getBackOverrun()
@@ -495,6 +496,10 @@
        command.setPick(pick);
        command.setPut(put);
        LiftStaProtocol pickSta = findSta(pick);
        LiftStaProtocol putSta = findSta(put);
        command.setPickLev(pickSta.getLev());
        command.setPutLev(putSta.getLev());
        return command;
    }
@@ -507,6 +512,10 @@
        command.setPick(pick);
        command.setPut(put);
        LiftStaProtocol pickSta = findSta(pick);
        LiftStaProtocol putSta = findSta(put);
        command.setPickLev(pickSta.getLev());
        command.setPutLev(putSta.getLev());
        return command;
    }
@@ -519,6 +528,10 @@
        command.setPick(pick);
        command.setPut(put);
        LiftStaProtocol pickSta = findSta(pick);
        LiftStaProtocol putSta = findSta(put);
        command.setPickLev(pickSta.getLev());
        command.setPutLev(putSta.getLev());
        return command;
    }
@@ -643,6 +656,15 @@
        }
    }
    private LiftStaProtocol findSta(Integer staNo) {
        for (LiftStaProtocol liftStaProtocol : this.liftStaProtocols) {
            if (liftStaProtocol.getSiteId().equals(staNo)) {
                return liftStaProtocol;
            }
        }
        return null;
    }
    /**
     * 扩展字段
     */