| | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | |
| | | private Short getWorkMode(Integer bay) { |
| | | if (bay == 2 || bay == 7) { |
| | | return (short) 3; |
| | | } else if (bay == 3) { |
| | | return (short) 1; |
| | | } else if (bay == 4) { |
| | | return (short) 2; |
| | | } else if (bay == 5) { |
| | | return (short) 1; |
| | | }else { |
| | | return (short) 0; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 组托 |
| | | * 入库站,根据条码扫描生成入库工作档,工作状态 2 |
| | |
| | | param.setIoType(1); |
| | | param.setSourceStaNo(inSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | if (inSta.getStaNo() == 102) { |
| | | param.setLocType2((short) 3); |
| | | } else if (inSta.getStaNo() == 211) { |
| | | param.setLocType1((short) 5); |
| | | param.setLocType2((short) 4); |
| | | } else if (inSta.getStaNo() == 201) { |
| | | param.setLocType2((short) 4); |
| | | } |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | + "能入信号(wms设置).equals(\"Y\")" + staDetl.getCanining()); |
| | | continue; |
| | | } |
| | | System.out.println("wrkMast:" + slave.getId() + "-" + staProtocol.getWorkNo().intValue() + "-" + crnStn.getStaNo() ); |
| | | System.out.println("wrkMast:" + slave.getId() + "-" + staProtocol.getWorkNo().intValue() + "-" + crnStn.getStaNo()); |
| | | // 获取工作状态为2(设备上走)的入库工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo().intValue(), crnStn.getStaNo()); |
| | | System.out.println("wrkMast:" + wrkMast); |
| | |
| | | News.warnNoLog("" + mark + " - 2" + " - 12" + " - 命令下发 : 工作号={},源排={},源列={},源层={},目标排={},目标列={},目标层={}", wrkMast.getWrkNo().shortValue() |
| | | , sourceSta.getRow1().shortValue(), sourceSta.getBay1().shortValue(), sourceSta.getLev1().shortValue() |
| | | , crnStn.getRow().shortValue(), crnStn.getBay().shortValue(), crnStn.getLev().shortValue()); |
| | | |
| | | String locNo = sourceSta.getLocNo(); |
| | | |
| | | // 1.堆垛机开始移动 |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | |
| | | LocMast loc = null; |
| | | for (Integer row : rows) { |
| | | if (Utils.isDeepLoc(slaveProperties, row)) { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(), shallowLoc.getLocType2()); |
| | | |
| | | if (loc != null) { |
| | | if (Utils.isDeepLoc(slaveProperties, loc.getLocNo())) { |
| | |
| | | if (null == loc) { |
| | | for (Integer row : rows) { |
| | | if (Utils.isShallowLoc(slaveProperties, row)) { |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1()); |
| | | loc = locMastService.queryFreeLocMast(row, shallowLoc.getLocType1(), shallowLoc.getLocType2()); |
| | | |
| | | if (null != loc) {//对应深库位非在库状态,不能移库 |
| | | String deepLoc = Utils.getDeepLoc(slaveProperties, loc.getLocNo()); |