| | |
| | | updateAgvLocMast(agvLocMastService.selectById(sourceLocNo), locSts); |
| | | //更新目标站点状态 |
| | | //locSts = ioType == 101 ? "S" : "Q"; |
| | | updateAgvBasDevp(agvBasDevpService.selectById(targetLocNo), "S"); |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectById(targetLocNo); |
| | | agvBasDevp.setBarcode(""); |
| | | updateAgvBasDevp(agvBasDevp, "S"); |
| | | |
| | | }); |
| | | } |
| | |
| | | String ctnNo = null; |
| | | // 打标记,若库位不够,入库到别的楼层,那么需要跨层移库 |
| | | if (!Cools.isEmpty(code)) { |
| | | if (agvLocMast.getLev1() == 1 && !code.equals(AsrsConstants.SANCHANG)) { |
| | | ctnNo = "1"; |
| | | } else if (agvLocMast.getLev1() == 2 && !code.equals(AsrsConstants.ERCHANG)) { |
| | | if (agvLocMast.getLev1() == 1 && code.equals(AsrsConstants.ERCHANG)) { |
| | | ctnNo = "2"; |
| | | } else if (agvLocMast.getLev1() == 2 && code.equals(AsrsConstants.SANCHANG)) { |
| | | ctnNo = "1"; |
| | | } |
| | | } |
| | |
| | | if (!Cools.isEmpty(agvWrkMast)) { |
| | | throw new CoolException("有货架在往站点搬运" + agvBasDevp.getDevNo() + ",无法进行空板出库"); |
| | | } |
| | | AgvLocMast agvLocMast = null; |
| | | if (station.startsWith("XI") && station.endsWith("F4") && containerType == 30) { |
| | | agvLocMast = agvLocMastService.select30EmptyZpallet(); |
| | | } else { |
| | | //寻找相应类型的空货架 |
| | | Integer floor = agvBasDevp.getFloor(); |
| | | if (floor == 4) { |
| | | floor = 1; |
| | | } |
| | | agvLocMast = agvLocMastService.selectEmptyZpallet(containerType, floor); |
| | | if (containerType == 0) { |
| | | //空板自动出库,根据站点类型选择 |
| | | agvLocMastService.selectEmptyZpalletByLocType1(agvBasDevp.getLocType1()); |
| | | |
| | | //寻找相应类型的空货架 |
| | | Integer floor = agvBasDevp.getFloor(); |
| | | if (floor == 4) { |
| | | floor = 1; |
| | | } |
| | | } |
| | | AgvLocMast agvLocMast = agvLocMastService.selectEmptyZpallet(containerType, floor); |
| | | if (containerType == 0) { |
| | | //空板自动出库,根据站点类型选择 |
| | | agvLocMastService.selectEmptyZpalletByLocType1(agvBasDevp.getLocType1()); |
| | | |
| | | } |
| | | |
| | | if (Cools.isEmpty(agvLocMast)) { |
| | | throw new CoolException("暂无当前出库站点类型的空货架!"); |
| | |
| | | List<AgvLocDetl> locDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no", param.getLocNo())); |
| | | |
| | | List<LocDetlAdjustParam.LocDetlAdjust> list = param.getList(); |
| | | |
| | | String barcode = null; |
| | | // 修改数量 |
| | | Iterator<AgvLocDetl> iterator = locDetls.iterator(); |
| | | while (iterator.hasNext()) { |
| | |
| | | locDetl.setThreeCode(adjust.getThreeCode()); |
| | | locDetl.setDeadTime(adjust.getDeadTime()); |
| | | locDetl.setSuppCode(adjust.getSuppCode()); |
| | | barcode = adjust.getSuppCode(); |
| | | if (!agvLocDetlService.insert(locDetl)) { |
| | | throw new CoolException("添加" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码库存明细失败"); |
| | | } |
| | |
| | | if (locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O")) { |
| | | if (count > 0) { |
| | | locMast.setLocSts("F"); |
| | | locMast.setBarcode(barcode); |
| | | } |
| | | } |
| | | locMast.setModiUser(userId); |
| | |
| | | } |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderNo, mat.getMatnr(), batch, csocode); |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | orderDetl = orderDetlService.selectItem(orderNo, mat.getMatnr(), null, csocode); |
| | | if (orderDetl == null) { |
| | | throw new CoolException("订单明细不存在"); |
| | | } |
| | | } |
| | | AgvWrkDetl wrkDetl = new AgvWrkDetl(); |
| | | wrkDetl.sync(mat); |