| | |
| | | ProcessInspectMapper processInspectMapper; |
| | | |
| | | @Resource |
| | | ProductService productService; |
| | | ManualProductService manualProductService; |
| | | |
| | | @Resource |
| | | InspectionItemMapper inspectionItemMapper; |
| | |
| | | BeanUtils.copyProperties(processInspectVo, processInspect); |
| | | processInspectMapper.insert(processInspect); |
| | | /*批量新增过程检验项目表*/ |
| | | /*//获取型号id |
| | | Integer specificationId = getSpecificationId(processInspectVo.getMaterial(), processInspectVo.getMaterialCode(), processInspectVo.getSpecificationsModel()); |
| | | //查询标准BOM技术指标中该型号工艺下最新版本的检验项目 |
| | | Integer ver = productService.selectVerByPro(specificationId).get(0);//该型号下技术指标最新版本*/ |
| | | List<Product> productList = productService.selProByVerSpe(processInspectVo.getTechId()); |
| | | List<InspectionItem> inspectionItemList = productList.stream().map(product -> { |
| | | List<ManualProduct> manualProductList = manualProductService.selByMtid(processInspectVo.getMtId()); |
| | | List<InspectionItem> inspectionItemList = manualProductList.stream().map(manualProduct -> { |
| | | InspectionItem inspectionItem = new InspectionItem(); |
| | | BeanUtils.copyProperties(product, inspectionItem); |
| | | BeanUtils.copyProperties(manualProduct, inspectionItem); |
| | | inspectionItem.setCreateTime(new Date()); |
| | | inspectionItem.setUpdateTime(new Date()); |
| | | inspectionItem.setInspectId(processInspect.getId()); |