package com.jwipc.inquiry.service.impl;

import com.jwipc.inquiry.entity.InquiryMaterial;
import com.jwipc.inquiry.mapper.InquiryMaterialMapper;
import com.jwipc.inquiry.model.po.AssistantMaterialSupplierPO;
import com.jwipc.inquiry.model.po.InquiryMaterialPO;
import com.jwipc.inquiry.model.query.InquiryMaterialQuery;
import com.jwipc.inquiry.service.IInquiryMaterialService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 询价物料表 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-21
 */
@Service
public class InquiryMaterialServiceImpl extends ServiceImpl<InquiryMaterialMapper, InquiryMaterial> implements IInquiryMaterialService {

    @Override
    public List<InquiryMaterialPO> listAll(InquiryMaterialQuery query) {
        return baseMapper.listAll(query);
    }

    @Override
    public List<AssistantMaterialSupplierPO> getAssistantMaterialByInquiryId(Long inquiryId) {
        return baseMapper.getAssistantMaterialByInquiryId(inquiryId);
    }

    @Override
    public BigDecimal getPurchaseNumAmountByBillNoAndCode(String purchaseBillCode, String purchaseBillItemCode,Long id) {
        return baseMapper.getPurchaseNumAmountByBillNoAndCode(purchaseBillCode,purchaseBillItemCode,id);
    }
}
