package com.dk.mdm.mapper.ivt;

import com.dk.mdm.model.pojo.ivt.InOutRecord;
import com.dk.mdm.model.pojo.ivt.OutboundItemCost;
import com.dk.common.mapper.BaseMapper;
import com.dk.mdm.model.query.ivt.InventoryQuery;
import com.dk.mdm.model.query.ivt.OutboundItemCostQuery;
import com.dk.mdm.model.response.ivt.InventoryResponse;
import com.dk.mdm.model.response.ivt.OutboundItemCostResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
*  出库成本 Mapper
*/
@Repository
public interface OutboundItemCostMapper extends BaseMapper<OutboundItemCost>{


    /**
     * @desc   : 根据id查询
     * @date   : 2024/3/9 9:14
     * @author : 寇珊珊
     */
    OutboundItemCostResponse selectById(@Param("id") String id);

    /**
     * @desc   : 条件查询
     * @date   : 2024/3/20 9:39
     * @author : 寇珊珊
     */
    List<OutboundItemCostResponse> selectByCond(OutboundItemCostQuery outboundItemCostQuery);

    /**
     * @desc   : 条件查询个数
     * @date   : 2024/3/20 9:39
     * @author : 寇珊珊
     */
    Long countByCond(OutboundItemCostQuery outboundItemCostQuery);



    /**
     * @desc   : 删除数据
     * @date   : 2024/4/10 13:46
     * @author : 寇珊珊
     */
    int deleteData(InOutRecord inOutRecord);


    /**
     * @desc   : 入库成本核对查询出库成本
     * @author : 常皓宁
     * @date   : 2024/4/18 9:46
     */
    List<OutboundItemCostResponse> selectCostOutbound(OutboundItemCostQuery outboundItemCostQuery);

    /**
     * @desc   : 修改出库成本(入库成本核对)
     * @author : 常皓宁
     * @date   : 2024/4/18 10:55
     */
    int updateOutboundCost(OutboundItemCostQuery outboundItemCostQuery);

    /**
     * @desc   : 修改最后一条出库成本(入库成本核对)
     * @author : 常皓宁
     * @date   : 2024/4/18 10:55
     */
    int updateLastCost(OutboundItemCostQuery updateLastCost);

}

