package com.shkj.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shkj.common.core.domain.Result;
import com.shkj.common.core.domain.entity.BaseBranch;
import com.shkj.common.core.page.BaseBranchResultVo;
import com.shkj.common.core.page.BaseBranchVo;

import java.util.List;

/**
 * 仓库信息Service接口
 *
 * @author lch
 * @date 2022-03-26
 */
public interface IBaseBranchService extends IService<BaseBranch> {


    /**
     * 分页列表
     *
     * @param branch
     * @return
     */
    List<BaseBranchResultVo> queryList(BaseBranch branch);


    /**
     * 全部
     *
     * @return
     */
    Result<List<BaseBranch>> selectBranchAll();

    /**
     * 删除
     *
     * @param branchIds
     * @return
     */
    Result deleteBranchByIds(Long[] branchIds);

    /**
     * 更新
     *
     * @param branch
     * @return
     */
    Result updateBranch(BaseBranch branch);

    /**
     * 新增
     *
     * @param branch
     * @return
     */
    Result insertBranch(BaseBranch branch);

    /**
     * 根据id查询
     *
     * @param branchId
     * @return
     */
    Result<BaseBranch> selectBranchById(Long branchId);


    /**
     * 登陆时根据输入的用户名获取仓库选择框列表
     *
     * @param userName
     * @return
     */
    Result<BaseBranchVo> optionBranchByUserName(String userName);

    Result<Boolean> switchStatus(Long id, String status);

    Result<BaseBranchVo> pdaOptionBranchByUserName(String userName);
}
