package com.bonus.canteen.core.supply.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpMaterialInfoDTO;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpMaterialWinBidRecords;
import com.bonus.canteen.core.supply.purchase.domain.bo.MaterialAndUnitDTO;
import com.bonus.canteen.core.supply.purchase.domain.param.DrpMaterialBidRecordsPageDTO;
import com.bonus.canteen.core.supply.purchase.domain.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DrpPurchaseMaterialWinBidRecordsMapper extends BaseMapper<DrpMaterialWinBidRecords> {
   List<DrpMaterialBidRecordsPageVO> listMaterialUnit(@Param("content") DrpMaterialBidRecordsPageDTO content);

   List<DrpMaterialSupplierWinRecordsVO> listSupplierWinRecords(@Param("supplierId") Long supplierId, @Param("materialIdList") List<Long> materialIdList, @Param("materialInquiryId") String materialInquiryId);

   List<DrpMaterialSupplierWinRecordsVO> listSupplierWinRecordsBySupplier(@Param("supplierId") Long supplierId, @Param("materialIdList") List<Long> materialIdList);

   List<DrpMaterialBidRecordsSupplierVO> listSupplierPriceByMaterialId(@Param("materialId") Long materialId);

   List<DrpMaterialBidRecordsSupplierVO> listSupplierPriceByMaterialIdLast(@Param("materialId") Long materialId);

   List<DrpMaterialBidRecordsSupplierVO> listSupplierPriceByMaterialIdList(@Param("materialIdList") List<Long> materialIdList);

   DrpLastOrderGoodsVO getLastOrderGoodsPrice(@Param("materialId") Long materialId, @Param("unitId") Long unitId);

   List<DrpMarketPriceVO> getMarketPrice(@Param("materialId") Long materialId, @Param("unitId") Long unitId);

   List<DrpMarketPriceVO> getMarketPriceList(@Param("materialAndUnitDTOS") List<MaterialAndUnitDTO> materialAndUnitDTOS, @Param("areaId") Long areaId);

   List<DrpMaterialSupplierVO> getMaterialSupplier(@Param("content") DrpMaterialInfoDTO content);

   List<DrpLastOrderGoodsVO> getLastOrderGoodsPriceList(@Param("materialAndUnitDTOS") List<MaterialAndUnitDTO> materialAndUnitDTOS, @Param("areaId") Long areaId);
}
