| | |
| | | } |
| | | } |
| | | //都为空 只配置了套管 这种情况只限于项目是含有松套管的 |
| | | // else { |
| | | // String collect = a.getInsProduct().stream().map(InsProduct::getInspectionItem).distinct().collect(Collectors.joining(",")); |
| | | // if (collect.contains("松套管")){ |
| | | // //获取检验项目中包含松套管的检验项目 |
| | | // List<InsProduct> products = a.getInsProduct().stream().filter(insProduct -> insProduct.getInspectionItem().contains("松套管")).collect(Collectors.toList()); |
| | | // for (InsProduct product : products) { |
| | | // product.setInsBushId(bushingDto.getId()); |
| | | // product.setId(null); |
| | | // product.setCreateTime(null); |
| | | // product.setCreateUser(null); |
| | | // product.setUpdateTime(null); |
| | | // product.setUpdateUser(null); |
| | | // product.setInsSampleId(a.getId()); |
| | | // if (product.getInspectionItemSubclass() == null) { |
| | | // product.setInspectionItemSubclass(""); |
| | | // } |
| | | // insProductMapper.insert(product); |
| | | // } |
| | | // }else { |
| | | // throw new ErrorException("样品的光纤配置信息里面没有配置光纤带信息也没有光纤信息,请重新配置保存再提交下单!!!"); |
| | | // } |
| | | // } |
| | | else { |
| | | String collect = a.getInsProduct().stream().map(InsProduct::getInspectionItem).distinct().collect(Collectors.joining(",")); |
| | | if (collect.contains("松套管")){ |
| | | //获取检验项目中包含松套管的检验项目 |
| | | List<InsProduct> products = a.getInsProduct().stream().filter(insProduct -> insProduct.getInspectionItem().contains("松套管")).collect(Collectors.toList()); |
| | | for (InsProduct product : products) { |
| | | product.setInsBushId(bushingDto.getId()); |
| | | product.setId(null); |
| | | product.setCreateTime(null); |
| | | product.setCreateUser(null); |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setInsSampleId(a.getId()); |
| | | if (product.getInspectionItemSubclass() == null) { |
| | | product.setInspectionItemSubclass(""); |
| | | } |
| | | insProductMapper.insert(product); |
| | | } |
| | | }else { |
| | | throw new ErrorException("样品的光纤配置信息里面没有配置光纤带信息也没有光纤信息,请重新配置保存再提交下单!!!"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | InsOrder insOrder = insOrderMapper.selectById(insSampleMapper.selectById(sampleId).getInsOrderId()); |
| | | String name = insSampleMapper.selMethodById(sampleId); |
| | | for (InsProduct product : productList) { |
| | | // if (product.getInspectionItem().contains("松套管")){ |
| | | // continue; |
| | | // } |
| | | if (product.getInspectionItem().contains("松套管")){ |
| | | continue; |
| | | } |
| | | if (product.getState() == 1 && !product.getInspectionItem().equals("光纤接头损耗")) { |
| | | //判断光缆的温度循环项目添加 |
| | | if (insOrder.getSampleType().equals("光缆") && product.getInspectionItem().equals("温度循环") && type != 0) { |