| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import lombok.Data; |
| | | |
| | |
| | | } |
| | | |
| | | public LocTypeDto(StaProtocol staProtocol) { |
| | | if (staProtocol.isHigh() == staProtocol.isLow() == staProtocol.isMedium() == staProtocol.isMedium_high()) { |
| | | throw new CoolException("plc高低检测异常"); |
| | | } |
| | | System.out.println("----------"+staProtocol.getSiteId()+"库位检测原始数据为:"+staProtocol.isWeight()+"------------"); |
| | | // if (staProtocol.isHigh() == staProtocol.isLow() == staProtocol.isMedium() == staProtocol.isMedium_high()) { |
| | | // throw new CoolException("plc高低检测异常"); |
| | | // } |
| | | |
| | | if (staProtocol.isLow()) { |
| | | this.locType1 = 1; // 低库位 |
| | | } else if (staProtocol.isHigh()){ |
| | |
| | | } else if (staProtocol.isMedium_high()) { |
| | | this.locType1 = 4; // 高库位 |
| | | } |
| | | |
| | | if (staProtocol.isWeight() && staProtocol.getSiteId() == 204 || staProtocol.getSiteId() == 104) { |
| | | this.locType1 = 2; |
| | | } else { |
| | | this.locType1 = 1; |
| | | } |
| | | System.out.println("----------"+staProtocol.getSiteId()+"库位检测处理为数据为:"+this.locType1+"------------"); |
| | | |
| | | } |
| | | |