| | |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | |
| | | LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getBrand() |
| | | , wrkDetl.getStandby1(), wrkDetl.getStandby2(), wrkDetl.getStandby3(), wrkDetl.getBoxType1(), wrkDetl.getBoxType2(), wrkDetl.getBoxType3()); |
| | | if (null != locDetl) { |
| | |
| | | locDetl = new LocDetl(); |
| | | locDetl.sync(wrkDetl); |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | if (!Objects.isNull(wrkMast.getWrkCode())) { |
| | | locDetl.setAnfme(wrkDetl.getRealQty()); |
| | | } else { |
| | | locDetl.setAnfme(wrkDetl.getAnfme()); // 数量 |
| | | } |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setModiTime(now); |
| | | locDetl.setAppeTime(now); |
| | |
| | | } |
| | | |
| | | //判断匹配编码不为空,且任务编码包含-2,确认为有上组任务 |
| | | if (!Objects.isNull(wrkMast.getWrkCode()) && wrkMast.getWrkCode().contains("-2")) { |
| | | if (!Objects.isNull(wrkMast.getWrkCode())) { |
| | | //不需要更新单据信息(子任务无单据 |
| | | |
| | | } else { |
| | | //正常单据才存存入库单,作入库单据信息更新 |
| | | // 更新订单完成数量 |
| | |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | |
| | | /***/ |
| | | if (!Objects.isNull(wrkMast.getWrkCode())) { |
| | | LocMast lcmst = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo())); |
| | | lcmst.setLocSts(LocStsType.LOC_STS_TYPE_O.type); |
| | | if (!locMastService.updateById(lcmst)) { |
| | | throw new CoolException("库位状态修改失败!!"); |
| | | } |
| | | |
| | | LocAroundBind bLocNo = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>().eq("b_loc_no", wrkMast.getSourceLocNo())); |
| | | if (Objects.isNull(bLocNo)) { |
| | | throw new CoolException("工位不存在 !!"); |
| | | } |
| | | bLocNo.setLocType(LocStsType.LOC_STS_TYPE_O.type); |
| | | if (!locAroundBindService.updateById(bLocNo)) { |
| | | throw new CoolException("工位状态修改失败!!"); |
| | | } |
| | | |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getSourceLocNo())); |
| | | } |
| | | |
| | | return SUCCESS; |
| | | } |
| | | |