| | |
| | | if (Objects.equals(a.getBsm(), "1")) { |
| | | return true; |
| | | } else { |
| | | if (sections.get(i).contains("&")) { |
| | | String[] split = sections.get(i).split("&"); |
| | | isIf = getIsIf(split[0], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample) |
| | | && getIsIf(split[1], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample); |
| | | } else { |
| | | isIf = getIsIf(sections.get(i), modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample); |
| | | int firstIndex = a.getTree().indexOf(" - "); |
| | | String result2 = null; |
| | | if (firstIndex != -1) { |
| | | int secondIndex = a.getTree().indexOf(" - ", firstIndex + 3); |
| | | if (secondIndex != -1) { |
| | | int thirdIndex = a.getTree().indexOf(" - ", secondIndex + 3); |
| | | if (thirdIndex != -1) { |
| | | result2 = a.getTree().substring(secondIndex + 3, thirdIndex); |
| | | } |
| | | } |
| | | } |
| | | if (isIf) { |
| | | a.setSection(sections.get(i)); |
| | | a.setAsk(asks.get(i)); |
| | | a.setTell(tells.get(i)); |
| | | return true; |
| | | // 判断 原辅材 包材 |
| | | Set<String> targetStrings = new HashSet<>(); |
| | | targetStrings.add("原辅材"); |
| | | targetStrings.add("包材"); |
| | | boolean isType; |
| | | isType = targetStrings.contains(result2); |
| | | if (isType) { |
| | | if (StringUtils.isNotEmpty(modelNum)){ |
| | | String currentSection = sections.get(i); |
| | | String sectionValue = currentSection; |
| | | int equalIndex = currentSection.indexOf("="); |
| | | if (equalIndex != -1) { |
| | | sectionValue = currentSection.substring(equalIndex + 1); |
| | | } |
| | | if (modelNum.equals(sectionValue)) { |
| | | a.setSection(sections.get(i)); |
| | | a.setAsk(asks.get(i)); |
| | | a.setTell(tells.get(i)); |
| | | return true; |
| | | } |
| | | }else { |
| | | return false; |
| | | } |
| | | } else { |
| | | if (sections.get(i).contains("&")) { |
| | | String[] split = sections.get(i).split("&"); |
| | | isIf = getIsIf(split[0], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample) |
| | | && getIsIf(split[1], modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample); |
| | | } else { |
| | | isIf = getIsIf(sections.get(i), modelNum, cores.get(i), conductorMaterials.get(i), conductorTypes.get(i), insSample); |
| | | } |
| | | if (isIf) { |
| | | a.setSection(sections.get(i)); |
| | | a.setAsk(asks.get(i)); |
| | | a.setTell(tells.get(i)); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | if (StringUtils.isNotEmpty(productPart.getInspectionItem())) { |
| | | String inspectionItem = productPart.getInspectionItem(); |
| | | list = list.stream() |
| | | .filter(standardProductList -> inspectionItem.equals(standardProductList.getInspectionItem())) |
| | | .filter(standardProductList -> inspectionItem.contains(standardProductList.getInspectionItem())) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |