| | |
| | | |
| | | @Override |
| | | public int upStandardProductList(StandardProductList list) { |
| | | /*if(list.getId()==null || list.getId().equals("")){ |
| | | |
| | | }*/ |
| | | return standardProductListMapper.updateById(list); |
| | | } |
| | | |
| | |
| | | List<StandardProductList> list = new ArrayList<>(); |
| | | if (trees.length == 3) { |
| | | List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2])); |
| | | if(treeList.size()==0){ |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory(trees[0]); |
| | | standardTree.setLaboratory(trees[1]); |
| | | standardTree.setSampleType(trees[2]); |
| | | treeList.add(standardTree); |
| | | } |
| | | for (StandardTree standardTree : treeList) { |
| | | String str = tree+" - "+standardTree.getSample()+" - "+standardTree.getModel(); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree3("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str)); |
| | | } |
| | | } else if (trees.length == 4){ |
| | | List<StandardTree> treeList = standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getLaboratory, trees[1]).eq(StandardTree::getSampleType, trees[2]).eq(StandardTree::getSample, trees[3])); |
| | | if(treeList.size()==0){ |
| | | StandardTree standardTree = new StandardTree(); |
| | | standardTree.setFactory(trees[0]); |
| | | standardTree.setLaboratory(trees[1]); |
| | | standardTree.setSampleType(trees[2]); |
| | | standardTree.setSample(trees[2]); |
| | | treeList.add(standardTree); |
| | | } |
| | | for (StandardTree standardTree : treeList) { |
| | | String str = tree+" - "+standardTree.getModel(); |
| | | list.addAll(standardTreeMapper.selectStandardProductListByTree("\"" + trees[2] + "\"", standardTree.getSample(), standardTree.getModel(), str)); |
| | |
| | | for (StandardProductList sp : standardProductLists) { |
| | | for (StandardProductList pl : list) { |
| | | if (Objects.equals(sp.getInspectionItem(), pl.getInspectionItem()) |
| | | && Objects.equals(sp.getInspectionItemSubclass(), pl.getInspectionItemSubclass()) |
| | | && Objects.equals(sp.getModel(), pl.getModel())) { |
| | | && 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()); |
| | | pl.setState(id==0?1:sp.getState()); |
| | | if(sp.getState()!=null&&!sp.getState().equals("")){ |
| | | pl.setState(sp.getState()); |
| | | }else{ |
| | | pl.setState(id==0?1:0); |
| | | } |
| | | pl.setMethodS(sp.getMethodS()); |
| | | if(sp.getAsk()!=null&&!sp.getAsk().equals("")){ |
| | | pl.setAsk(sp.getAsk()); |