zss
2024-08-01 54a33a391e211a4b2b97621501c6236527d32331
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java
@@ -68,7 +68,12 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addStandardTree(StandardTree standardTree) {
        StandardTree tree = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery().eq(StandardTree::getModel, standardTree.getModel()));
        StandardTree tree = standardTreeMapper.selectOne(Wrappers.<StandardTree>lambdaQuery()
                .eq(StandardTree::getFactory, standardTree.getFactory())
                .eq(StandardTree::getLaboratory, standardTree.getLaboratory())
                .eq(StandardTree::getSampleType, standardTree.getSampleType())
                .eq(StandardTree::getSample, standardTree.getSample())
                .eq(StandardTree::getModel, standardTree.getModel()));
        if (tree != null) {
            throw new ErrorException("该型号已存在");
        }