package com.jeeplus.psimanage.psiWareHouse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.psimanage.collect.domain.PsiCollectDetailed;
import com.jeeplus.psimanage.psiWareHouse.domain.PsiWareHouseDetailed;
import com.jeeplus.psimanage.psiWareHouse.domain.PsiWareHouseSummary;
import com.jeeplus.psimanage.psiWareHouse.service.dto.PsiWareHouseDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 王强
 * @create: 2022-12-30 10:07
 **/
public interface PsiWareHouseSummaryMapper extends BaseMapper<PsiWareHouseSummary> {
    /**
     * 根据入库类型和商品名称查询库存数量
     * @param tradeName
     * @param wareHouseType
     * @return
     */
    Double getInfoByTradeName(@Param("tradeName") String tradeName,
                                            @Param("wareHouseType") String wareHouseType);


    /**
     * 根据日期排序查询不同生产日期的列表数据
     * @param tradeName
     * @param wareHouseType
     * @return
     */
    List<PsiWareHouseDetailed>   getInfoByProduceDateDesc(@Param("tradeName") String tradeName,
                              @Param("wareHouseType") String wareHouseType);




    /**
     * 根据入库基础表id查出汇总表数据
     * @param id
     * @return
     */
    List<PsiWareHouseSummary> getInfoByBasicId(String id);

    void deleteByDetailedId(String id);
}
