李林
2024-03-18 0d98e9c2d06c5d8b7b6de5ec433a12713744ae6b
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java
@@ -45,7 +45,19 @@
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addStandardTree(StandardTree standardTree) {
        if(standardTree.getSample()!=null){
            List<StandardProductList> list = standardTreeMapper.getStandardProductListBySample(standardTree.getSampleType());
            for (StandardProductList standardProductList : list) {
                standardProductList.setFactory(standardTree.getFactory());
                standardProductList.setLaboratory(standardTree.getLaboratory());
                standardProductList.setSampleType(standardTree.getSampleType());
                standardProductList.setSample(standardTree.getSample());
                standardProductList.setModel(standardTree.getModel());
                standardProductListMapper.insert(standardProductList);
            }
        }
        return standardTreeMapper.insert(standardTree);
    }