| | |
| | | if (checkOrderDetlList.isEmpty()) { |
| | | throw new CoolException("盘点单无物料明细"); |
| | | } |
| | | InventoryCheckOrderDetl orderDetl = checkOrderDetlList.get(0); |
| | | |
| | | List<InventoryCheckOrderDetl> checkOrderDetls = inventoryCheckOrderDetlService.selectList(new EntityWrapper<InventoryCheckOrderDetl>() |
| | | .eq("matnr", orderDetl.getMatnr()) |
| | | .eq("batch", orderDetl.getBatch()) |
| | | ); |
| | | |
| | | boolean complete = true; |
| | | for (InventoryCheckOrderDetl checkOrderDetl : checkOrderDetls) { |
| | | for (InventoryCheckOrderDetl checkOrderDetl : checkOrderDetlList) { |
| | | if (!checkOrderDetl.getStatus().equals("2")) { |
| | | complete = false; |
| | | } |
| | | } |
| | | if (complete) { |
| | | boolean result = reportToThirdService.reportCheckOrder(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | boolean result = reportToThirdService.reportCheckOrder(checkOrderDetlList); |
| | | if (!result) { |
| | | throw new CoolException("盘点单上报失败"); |
| | | } |
| | |
| | | .setJson(JSON.toJSONString(map)) |
| | | .build() |
| | | .doPost(); |
| | | log.info("toOutSta:{}", response); |
| | | log.info("toOutSta:{},{}",map, response); |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | } |
| | |
| | | throw new CoolException("工作状态未处于已出库"); |
| | | } |
| | | |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo())); |
| | | if (locMast == null) { |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | |
| | | if (!locMast.getLocSts().equals("P")) { |
| | | throw new CoolException("库位类型不是拣料出库"); |
| | | } |
| | | |
| | | wrkMast.setBarcode(param.getNewBarcode()); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMastService.updateById(wrkMast); |
| | | |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.setZpallet(param.getNewBarcode()); |
| | | wrkDetl.setModiTime(new Date()); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetlService.update(wrkDetl, new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | wrkDetlService.updateBarcode(wrkMast.getWrkNo(), param.getNewBarcode()); |
| | | |
| | | locMast.setBarcode(param.getNewBarcode()); |
| | | locMast.setModiTime(new Date()); |
| | | locMastService.updateById(locMast); |
| | | |
| | | locDetlService.updateBarcode(locMast.getLocNo(), param.getNewBarcode()); |
| | | } |
| | | } |