| | |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.CrnModeType; |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.core.enums.RgvStatusType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.enums.WrkIoType; |
| | | import com.zy.core.enums.*; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.DualCrnProtocol; |
| | | import com.zy.core.model.protocol.StationProtocol; |
| | |
| | | vo.setEmptyMk(stationProtocol.isEmptyMk()); // 是否空板 |
| | | vo.setFullPlt(stationProtocol.isFullPlt()); // 是否满板 |
| | | vo.setRunBlock(stationProtocol.isRunBlock());// 运行堵塞 |
| | | vo.setEnableIn(stationProtocol.isEnableIn());// 启动入库 |
| | | vo.setPalletHeight(stationProtocol.getPalletHeight()); // 托盘高度 |
| | | vo.setError(stationProtocol.getError()); // 错误码 |
| | | vo.setErrorMsg(stationProtocol.getErrorMsg()); // 报警信息 |
| | | vo.setBarcode(stationProtocol.getBarcode()); // 条码 |
| | | vo.setWeight(stationProtocol.getWeight());//重量 |
| | | String stationStatus = StationStatusType.process(stationProtocol).toString().toLowerCase().replaceAll("_", "-"); |
| | | if (stationProtocol.isAutoing() && stationProtocol.isLoading() && stationProtocol.getTaskNo() > 0 && !stationProtocol.isRunBlock()) { |
| | | String taskClass = getStationTaskClass(stationProtocol.getTaskNo(), inTaskRange, outTaskRange); |
| | |
| | | vo.setCrnStatus(CrnStatusType.MACHINE_ERROR); |
| | | } else { |
| | | if (taskNo != null && taskNo > 0) { |
| | | vo.setCrnStatus(p.getModeType() == CrnModeType.AUTO ? CrnStatusType.MACHINE_AUTO : CrnStatusType.MACHINE_UN_AUTO); |
| | | vo.setCrnStatus(p.getModeType() == DualCrnModeType.AUTO ? CrnStatusType.MACHINE_AUTO : CrnStatusType.MACHINE_UN_AUTO); |
| | | } else { |
| | | vo.setCrnStatus(p.getModeType() == CrnModeType.AUTO ? CrnStatusType.MACHINE_AUTO : CrnStatusType.MACHINE_UN_AUTO); |
| | | vo.setCrnStatus(p.getModeType() == DualCrnModeType.AUTO ? CrnStatusType.MACHINE_AUTO : CrnStatusType.MACHINE_UN_AUTO); |
| | | } |
| | | } |
| | | vos.add(vo); |