| | |
| | | throw new CoolException(param.getBarcode() + "料箱码已存在AGV库存明细中"); |
| | | } |
| | | |
| | | //检查库存是否有相同料箱,存在则抛出异常 |
| | | if(!Cools.isEmpty(agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("barcode",param.getBarcode())))){ |
| | | throw new CoolException(param.getBarcode() + "料箱码已存在AGV库存主档中"); |
| | | } |
| | | |
| | | //查看工作档是否有相同料箱,存在则抛出异常 |
| | | if(!Cools.isEmpty(agvWrkMastService.selectByContainerCode(param.getBarcode()))){ |
| | | throw new CoolException(param.getBarcode() + "料箱码已存在AGV工作档中"); |
| | |
| | | Date now = new Date(); |
| | | AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("loc_no", param.getDevNo())); |
| | | Integer oldWrkNo = agvWrkMast.getWrkNo(); |
| | | if (agvWrkMast.getBarcode() != param.getBarcode()) { |
| | | throw new CoolException("回退任务的货架码与当前货架码不一致1"); |
| | | if (!agvWrkMast.getBarcode().equals(param.getBarcode())) { |
| | | throw new CoolException("回退任务的货架码与当前货架码不一致!"); |
| | | } |
| | | if (agvWrkMast.getWrkSts() != 205) { |
| | | throw new CoolException("出库任务未完成!"); |
| | | } |
| | | // 新建回退工作档 |
| | | AgvWrkMast wrkMast = createWrkMast(58, 201L, agvWrkMast.getLocNo(), agvWrkMast.getSourceLocNo(), agvWrkMast.getBarcode(), now, userId, agvWrkMast.getWhsType(), 0); |