| | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | if (!(locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O"))) { |
| | | if (!(locMast.getLocSts().equals("P") ||locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O"))) { |
| | | throw new CoolException("当前库位不可调整!库位状态:" + locMast.getLocSts$()); |
| | | } |
| | | |
| | |
| | | Mat mat = matService.selectByMatnr(adjust.getMatnr()); |
| | | LocDetl locDetl = new LocDetl(); |
| | | locDetl.sync(mat); |
| | | locDetl.setBatch(adjust.getBatch()); |
| | | locDetl.setDanger(adjust.getDanger()); |
| | | locDetl.setSku(adjust.getBatch()); |
| | | locDetl.setLocNo(locMast.getLocNo()); |
| | | locDetl.setAnfme(adjust.getCount()); // 数量 |
| | | locDetl.setModiUser(userId); // 操作人员信息 |
| | |
| | | } |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(now); |
| | | if (locMast.getLocSts().equals("O")){ |
| | | locMast.setBarcode(""); |
| | | } |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("更新库位状态失败"); |
| | | } |
| | |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", wrkMast.getIoType() - 50) |
| | | .eq("stn_no", wrkMast.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("stn_no", wrkMast.getSourceStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | |
| | | wrkMast.setEmptyMk("Y"); // 空板 |
| | | wrkMast.setBarcode(wrkMastold.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setPltType(wrkMastold.getWrkNo()); |
| | | wrkMast.setAppeTime(new Date()); |
| | | wrkMast.setModiTime(new Date()); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | |
| | | wrkMast.setEmptyMk(wrkDetls != null ? "N" : "Y"); // 空板 |
| | | wrkMast.setBarcode(wrkMastold.getBarcode()); // 托盘码 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setPltType(wrkMastold.getWrkNo()); |
| | | wrkMast.setAppeTime(new Date()); |
| | | wrkMast.setModiTime(new Date()); |
| | | boolean res = wrkMastService.insert(wrkMast); |