| | |
| | | updateAgvLocMast(agvLocMastService.selectById(sourceLocNo),locSts); |
| | | //更新目标站点状态 |
| | | //locSts = ioType == 101 ? "S" : "Q"; |
| | | updateAgvBasDevp(agvBasDevpService.selectById(targetLocNo),"S"); |
| | | updateAgvBasDevp(agvBasDevpService.selectById(targetLocNo),"S",Short.valueOf(containerCode.substring(0,2)),containerCode); |
| | | |
| | | }); |
| | | } |
| | |
| | | //检索库位,选择合适的库位 |
| | | AgvLocMast agvLocMast = new AgvLocMast(); |
| | | |
| | | //查询库存 |
| | | AgvLocMast locMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("barcode", containerCode)); |
| | | if (!Cools.isEmpty(locMast)) { |
| | | throw new CoolException("当前货架已在库存中,无法进行入库"); |
| | | } |
| | | |
| | | //查询入库通知档 |
| | | List<AgvWaitPakin> agvWaitPakinList = agvWaitPakinService.selectByContainerCode(containerCode); |
| | |
| | | //更新源站点状态 |
| | | updateAgvBasDevp(agvBasDevp,"R",containerType); |
| | | }else { |
| | | //查询工作档 |
| | | AgvWrkMast agvWrkMast1 = agvWrkMastService.selectByContainerCode(containerCode); |
| | | if (Cools.isEmpty(agvWrkMast1)) { |
| | | throw new CoolException("当前货架已有入库任务,无法进行入库"); |
| | | } |
| | | agvLocMast = agvCommonService.getLocNo(locType,agvBasDevp.getFloor(),true,true); |
| | | // 生成工作档 10.空板入库 |
| | | createWrkMast(10,201L,agvBasDevp.getDevNo(),agvLocMast.getLocNo(),containerCode,now,userId,containerType); |
| | |
| | | LocDetlAdjustParam.LocDetlAdjust adjust = iterator1.next(); |
| | | if (adjust.getCount() == 0) { continue; } |
| | | if (locDetl.getMatnr().equals(adjust.getMatnr()) && Cools.eq(locDetl.getBatch(), adjust.getBatch()) && Cools.eq(locDetl.getSuppCode(),adjust.getSuppCode()) && Cools.eq(locDetl.getThreeCode(),adjust.getThreeCode()) && Cools.eq(locDetl.getDeadTime(),adjust.getDeadTime())) { |
| | | if (!locDetl.getAnfme().equals(adjust.getCount())) { |
| | | if (!locDetl.getAnfme().equals(adjust.getCount()) || !locDetl.getProcessSts().equals(adjust.getProcessSts())) { |
| | | // todo 盘点记录 |
| | | // 修改库存 |
| | | if (!agvLocDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getThreeCode(),locDetl.getDeadTime())) { |
| | | if (!agvLocDetlService.updateAnfmeProcess(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getThreeCode(),locDetl.getDeadTime(),adjust.getProcessSts())) { |
| | | throw new CoolException(locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码修改数量失败"); |
| | | } |
| | | // 保存调整记录 |
| | |
| | | // 删除库存 |
| | | for (AgvLocDetl locDetl : locDetls) { |
| | | // todo 盘点记录 |
| | | if (!agvLocDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getThreeCode(),locDetl.getDeadTime())) { |
| | | if (!agvLocDetlService.updateAnfmeProcess(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch(),locDetl.getThreeCode(),locDetl.getDeadTime(),locDetl.getProcessSts())) { |
| | | throw new CoolException("删除" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码库存明细失败"); |
| | | } |
| | | // 保存调整记录 |
| | |
| | | } |
| | | |
| | | }else { |
| | | agvLocMastService.updateLocStsByLocNo(locNo,"D",wrkMast.getBarcode(),wrkMast.getWhsType().shortValue()); |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(devNo,"O","",null); |
| | | } |
| | | } else if (wrkMast.getIoType() == 113) { |