| | |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) { |
| | | |
| | | // // 判断堆垛机出库站状态 |
| | | // if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | // && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | |
| | | // 堆垛机控制过滤 |
| | |
| | | if (staProtocol.isOutEnable()){ |
| | | CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "没有可出"); |
| | | } |
| | | } else { |
| | | CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "出库站点:非自动"); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (rgvProtocolOther.statusEnable) { |
| | | BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staNo)); |
| | | if (Math.abs(basDevpPosition.getPlcPosition()-rgvProtocol.getRgvPos()) |
| | | long abs = Math.abs(Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos()) |
| | | - |
| | | Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos())); |
| | | if (abs<100){ |
| | | return true; |
| | | } |
| | | if (Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos()) |
| | | >= |
| | | Math.abs(basDevpPosition.getPlcPosition()-rgvProtocolOther.getRgvPos())){ |
| | | Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos())){ |
| | | return false; |
| | | } |
| | | } |
| | |
| | | } |
| | | if (rgvProtocolOther.statusEnable) { |
| | | BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("DEV_NO", staNo)); |
| | | long abs = Math.abs(Math.abs(basDevpPosition.getPlcPosition() - rgvProtocol.getRgvPos()) |
| | | - |
| | | Math.abs(basDevpPosition.getPlcPosition() - rgvProtocolOther.getRgvPos())); |
| | | if (abs<100){ |
| | | return true; |
| | | } |
| | | if (Math.abs(basDevpPosition.getPlcPosition()-rgvProtocol.getRgvPos()) |
| | | >= |
| | | Math.abs(basDevpPosition.getPlcPosition()-rgvProtocolOther.getRgvPos())){ |
| | |
| | | TaskWrk taskWrk = taskWrkService.selectByWrkNo(staProtocol.getWorkNo()); |
| | | if (taskWrk != null) { |
| | | Integer stano = staProtocol.getStaNo(); |
| | | |
| | | if (staProtocol.getSiteId() == 1004 || staProtocol.getSiteId()==1020){ |
| | | |
| | | // 尺寸检测异常 |
| | |
| | | } |
| | | } |
| | | return taskWrk; |
| | | } |
| | | } else if (staProtocol.isAutoing() && staProtocol.getWorkNo() == 0 && !staProtocol.isLoading()){ |
| | | if (inSta.isDirectionOther()){ |
| | | StaProtocol staProtocolOther = devpThread.getStation().get(inSta.getStaNoOther()); |
| | | if (staProtocolOther == null) { |
| | | return null; |
| | | } |
| | | // 判断是否满足取货条件 |
| | | if (staProtocolOther.isAutoing() |
| | | && staProtocolOther.getWorkNo() != 0) { |
| | | TaskWrk taskWrkOther = taskWrkService.selectByWrkNo(staProtocolOther.getWorkNo()); |
| | | if (taskWrkOther != null) { |
| | | return taskWrkOther; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | |
| | | if (rgvOtherIDLEOther2(rgvSlave)){ |
| | | if (!rgvOtherIDLE2(rgvSlave,staList.get(0))){ |
| | | System.out.println("运行就近跳过==="+rgvSlave.getId()+"==="); |
| | | |
| | | sign=true; |
| | | } |
| | | } |