package com.goafanti.common.dao;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.ui.ModelMap;
import com.goafanti.common.model.DailySalesReport;
import com.goafanti.report.bo.CountMarketingStatisticsBo;
import com.goafanti.report.bo.DepartmentSalesReportBO;
import com.goafanti.report.bo.PersonalSalesReportBO;
import com.goafanti.report.bo.SomeTimeMarketingBo;
import com.goafanti.report.bo.marketingESBo;
import com.goafanti.report.bo.technicalDepStatisticsListBo;

public interface DailySalesReportMapper {

	DailySalesReport selectByPrimaryKey(Long id);

	List<DailySalesReport> selectAdmins();

	List<DailySalesReport> selectDailySalesReports(@Param("startTime") Date startTime, @Param("endTime") Date endTime);

	int insertBatch(List<DailySalesReport> list);

	int deleteByDate(@Param("createTime") Date createTime);

	List<PersonalSalesReportBO> selectSalesPersonalReports(@Param("startTime") Date startTime,
			@Param("endTime") Date endTime, @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize,
			@Param("orderField") String orderField, @Param("order") String order,
			@Param("countField") String countField, @Param("amountField") String amountField,
			@Param("depName") String depName, @Param("name") String name, @Param("position") String position);

	List<PersonalSalesReportBO> selectPersonalByPage(@Param("pageNo") Integer pageNo,
			@Param("pageSize") Integer pageSize, @Param("depName") String depName, @Param("name") String name,
			@Param("position") String position);

	Long selectSalesPersonalReportsCount(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
			@Param("depName") String depName, @Param("name") String name, @Param("position") String position);

	List<ModelMap> selectSalesPersonalExtraReports(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
			@Param("ids") List<String> ids);

	ModelMap selectTotalReports(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
			@Param("depName") String depName, @Param("name") String name, @Param("position") String position);

	List<DepartmentSalesReportBO> selectSalesDepartmentReports();

	List<ModelMap> selectSalesDepartmentExtraReports(@Param("startTime") Date startTime,
			@Param("endTime") Date endTime);

	List<marketingESBo> findmarketingStatisticsList(@Param("depId")String depId, @Param("dayStart")String dayStart, @Param("dayEnd")String dayEnd,
			@Param("weeklyStart")String weeklyStart, @Param("weeklyEnd")String weeklyEnd, @Param("monthStart")String monthStart, @Param("monthEnd")String monthEnd,
			@Param("yearStart")String yearStart, @Param("yearEnd")String yearEnd);
	
	List<marketingESBo> marketingDepStatisticsList(@Param("depId")String depId, @Param("dayStart")String dayStart, @Param("dayEnd")String dayEnd,
			@Param("weeklyStart")String weeklyStart, @Param("weeklyEnd")String weeklyEnd, @Param("monthStart")String monthStart, @Param("monthEnd")String monthEnd,
			@Param("yearStart")String yearStart, @Param("yearEnd")String yearEnd);

	CountMarketingStatisticsBo privateCustomersCount(@Param("depId")String depId, @Param("dayStart")String dayStart, @Param("dayEnd")String dayEnd,
			@Param("weeklyStart")String weeklyStart, @Param("weeklyEnd")String weeklyEnd, @Param("monthStart")String monthStart, @Param("monthEnd")String monthEnd,
			@Param("yearStart")String yearStart, @Param("yearEnd")String yearEnd);

	CountMarketingStatisticsBo privateCustomersDepCount(@Param("depId")String depId, @Param("dayStart")String dayStart, @Param("dayEnd")String dayEnd,
			@Param("weeklyStart")String weeklyStart, @Param("weeklyEnd")String weeklyEnd, @Param("monthStart")String monthStart, @Param("monthEnd")String monthEnd,
			@Param("yearStart")String yearStart, @Param("yearEnd")String yearEnd);

	List<SomeTimeMarketingBo> sometimeMarketingStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);

	List<SomeTimeMarketingBo> sometimeMarketingDepStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);

	SomeTimeMarketingBo countsometimeMarketingStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);

	SomeTimeMarketingBo countsometimeMarketingDepStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime);

	List<technicalDepStatisticsListBo> technicalDepStatistics(@Param("depId")String depId, @Param("startTime")String startTime, @Param("endTime")String endTime, @Param("publishStatus")String publishStatus,
			@Param("taskStatus")String taskStatus);


}