package com.jsh.erp.datasource.mappers;

import com.jsh.erp.datasource.entities.DepotHead;
import com.jsh.erp.datasource.entities.DepotHeadExample;

import java.math.BigDecimal;
import java.util.List;

import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
import com.jsh.erp.datasource.vo.DepotHeadVo4List;
import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
import org.apache.ibatis.annotations.Param;

public interface DepotHeadMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int countByExample(DepotHeadExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int deleteByExample(DepotHeadExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int insert(DepotHead record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int insertSelective(DepotHead record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    List<DepotHead> selectByExample(DepotHeadExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    DepotHead selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int updateByExampleSelective(@Param("record") DepotHead record, @Param("example") DepotHeadExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int updateByExample(@Param("record") DepotHead record, @Param("example") DepotHeadExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int updateByPrimaryKeySelective(DepotHead record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table jsh_depothead
     *
     * @mbggenerated
     */
    int updateByPrimaryKey(DepotHead record);

    List<DepotHeadVo4List> selectByConditionDepotHead(
            @Param("type") String type,
            @Param("subType") String subType,
            @Param("number") String number,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("dhIds") String dhIds,
            @Param("offset") Integer offset,
            @Param("rows") Integer rows);

    int countsByDepotHead(
            @Param("type") String type,
            @Param("subType") String subType,
            @Param("number") String number,
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("dhIds") String dhIds);

    Long getMaxId();

    String findMaterialsListByHeaderId(
            @Param("id") Long id);

    List<DepotHeadVo4InDetail> findByAll(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("type") String type,
            @Param("pid") Integer pid,
            @Param("dids") String dids,
            @Param("oId") Integer oId,
            @Param("offset") Integer offset,
            @Param("rows") Integer rows);

    int findByAllCount(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("type") String type,
            @Param("pid") Integer pid,
            @Param("dids") String dids,
            @Param("oId") Integer oId);

    List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("type") String type,
            @Param("pid") Integer pid,
            @Param("dids") String dids,
            @Param("oId") Integer oId,
            @Param("offset") Integer offset,
            @Param("rows") Integer rows);

    int findInOutMaterialCountTotal(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("type") String type,
            @Param("pid") Integer pid,
            @Param("dids") String dids,
            @Param("oId") Integer oId);

    List<DepotHeadVo4StatementAccount> findStatementAccount(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("organId") Integer organId,
            @Param("supType") String supType,
            @Param("offset") Integer offset,
            @Param("rows") Integer rows);

    int findStatementAccountCount(
            @Param("beginTime") String beginTime,
            @Param("endTime") String endTime,
            @Param("organId") Integer organId,
            @Param("supType") String supType);

    BigDecimal findAllMoney(
            @Param("supplierId") Integer supplierId,
            @Param("type") String type,
            @Param("subType") String subType,
            @Param("modeName") String modeName,
            @Param("endTime") String endTime);

    List<DepotHeadVo4List> getDetailByNumber(
            @Param("number") String number);

}