package com.shkj.wms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shkj.common.core.domain.Result;
import com.shkj.wms.bo.*;
import com.shkj.wms.domain.BusinStockInv;
import com.shkj.wms.vo.BusinStockInvExeVo;
import com.shkj.wms.vo.BusinStockInvVo;
import com.shkj.wms.vo.StockLocationGoodsAreaStorageVo;
import com.shkj.wms.vo.StockLocationInvVo;

import java.util.List;

/**
 * 盘点计划Service接口
 *
 * @author lch
 * @date 2022-06-10
 */
public interface IBusinStockInvService extends IService<BusinStockInv> {

    /**
     * 查询列表
     *
     * @param bo
     * @return
     */
    List<BusinStockInvVo> queryList(BusinStockInvQueryBo bo);

    List<BusinStockInv> queryStockInvList(String  orderNo);

    /**
     * 根据新增业务对象插入盘点计划
     *
     * @param bo 盘点计划新增业务对象
     * @return
     */
    Result<Boolean> insertByAddBo(BusinStockInvAddBo bo);

    Result<Boolean> insertByAddNewBo(BusinStockInvAddBo bo);


    /**
     * 取消盘点计划
     *
     * @param ids
     * @return
     */
    Result<Boolean> cancel(List<Long> ids);

    /**
     * 盘点录入保存
     *
     * @param bo
     * @return
     */
    Result<Boolean> entrySave(List<BusinStockInvEditBo> bo);


    /**
     * 差异处理列表中盘点确认
     *
     * @param ids id
     * @return {@link Result}<{@link Boolean}>
     */
    Result<Boolean> confirm(List<Long> ids);

    /**
     * 执行盘点
     * @param invOrderNo
     * @return
     */
    Result<Boolean> exec(String invOrderNo,Integer layer);

    /**
     * 取消盘点
     * @param invOrderNo
     * @return
     */
    Result<Boolean> execCancel(String invOrderNo) ;


    /**
     * 查询盘点模具
     *
     * @param bo 薄
     * @return {@link List}<{@link StockLocationGoodsAreaStorageVo}>
     */
    List<StockLocationGoodsAreaStorageVo> queryInvMold(BusinStockInvGoodsQueryBo bo);


    /**
     * 查询要盘点的托盘或者货位
     * @param bo
     * @return
     */
    List<StockLocationInvVo> queryInvLocation(BusinStockInvGoodsQueryBo bo);

    /**
     * pda查询盘点信息由托盘代码
     *
     * @param bo 薄
     * @return {@link List}<{@link BusinStockInv}>
     */
    List<BusinStockInvVo> pdaInvByContainerCode(PdaInvByContainerCodeBo bo);

    /**
     * 查询正在执行中的货位id集合
     *
     * @return {@link List}<{@link Long}>
     */
    List<Long> queryDoingLocationByInv();


    List<BusinStockInvExeVo>  getBusinStockInvList( BusinStockInvQueryBo bo);
}
