| | |
| | | // 生成工作档明细 |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getSupplier(), elem.getCount(),elem.getMemo())); |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getSupplier(), elem.getCount(),elem.getMemo(),elem.getSource(),elem.getVendor())); |
| | | }); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId); |
| | | // 更新源站点信息 |
| | |
| | | locDetl.setAppeUser(userId); |
| | | locDetl.setAppeTime(new Date()); |
| | | locDetl.setZpallet(param.getZpallet());//托盘号 |
| | | locDetl.setVendor(adjust.getVendor()); |
| | | locDetl.setSource(adjust.getSource()); |
| | | locDetl.setSupplier(adjust.getSupplier()); |
| | | locDetl.setQtyBox(matCode.getStr6()); |
| | | locDetl.setAllQty(matCode.getStr6()*adjust.getCount()); |
| | | locDetl.setAllWeight(matCode.getWeight()*adjust.getCount()+30); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | throw new CoolException("保存库存明细失败"); |
| | | } |
| | |
| | | throw new CoolException("清除库存明细失败"); |
| | | } |
| | | } else { |
| | | MatCode matCode = matCodeService.selectById(adjust.getMatNo()); |
| | | LocDetl sqlParam1 = new LocDetl(); |
| | | sqlParam1.setQty(adjust.getCount()); |
| | | sqlParam1.setSupplier(adjust.getSupplier()); |
| | | sqlParam1.setModiTime(new Date()); |
| | | sqlParam1.setModiUser(userId); |
| | | sqlParam1.setVendor(adjust.getVendor()); |
| | | sqlParam1.setSource(adjust.getSource()); |
| | | sqlParam1.setSupplier(adjust.getSupplier()); |
| | | sqlParam1.setQtyBox(matCode.getStr6()); |
| | | sqlParam1.setAllQty(matCode.getStr6()*adjust.getCount()); |
| | | sqlParam1.setAllWeight(matCode.getWeight()*adjust.getCount()+30); |
| | | if (!locDetlService.update(sqlParam1, new EntityWrapper<LocDetl>() |
| | | .eq("loc_no", locMast.getLocNo()) |
| | | .eq("mat_no", adjust.getMatNo()) |