| | |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | param.setContainerType(Short.valueOf(param.getBarcode().substring(0,2))); |
| | | |
| | | //检查是否已存在相同的托盘条码,存在则抛出异常 |
| | | if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().eq("supp_code", param.getBarcode())) > 0) { |
| | | throw new CoolException(param.getBarcode() + "料想码已存在AGV入库通知档中"); |
| | | } |
| | | // //检查是否已存在相同的托盘条码,存在则抛出异常 |
| | | // if (agvWaitPakinService.selectCount(new EntityWrapper<AgvWaitPakin>().eq("supp_code", param.getBarcode())) > 0) { |
| | | // throw new CoolException(param.getBarcode() + "料想码已存在AGV入库通知档中"); |
| | | // } |
| | | |
| | | //检查库存是否有相同料箱,存在则抛出异常 |
| | | if(!Cools.isEmpty(agvLocDetlService.selectOne(new EntityWrapper<AgvLocDetl>().eq("supp_code",param.getBarcode())))){ |
| | |
| | | DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq(),combMat.getContainerCode(),param.getLocType()); |
| | | //同一托盘下相同物料信息和批号转为一个入库通知档 |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),null); |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),detlDto.getContainerCode()); |
| | | assert one != null; |
| | | one.setAnfme(one.getAnfme() + detlDto.getAnfme()); |
| | | } else { |
| | |
| | | @Override |
| | | public void combBinding(String barcode, String stationCode, Short containerType) { |
| | | |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no", stationCode)); |
| | | |
| | | if(Cools.eq(agvBasDevp.getBarcode(),barcode)){ |
| | | return; |
| | | } |
| | | |
| | | if(Cools.isEmpty(agvWaitPakinService.selectByContainerCode(barcode))){ |
| | | throw new CoolException("该料箱未组托,无法绑定站点"); |
| | | } |
| | | |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode)); |
| | | AgvBasDevp agvBasDevp1 = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode)); |
| | | |
| | | if(!Cools.isEmpty(agvBasDevp)){ |
| | | if(!Cools.isEmpty(agvBasDevp1)){ |
| | | throw new CoolException(barcode + "已经绑定在"+ agvBasDevp.getDevNo() +"站点"); |
| | | } |
| | | |
| | | agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no",stationCode)); |
| | | if(agvBasDevp == null){ |
| | | throw new CoolException(stationCode + "站点信息错误"); |
| | | } |