| | |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | Short stano = staProtocol.getStaNo(); |
| | | //led |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | |
| | | if (back) { |
| | | storageEscalationParam.setWCSStatus(1); |
| | | storageEscalationParam.setWCSErrorMessage(storageEscalationParam.getWCSErrorMessage() + errMsg); |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = errMsg; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } else { |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = "已有入库任务!!!"; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | } |
| | | staProtocol.setWorkNo((short) 9991); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | |
| | | } |
| | | |
| | | } else { |
| | | |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = jsonObject.getString("ErrorMessage"); |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | } |
| | | |
| | | staProtocol.setWorkNo((short) 9991); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | //led |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | |
| | | // 判断是否满足入库条件 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | |
| | | } |
| | | } |
| | | } else { |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = "任务已存在!!!!"; |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | } |
| | | staProtocol.setWorkNo((short) 9991); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | |
| | | } |
| | | |
| | | } else { |
| | | // led 异常显示 |
| | | if (ledThread != null) { |
| | | String errorMsg = jsonObject.getString("ErrorMessage"); |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg)); |
| | | } |
| | | staProtocol.setWorkNo((short) 9991); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | |
| | | |
| | | LocMast locMast = locMastService.selectByLocNo(taskWrk.getStartPoint()); |
| | | //判断其库位是否为深库位,如果为深库位找其浅库位是都有货 |
| | | if (locMast.getRow1() == 8 || locMast.getRow1() == 5) { |
| | | if (locMast.getRow1() == 5) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() + 1)) |
| | | .eq("bay1", locMast.getBay1()) |
| | |
| | | continue; |
| | | } |
| | | } |
| | | if (locMast.getRow1() == 8) { |
| | | LocMast locMast1 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1", (locMast.getRow1() - 1 )) |
| | | .eq("bay1", locMast.getBay1()) |
| | | .eq("lev1", locMast.getLev1()).eq("loc_sts", "F")); |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | log.info(locMast.getLocNo() + "出深库位,浅库位有货"); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 获取堆垛机出库站信息 |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |