| | |
| | | private ExdStockService exdStockService; |
| | | @Autowired |
| | | private ExdInstockSourceService exdInstockSourceService; |
| | | @Autowired |
| | | private Order1Service order1Service; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | // 判断是否有相同条码的数据 |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | eq("zpallet", param.getBarcode())) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据组托档中已存在"); |
| | | } |
| | | |
| | |
| | | //进行批号筛选,批号只能唯一 |
| | | Set<String> batchs = new HashSet<>(); |
| | | List<String> strings = new ArrayList<>(); |
| | | long time = new Date().getTime(); |
| | | //生产入库对一坨物料进行绑定。唯一值 |
| | | String fbillno = param.getBarcode()+"--"+time; |
| | | for (CombParam.CombMat mat : param.getCombMats()) { |
| | | if (Cools.isEmpty(mat.getBatch())) { |
| | | continue; |
| | |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setColor(userId+""); |
| | | waitPakin.setModiTime(now); |
| | | //生产入库对一坨物料进行绑定。唯一值 |
| | | waitPakin.setOrigin(fbillno); |
| | | |
| | | ExdvYanbu barcode1 = exdMaterialMapper.getBacode(detlDto.getBc()); |
| | | //生产入库对一坨物料进行绑定。唯一值 |
| | | waitPakin.setOrigin(param.getBarcode()+"-"+barcode1.getIcmono()+"-"+now.getTime()); |
| | | String pid="03.98"; |
| | | if(!Cools.isEmpty(barcode1)&&!Cools.isEmpty(barcode1.getProdinkind())){ |
| | | pid=barcode1.getProdinkind(); |
| | | } |
| | | ExdStock id = exdStockService.selectOne(new EntityWrapper<ExdStock>().eq("Fnumber", pid)); |
| | | waitPakin.setBrand(id.getFname());//仓库 |
| | | waitPakin.setInspect(param.isType() ? 1 : 0); |
| | | if(param.isType()||Cools.isEmpty(param.getOrderNo())){ |
| | | waitPakin.setInspect(1); |
| | | } |
| | | |
| | | if (i == 1) { |
| | | // 0:不需要补空托盘 |
| | | // 1:小托盘 |
| | |
| | | if (!orderDetlService.increaseWorkQty2(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(), userId)) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | |
| | | Order1 order1 = order1Service.selectByNo(param.getOrderNo()); |
| | | // 修改子单订单作业数量 |
| | | if (!orderDetl1Service.increaseWorkQty2(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(), userId)) { |
| | | if (!orderDetl1Service.increaseWorkQty2(order1.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme(), userId)) { |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | |