| | |
| | | // 获取库位 |
| | | 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); |
| | |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null); |
| | | } |
| | | Mat mat=matService.selectOne(new EntityWrapper<Mat>().eq("matnr",locDto.getMatnr())); |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(orderDetl); |
| | | wrkDetl.setZpallet(wrkMast.getBarcode()); |
| | |
| | | wrkDetl.setWrkNo(workNo); |
| | | wrkDetl.setBatch(locDto.getBatch()); |
| | | wrkDetl.setOrderNo(locDto.getOrderNo()); |
| | | wrkDetl.setModel(mat.getModel()); |
| | | wrkDetl.setAnfme(locDto.getAnfme()); // 数量 |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(userId); |
| | |
| | | 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); |
| | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(locNo+"库位不存在"); |
| | | } |
| | | if(!locMast.getLocSts().equals("D")){ |
| | | throw new CoolException(locNo+"托盘非在库状态"); |
| | | } |
| | | // 获取源站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", 110) |