package com.hzs.scm.store.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.scm.store.IcStoreHandNum;
import com.hzs.common.domain.scm.store.ext.IcStoreHandNumExt;
import com.hzs.scm.store.param.StoreHandNumParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 店铺现存量 Mapper 接口
 * </p>
 *
 * @author hzs
 * @since 2024-05-16
 */
public interface IcStoreHandNumMapper extends BaseMapper<IcStoreHandNum> {

    /*
     * @description: 查询产品是否存在现存量表，用于发货\收货，收货没有规格，用于收货、发货
     * @author: sui q
     * @date: 2023/11/22 15:04
     * @param: null null
     **/
    List<IcStoreHandNumExt> queryIcStoreHandNumByCondition(StoreHandNumParam icOnHandNum);

    /*
     * @description: 查询产品是否存在现存量表，查询显示的
     * @author: sui q
     * @date: 2023/11/22 15:04
     * @param: null null
     **/
    List<IcStoreHandNumExt> queryDisIcStoreHandNumByCondition(StoreHandNumParam icOnHandNum);

    /*
     * @description: 出入口的时候更新原来现存量的数量
     * @author: sui q
     * @date: 2023/11/22 17:04
     * @param: null null
     **/
    Integer updateStoreHandNumByNum(IcStoreHandNum icOnHandNum);

    /*
     * @description: 批量更新库存数量，用于签呈提交
     * @author: sui q
     * @date: 2023/11/29 9:13
     * @param: null null
     **/
    Integer mergeUpdateOnHandNumByNum(@Param("icOnHandNumList") List<IcStoreHandNum> icOnHandNumList);
}
