| | |
| | | List<String> prices = JSON.parseArray(a.getPrice(), String.class); |
| | | boolean isIf; |
| | | for (int i = 0; i < sections.size(); i++) { |
| | | if(Objects.equals(a.getBsm(), "1")){ |
| | | if (Objects.equals(a.getBsm(), "1")) { |
| | | return true; |
| | | }else{ |
| | | } else { |
| | | if (sections.get(i).contains("&")) { |
| | | String[] split = sections.get(i).split("&"); |
| | | isIf = getIsIf(split[0], models[1]) && getIsIf(split[1], models[1]); |
| | |
| | | return list; |
| | | } |
| | | |
| | | private boolean getIsIf(String str, String model){ |
| | | private boolean getIsIf(String str, String model) { |
| | | Matcher matcher = Pattern.compile("\\d+(\\.\\d+)?").matcher(model); |
| | | String model2 = ""; |
| | | while (matcher.find()) { |
| | |
| | | } else if (str.contains("≤") || str.contains("<=")) { |
| | | String param = str.replace("≤", "").replace("<=", ""); |
| | | return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 1; |
| | | } else if (str.contains(">")||str.contains(">")) { |
| | | } else if (str.contains(">") || str.contains(">")) { |
| | | String param = str.replace(">", "").replace(">", ""); |
| | | return new BigDecimal(model2).compareTo(new BigDecimal(param)) > 0; |
| | | } else if (str.contains("<")||str.contains("<")) { |
| | | } else if (str.contains("<") || str.contains("<")) { |
| | | String param = str.replace("<", "").replace("<", ""); |
| | | return new BigDecimal(model2).compareTo(new BigDecimal(param)) < 0; |
| | | } else if (str.contains("=")) { |
| | |
| | | for (StandardProductList sp : standardProductLists) { |
| | | for (StandardProductList pl : list) { |
| | | if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem()) |
| | | && Objects.equals((sp.getInspectionItemSubclass() == null)? "" : sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass() == null ? "" : pl.getInspectionItemSubclass()) |
| | | && Objects.equals((sp.getInspectionItemSubclass() == null) ? "" : sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass() == null ? "" : pl.getInspectionItemSubclass()) |
| | | && Objects.equals(sp.getModel(), pl.getModel()) |
| | | && Objects.equals(sp.getStructureItemParameterId(), pl.getStructureItemParameterId())) { |
| | | pl.setId(sp.getId()); |
| | |
| | | if (sp.getTemplateId() != null && !sp.getTemplateId().equals("")) { |
| | | pl.setTemplateId(sp.getTemplateId()); |
| | | } |
| | | if(sp.getTree() != null && !sp.getTree().equals("")){ |
| | | if (sp.getTree() != null && !sp.getTree().equals("")) { |
| | | pl.setTree(sp.getTree()); |
| | | } |
| | | break; |
| | |
| | | if (page == 1) { |
| | | Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId"); |
| | | CompletableFuture.supplyAsync(() -> { |
| | | if(trees.length == 5){ |
| | | if (trees.length == 5) { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).eq(StandardProductList::getTree, tree)); |
| | | }else{ |
| | | } else { |
| | | standardProductListMapper.delete(Wrappers.<StandardProductList>lambdaUpdate().eq(StandardProductList::getStandardMethodListId, id).like(StandardProductList::getTree, tree)); |
| | | } |
| | | standardProductListService2.saveBatch(list.stream().map(a -> { |