| | |
| | | @Override |
| | | @Transactional |
| | | public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, IoWorkType ioWorkType, Long userId) { |
| | | Integer basDevp = staNo.getDevNo(); |
| | | Date now = new Date(); |
| | | // 合并同类项 |
| | | Set<String> locNos = new HashSet<>(); |
| | |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(locDetl.getMatnr() + "商品档案不存在"); |
| | | } |
| | | int zpallet = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", locDetl.getZpallet())); |
| | | if (zpallet>0) { |
| | | throw new CoolException(locDetl.getZpallet() + "入库通知档中已存在"); |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | waitPakin.sync(mat); |
| | | waitPakin.setBatch(""); |
| | |
| | | //-----------------2023.6.2出库兼容代码----------------------- |
| | | if (ioType!=107){ |
| | | List<LocDetl> locDetls = locDetlService.selectByLocNo(locMast.getLocNo()); |
| | | if (locMast.getLocType2() == 1 && locDetls.size() > 1) { |
| | | //单品区域出库物料大于1种,强制变成101全板出库 |
| | | ioType = 101; |
| | | //if (locMast.getLocType2() == 1 && locDetls.size() > 1) { |
| | | // //单品区域出库物料大于1种,强制变成101全板出库 |
| | | // ioType = 101; |
| | | // if (staNo.getDevNo()==300){ |
| | | // staNo.setDevNo(200); |
| | | // } |
| | | //} |
| | | if (ioType == 101) { |
| | | if (staNo.getDevNo()==300){ |
| | | staNo.setDevNo(200); |
| | | if(locMast.getCrnNo() == 1) { |
| | | staNo.setDevNo(100); |
| | | } else { |
| | | staNo.setDevNo(200); |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | staNo.setDevNo(basDevp); |
| | | } |
| | | |
| | | |
| | | } |
| | | //-----------------2023.6.2出库兼容代码end----------------------- |
| | | |