| | |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(dto.getLocNo()+"库位不存在"); |
| | | } |
| | | if(!locMast.getLocSts().equals("F")){ |
| | | throw new CoolException(dto.getLocNo()+"托盘非在库状态"); |
| | | } |
| | | |
| | | Integer outSta = staNo.getDevNo(); |
| | | //2号堆垛机全板出库站指定为204站,拣料站指定为202 |
| | | if(locMast.getCrnNo()==2){ |
| | | outSta = ioType == 101 ? 204 : 202; |
| | | } |
| | | // if(locMast.getCrnNo()==2){ |
| | | // outSta = ioType == 101 ? 204 : 202; |
| | | // } |
| | | |
| | | // 获取路径 |
| | | StaDesc staDesc = staDescService.queryCrnStn(ioType, locMast.getCrnNo(), outSta); |
| | |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | // 修改订单明细 |
| | | if (!orderDetlService.increase(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | if (!orderDetlService.increaseWorkQty(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) { |
| | | throw new CoolException("修改订单明细数量失败"); |
| | | } |
| | | orderService.updateSettle(orderDetl.getOrderId(), 2L, userId); |
| | |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(locNo+"库位不存在"); |
| | | } |
| | | if(!locMast.getLocSts().equals("D")){ |
| | | throw new CoolException(locNo+"托盘非在库状态"); |
| | | } |
| | | // 获取源站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | |
| | | boolean flag = true; |
| | | List<OrderDetl> orderDetls = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no",wrkDetl.getOrderNo())); |
| | | for(OrderDetl orderDetl : orderDetls){ |
| | | if(orderDetl.getQty() > 0){ |
| | | if(orderDetl.getWorkQty() > 0){ |
| | | flag = false; |
| | | } |
| | | } |