自动化立体仓库 - WCS系统
#
whycq
2023-02-19 9263100d664598f22f6f1c2ea600382f752ad3d0
src/main/java/com/zy/common/model/LocTypeDto.java
@@ -22,15 +22,21 @@
    public LocTypeDto() {
    }
    public LocTypeDto(Short locType1, Short locType2, Short locType3) {
        this.locType1 = locType1;
        this.locType2 = locType2;
        this.locType3 = locType3;
    }
    public LocTypeDto(StaProtocol staProtocol) {
//        if (staProtocol.isHigh() == staProtocol.isLow()) {
//            throw new CoolException("plc高低检测异常");
//        }
//        if (staProtocol.isLow()) {
//            this.locType1 = 1; // 低库位
//        } else {
//            this.locType1 = 2; // 高库位
//        }
        if (staProtocol.isHigh() == staProtocol.isLow()) {
            throw new CoolException("plc高低检测异常");
        }
        if (staProtocol.isLow()) {
            this.locType1 = 1; // 低库位
        } else {
            this.locType1 = 2; // 高库位
        }
    }
    /**