value
2024-06-06 c1233db43e24655c28d6bfaab853df068f05c0ba
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardTreeServiceImpl.java
@@ -19,6 +19,7 @@
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
 * @author Administrator
@@ -109,6 +110,22 @@
        return standardTreeMapper.getStandardTree2();
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int upStandardProducts(Map<String, Object> product) {
        List<Integer> ids = JSON.parseArray(product.get("ids")+"");
        StandardProductList productList = JSON.parseObject(JSON.toJSONString(product.get("standardProductList")), StandardProductList.class);
        standardProductListMapper.update(productList, Wrappers.<StandardProductList>lambdaUpdate().in(StandardProductList::getId, ids));
        return 1;
    }
    @Override
    public List<StandardTree> getStandTreeBySampleType(String laboratory, String sampleType) {
        return standardTreeMapper.selectList(Wrappers.<StandardTree>lambdaQuery()
                .eq(StandardTree::getLaboratory, laboratory)
                .eq(StandardTree::getSampleType, sampleType)
                .select(StandardTree::getModel, StandardTree::getSample));
    }
}