package com.tax.file.mapper;

import com.tax.file.model.TkFile;
import com.tax.file.model.TkFileExample;
import com.tax.file.model.TkTaxUser;
import com.yxcheng.token.common.service.BaseMapper;
import org.apache.ibatis.annotations.Param;

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



public interface TkFileMapper extends BaseMapper<TkFileExample,TkFile> {
	
	/**
		* 分页查询
		*
		* @param map
		* @return
    */
	List<TkFile> getTkFilePage(Map map);
	
	/**
		* EXCEL解析-分页查询
		*
		* @return
	*/
	List<TkFile> excelQueryPage();
	
	
	/**
		* 批量更新
		*
		* @param tkFiles
		* @return
    */
	int updateTasknoBatch(List<TkFile> tkFiles);
	
	
	/**
		* 文件URL重置-批量更新
		*
		* @param tkFiles
		* @return
    */
	int updateFileUrlBatch(List<TkFile> tkFiles);
	
	/**
		* 批量更新
		*
		* @param tkFiles
		* @return
    */
	int updateExcelImportBatch(List<TkFile> tkFiles);
	/**
		* 根据任务编号查询file数量
		*
		* @param taskno
		* @return
    */
	int getTkFileByTaskno(String taskno);
	
	/**
		* 根据条件更新
		*
		* @param record
		* @return
    */
    int updateByExampleSelective(@Param("record") TkFile record, @Param("example") TkFileExample example);
    
    List<TkFile> fileUrlReset();

    String queryLastInvDate(TkTaxUser taxUser);

    List<TkFile> queryPastData(TkTaxUser taxUser);

	List<TkFile> queryApplyFileList(TkTaxUser taxUser);

	void updateApplyInfoByPrimaryKey(TkFile tkFile);

	List<TkFile> queryWaitDownFileList(TkTaxUser taxUser);

	List<Map<String, Object>> countWaitDownFileList(TkTaxUser taxUser);

	List<TkFile> queryResetFileList(TkTaxUser taxUser);

	List<TkFile> queryExitPastData(TkTaxUser taxUser);

	List<Map<String, Object>> countWaitApplyFileList(TkTaxUser taxUser);

	List<TkFile> queryOverMonthFileList(TkTaxUser taxUser);

}