package com.yonyou.hrcloud.attentrpt.dao;
import com.yonyou.hrcloud.adder.ext.annotation.MBDao;
import com.yonyou.hrcloud.adder.model.query.Condition;
import com.yonyou.hrcloud.attentrpt.model.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.util.List;

/**
 * Created by wenbinc on 2017/9/6.
 */
@MBDao
public interface IAttendRptDao {

  /**
   * 批量插入日报数据
   *
   * @param colnums - 列
   * @param values  - 值
   */
  void batchInsert4Day(@Param("colnums") String colnums, @Param("values") List values);

  /**
   * 批量插入月报数据
   *
   * @param colnums - 列
   * @param values  - 值
   */
  void batchInsert4Mon(@Param("colnums") String colnums, @Param("values") List values);

    /**
     * 批量插入显示列表数据
     *
     * @param list
     */
    void batchViewInsertRptVOs(List<AttendVieworderRptVO> list);
    /**
     * 删除示列表数据
     *
     * @param
     */
    void batchViewDelRptBByPid(@Param("condition") Condition condition);
    //获取考勤项目的显示列表
    List<AttendVieworderRptVO> queryVieworderList(@Param("condition") Condition cond, @Param("sort") Sort sort);
    //获取考勤数据列表
    //获取日报总数
//    int queryTsdayStatNum(@Param("condition") Condition condition, @Param("pagetable") Pageable pagetable);
    int queryTsdayStatNum(@Param("condition") Condition condition);
    //日报
    Page<AttendDayRptVO> queryTsdaystatList(@Param("condition") Condition condition, @Param("pagetable") Pageable pagetable, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);
  //获取月报总数
//    int queryTsMonthStatNum(@Param("condition") Condition cond, @Param("pagetable") Pageable pagetable);
    int queryTsMonthStatNum(@Param("condition") Condition cond);
    //月报
    Page<AttendMonthRptVO> queryTsmonthstatList(@Param("condition") Condition cond, @Param("pagetable") Pageable pagetable, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);
    //查询月报子表数据
//    List<AttendRptBVO> queryAttendMonthRptSubList(@Param("condition") Condition cond, @Param("pagetable") Pageable pagetable);
    List<AttendRptBVO> queryAttendMonthRptSubList(@Param("condition") Condition cond);
    //查询日报子表数据
    List<AttendRptBVO> queryAttendDayRptSubList(@Param("condition") Condition cond, @Param("pagetable") Pageable pagetable);
    List<AttendRptBVO> queryAttendDayRptSubList(@Param("condition") Condition cond);
    //日报
    List<AttendDayRptVO> queryTsAlldaystatList(@Param("condition") Condition cond, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);
    //月报
    List<AttendMonthRptVO> queryTsAllmonthstatList(@Param("condition") Condition cond, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);
    //日报
    List<AttendDayRptVO> queryTsSumdaystatList(@Param("condition") Condition cond, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);
    //日报
    Page<AttendDayRptVO> queryTsPagedaystatListForDwork(@Param("condition") Condition condition, @Param("pagetable") Pageable pagetable, @Param("sort") Sort sort);
    //月报
    Page<AttendMonthRptVO> queryTsPagemonthstatListForDwork(@Param("condition") Condition cond, @Param("pagetable") Pageable pagetable, @Param("sort") Sort sort);
    //日报
    List<AttendDayRptVO> queryTsAlldaystatListForDwork(@Param("condition") Condition condition,@Param("sort") Sort sort);
    //月报
    List<AttendMonthRptVO> queryTsAllmonthstatListForDwork(@Param("condition") Condition cond, @Param("sort") Sort sort);

    //获取考勤数据子表
    List<AttendRptBVO> queryAttendRptbList(@Param("repor_type") Integer repor_type, @Param("attcond") Condition attcond, @Param("childcond") Condition childcond);
    //获取考勤数据
    List<AttendDayRptVO> querydayByCondition(@Param("condition") Condition cond, @Param("sort") Sort sort);
    List<AttendMonthRptVO> querymonthByCondition(@Param("condition") Condition cond, @Param("sort") Sort sort);
    //region 审核和弃审
    void updateAttendAproveStatusRptVO(@Param("condition") Condition con, @Param("isapprove") boolean isapprove);
    void AuditMonthRpt(@Param("condition") Condition con, @Param("isapprove") String isapprove);
    void AuditDayRpt(@Param("condition") Condition con, @Param("isapprove") String isapprove);
    //endregion
    List<AttendanceDayRptVO> queryAttendanceForDept(@Param("condition") Condition cond);
    List<AttendanceDayRptVO> queryAttendanceCTForDept(@Param("condition") Condition cond);
    
    List<AttendMonthRptVO> querymonthByNoTenantid(@Param("condition") Condition cond, @Param("sort") Sort sort);

    List<AttendMonthRptVO> querymonthDiligenceByCondition(@Param("condition") Condition cond, @Param("sort") Sort sort);
    Page<AttendMonthRptVO> querymonthDiligenceByCondition(@Param("condition") Condition cond, @Param("sort") Sort sort,Pageable pageable);
    //更新出勤状态
    void updateAttendStatusRptVO(AttendDayRptVO attendDayRptVO);
    List<AttendRptBNCVO> queryAttendRptBNCVO(@Param("condition") Condition cond, @Param("sort") Sort sort);

    Page<AttendMonthRptVO> queryMonthStatOnly(@Param("condition") Condition cond, @Param("pagetable") Pageable pagetable, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);

    Page<AttendDayRptVO> queryTsdaystatList_temp(@Param("condition") Condition condition, @Param("pagetable") Pageable pagetable, @Param("baseColumns") String baseColumns, @Param("sort") Sort sort);

    List<AttendRptBTempVO> queryAttendDayRptSubList_temp(@Param("condition") Condition cond);

    int queryTsdayStatNum_temp(@Param("condition") Condition condition);


}
