package com.kxs.store.biz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kxs.common.core.util.R;
import com.kxs.store.api.dto.kxsapp.storeAdvance.StoreAdvanceAddAdvanceDTO;
import com.kxs.store.api.dto.kxsapp.userAdvance.ConfirmAdvanceMachineDTO;
import com.kxs.store.api.model.KxsMachineAdvance;
import com.kxs.store.api.model.KxsMachineAdvanceInfo;
import com.kxs.store.api.vo.kxsapp.store.StoreAdvanceMachineVO;
import com.kxs.store.api.vo.kxsapp.storeAdvance.UserWarehouseListVO;
import com.kxs.store.api.vo.kxsapp.userAdvance.AdvanceDevModalVO;
import com.kxs.store.api.vo.kxsapp.userAdvance.UserAdvanceListVO;

import java.util.List;

/**
 * 客小爽预发机表(KxsMachineAdvance)表服务接口
 *
 * @author 系统
 * @since 2024-01-08 09:46:02
 */
public interface KxsMachineAdvanceService extends IService<KxsMachineAdvance> {

    /**
     * app 仓库预发机分页列表
     *
     * @param page        页
     * @param warehouseId 仓库 ID
     * @param brandId
     * @return {@link IPage}<{@link StoreAdvanceMachineVO}>
     */
    IPage<StoreAdvanceMachineVO> getByPage(Page<StoreAdvanceMachineVO> page, Integer warehouseId, Integer brandId);

    /**
     * 用户所有的小分仓列表
     *
     * @param page 页
     * @return {@link IPage}<{@link UserWarehouseListVO}>
     */
    IPage<UserWarehouseListVO> getUserWareHouseList(Page<UserWarehouseListVO> page, String keyword);

    /**
     * 撤回机具
     *
     * @param advance 进展
     * @return {@link Boolean}
     */
    R cancelAdvance(KxsMachineAdvanceInfo advance);

    /**
     * 仓库预发机到小分仓
     *
     * @param param 参数
     * @return {@link R}
     */
    R addAdvanceMachine(StoreAdvanceAddAdvanceDTO param);

    /**
     * 接收预发机弹窗
     *
     * @return {@link AdvanceDevModalVO}
     */
    List<AdvanceDevModalVO> advanceDevModal();

    /**
     * 接收预发机
     *
     * @param param 参数
     * @return {@link R}
     */
    R confirmAdvanceMachine(ConfirmAdvanceMachineDTO param);

    /**
     * 用户预发机列表
     *
     * @return {@link IPage}<{@link UserAdvanceListVO}>
     */
    List<UserAdvanceListVO> advanceUserList();

    /**
     * 用户预发机最大天数
     *
     * @return {@link Integer}
     */
    Integer userPrePosModal();


    /**
     * 预发机已绑定未申请
     *
     * @return {@link List}<{@link String}>
     */
    List<String> userPrePosBindModal();


}

