package com.dk.mdm.mapper.ivt;

import com.dk.mdm.model.pojo.ivt.InOutRecord;
import com.dk.mdm.model.pojo.ivt.Inventory;
import com.dk.common.mapper.BaseMapper;
import com.dk.mdm.model.query.ivt.InOutRecordQuery;
import com.dk.mdm.model.query.ivt.InventoryQuery;
import com.dk.mdm.model.response.ivt.InOutRecordResponse;
import com.dk.mdm.model.response.ivt.InventoryResponse;
import com.dk.mdm.model.vo.ivt.FreezeItemVO;
import com.dk.mdm.model.vo.ivt.InventoryVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
*  库存明细 Mapper
*/
@Repository
public interface InventoryMapper extends BaseMapper<Inventory>{

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

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

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

    /**
     * @desc   : 条件查询--查单条
     * @date   : 2024/3/20 17:00
     * @author : 寇珊珊
     */
   InventoryResponse  selectByOther(InventoryQuery inventoryQuery);


   /**
    * @desc   : 修改库存数量金额
    * @date   : 2024/3/22 9:53
    * @author : 寇珊珊
    */
   int updateAmountAndQuantity(InventoryVO inventoryVO);


   /**
    * @desc   : 修改库存数量金额----删除用
    * @date   : 2024/3/22 9:53
    * @author : 寇珊珊
    */
   int updateAmtAndQty(Inventory inventory);


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

    /**
     * @desc   : 修改存货单价/存货资产
     * @author : 常皓宁
     * @date   : 2024/4/18 14:57
     */
    int updateCost(Inventory inventory);

}

