package com.ssj.service.weixin.library.service;

import com.ssj.bean.weixin.libmy.domain.LibBookLocking;
import com.ssj.framework.core.common.service.BaseService;
import com.ssj.service.reading.out.BookListOutDto;
import com.ssj.service.weixin.library.dto.out.BookApplyShowOutDto;
import com.ssj.service.weixin.library.dto.out.BookDetaiOutDto;
import com.ssj.service.weixin.library.dto.out.BookHisOutDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/** 
 * @author  ZhangCaibao 
 * @version 2018年11月16日 上午11:15:49 
 * 类说明 
 */
public interface LibBookLockingService extends BaseService<LibBookLocking, String>{
    /**
     * 
    * @param type 1加入锁定库存，（自有馆调出）,2调入（从总部共享馆申请调出到所属馆）
    * @param
    * @param bookInfoId
    * @param
    * @param isbn13
    * 创建人：ZhangCaibao 
    * 2018年11月16日 上午11:25:30 
    * @void
     */
	public int addLibBookLocking(String inLibId,String outLibId,String bookInfoId,String isbn13,Integer type);
	/**
	 * 获取调阅次数
	 * @param libId
	 * @return
	 */
	public int getReadNum(String libId);
	public int getBookOutExchangeNum(String libId);
	public int getBookInExchangeNum(String libId);
	/**
	 * 锁定库存
	* @param libId
	* 创建人：ZhangCaibao 
	* 2018年11月16日 下午5:35:21 
	* @void
	 */
	public void updateLibBookLockingAndLibId(String libId);

	public void updateDataStat(String libId, int type,String batchId);

	public void updateDataStat2(String libId, int type,String batchId);

	public int findLastNum(String libId, String libId2);

    Page<Map<String, Object>> findBylist(Map<String, Object> params, Pageable initPage);

    Page<Map<String, Object>> findLockList(Map<String, Object> params, Pageable initPage);

    void updateDataStatByLibId(String libId, int i);

    Page<Map<String, Object>> findInfoList(Map<String, Object> params, Pageable initPage);

    Page<Map<String, Object>> findLibInfoList(Map<String, Object> params, Pageable initPage);

	Page<Map<String, Object>> findApplyInfoList(Map<String, Object> params, Pageable initPage);

    LibBookLocking findByInfoIdAndLibId(String str, String libId);

	List<LibBookLocking> findLibLockingList(String searchLibId);

    Page<BookHisOutDto> ApplyInfoList(Map<String, Object> params, Pageable pageable);

    Page<BookDetaiOutDto> ApplyInfoDetailList(Map<String, Object> params, Pageable pageable);

	Page<BookListOutDto> NewBookApplyDetailList(Map<String, Object> params, Pageable pageable);

	Page<BookHisOutDto> NewBookApplyInfoList(Map<String, Object> params, Pageable pageable);

	Page<BookHisOutDto> randomInfoList(Map<String, Object> params, Pageable pageable);

	Page<BookDetaiOutDto> randomDetailList(Map<String, Object> params, Pageable pageable);

    Page<BookApplyShowOutDto> userApplyList(Map<String, Object> params, Pageable pageable);
}
