zss
2023-07-26 f330903e12d38af89d61f16c96856924d241a0f2
standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/MaterialServiceImpl.java
@@ -5,9 +5,11 @@
import com.yuanchu.limslaboratory.pojo.Material;
import com.yuanchu.limslaboratory.mapper.MaterialMapper;
import com.yuanchu.limslaboratory.pojo.Specifications;
import com.yuanchu.limslaboratory.pojo.dto.UpdateMaterialInformation;
import com.yuanchu.limslaboratory.service.MaterialService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.limslaboratory.service.ProductService;
import com.yuanchu.limslaboratory.utils.JackSonUtil;
import com.yuanchu.limslaboratory.utils.MyUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
@@ -33,16 +35,27 @@
    @Resource
    MaterialMapper materialMapper;
    //查询物料信息
    @Override
    public List<Material> selectMaterialLimit(int pageSize, int countSize) {
        return materialMapper.selectMaterialLimit((pageSize - 1) * countSize,pageSize * countSize);
    }
    //根据物料id查询物料信息
    @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;