| | |
| | | @Override |
| | | public List<StandardProductList> selectStandardProductList(InsSample insSample) { |
| | | String[] models = insSample.getModel().split("-(?=[^-]*$)");//拆分最后一个【-】 |
| | | // String[] factorys = insSample.getFactory().split(" - "); |
| | | //List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0]).eq(StandardProductList::getSampleType, factorys[2])); |
| | | List<StandardProductList> list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]); |
| | | if (list.size() == 0) { |
| | | if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) { |
| | |
| | | String[] split = insSample.getFactory().split(" - "); |
| | | String tree = split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3] + " - null"; |
| | | list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree); |
| | | /* list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery() |
| | | .eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()) |
| | | .eq(StandardProductList::getState, 1) |
| | | .like(StandardProductList::getTree, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]));*/ |
| | | |
| | | if (list.size()==0){ |
| | | String tree1 = split[0] + " - " + split[1] + " - " + split[2] + " - null - " + split[3] ; |
| | | list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, tree1); |
| | | } |
| | | } |
| | | list = list.stream().filter(a -> { |
| | | try { |
| | |
| | | if (Objects.equals(a.getBsm(), "1")) { |
| | | return true; |
| | | } else { |
| | | if (sections.get(i).contains("&")) { |
| | | String[] split = sections.get(i).split("&"); |
| | | if (sections.get(i).contains("@")) { |
| | | String[] split = sections.get(i).split("@"); |
| | | isIf = getIsIf(split[0], models[1]) && getIsIf(split[1], models[1]); |
| | | } else { |
| | | isIf = getIsIf(sections.get(i), models[1]); |