| | |
| | | private OrderDetlService orderDetlService; |
| | | @Autowired |
| | | private AgvBasDevpService agvBasDevpService; |
| | | @Autowired |
| | | private AgvLocDetlService agvLocDetlService; |
| | | |
| | | |
| | | /* |
| | |
| | | } |
| | | |
| | | //检查是否已存在相同的托盘条码,存在则抛出异常 |
| | | if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>(). |
| | | eq("supp_code", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().eq("supp_code", param.getBarcode())) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | } |
| | | |
| | | //检查库存是否有相同料箱,存在则抛出异常 |
| | | if(!Cools.isEmpty(agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("supp_code",param.getBarcode())))){ |
| | | throw new CoolException(param.getBarcode() + "料箱码已在库存中"); |
| | | } |
| | | |
| | | if (Cools.isEmpty(param.getOrderNo())) { |
| | |
| | | */ |
| | | private void checkOrderQty(Order order, CombParam.CombMat combMat){ |
| | | // 订单明细数量校验,如果作业数量大于单据数量则抛出异常 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), combMat.getMatnr(), combMat.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), combMat.getMatnr(), combMat.getBatch(), combMat.getCsocode(),combMat.getIsoseq()); |
| | | if(Cools.isEmpty(orderDetl)){ |
| | | throw new CoolException("未匹配到该单据下的物料"); |
| | | } |
| | |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme())) { |
| | | if (!orderDetlService.increase(order.getId(), combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(),combMat.getIsoseq())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | } |