XiaoRuby
2023-07-21 2086b1f359f4a59c1f6de67b38dd29be88f2c7bf
standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/MaterialServiceImpl.java
@@ -10,6 +10,7 @@
import com.yuanchu.limslaboratory.service.ProductService;
import com.yuanchu.limslaboratory.utils.MyUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
@@ -30,7 +31,26 @@
public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> implements MaterialService {
    @Resource
    private MaterialMapper materialMapper;
    MaterialMapper materialMapper;
    @Override
    public List<Material> selectMaterialLimit(int pageSize, int countSize) {
        return materialMapper.selectMaterialLimit((pageSize - 1) * countSize,pageSize * countSize);
    }
    @Override
    public Map selectMaterialById(String materialId) {
        return materialMapper.selectMaterialById(materialId);
    }
    @Override
    public Material ListIdMaterialInformation(String materialId) {
        LambdaQueryWrapper<Material> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Material::getId, materialId);
        wrapper.select(Material::getId, Material::getName, Material::getSupplier, Material::getLocation, Material::getNum, Material::getBatch,
                Material::getReelNumber);
        return materialMapper.selectOne(wrapper);
    }
    @Autowired
    private ProductService productService;