package com.qy.worksheetsystem.model.mapper;

import com.github.pagehelper.Page;
import com.qy.worksheetsystem.entity.JobBooking;
import com.qy.worksheetsystem.entity.Poject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

@Repository
public interface EmployeeReportingMapper {
    /**
     * 通过审核人获取明细信息
     *
     * @return
     */
    List<Map<String,String>> getReportDateWorkHoursByPerson(@Param("personId")String personId,@Param("reportDate")String reportDate);

    String selectKey();
    int insertBill(Map<String, String> map);

    int insertEntry(List<Map<String, String>> list);
    int deleteSheet(@Param("id")String id);

    Map<String,Object> getShrPersonInfo(String number);
    Map<String,Object> getShrAdminInfo(String fid);
    List<Map<String,Object>> getPersonWorkDetail(@Param("beginDate")String beginDate,
                                                 @Param("endDate")String endDate,
                                                 @Param("personId")String personId);
    List<Map<String,Object>> getPPWorkDetail(@Param("beginDate")String beginDate,
                                                 @Param("endDate")String endDate,
                                                 @Param("personId")String personId,
                                             @Param("orgId")String orgId);
    List<Map<String,Object>> getHourTotal(@Param("id")String id,@Param("calendarType")String calendarType);

    List<Map<String,Object>> getHourTotalAll(@Param("id")String id);
    List<Map<String,Object>> getHourTotalSum(@Param("list")List<String> list,@Param("calendarType")String calendarType);
    List<Map<String,Object>> getHourTotalSumV2(@Param("list")List<String> list,@Param("calendarType")String calendarType);
    Poject getTimeJobBooking(@Param("orgId")String orgId,@Param("personId")String personId);
    List<JobBooking> getTimeJobBookingEntry(@Param("id")String id,@Param("month")String month,
                                            @Param("state")String state,@Param("OrgID")String OrgID);

    List<Map<String,Object>> getMonthWorkSheet(@Param("number")String number,@Param("month")String month,
                                               @Param("state")String state);

    List<Map<String,String>> getMonthWorkSheetEntry(@Param("id")String id);

    List<Map<String,String>> getMonthWorkSheetEntryV2(@Param("id")String id);

    Page<Map<String,Object>> getAudited(@Param("list")List<String> list,@Param("audit")String audit,@Param("month")String month);

    List<Map<String,Object>> getAuditedV9(@Param("list")List<String> list,@Param("pidList")List<String> pidList,@Param("audit")String audit);

    List<Map<String,String>> getOrgAndJobBookId(@Param("list")List<String> list,@Param("audit")String audit,@Param("month")String month);

    Map<String,Object> getWorkSheetById(@Param("id")String id);

    Map<String,Object> getJobDayByPerson(@Param("number")String number,@Param("orgid")String orgid,@Param("stratDate")String stratDate,
                                         @Param("endDate")String endDate,@Param("attID")String attID,
                                    @Param("status")String status);

    Page<JobBooking> getEmpAuditedV2(@Param("personId")String personId,@Param("audit")String audit,@Param("month")String month);

    List<Map<String,Object>> getEmpAuditedV2Entry(@Param("timeSheetId")String timeSheetId);
    Page<JobBooking> getEmpAudited(@Param("personId")String personId,@Param("audit")String audit,@Param("month")String month);
    List<Map<String,Object>> getEmpList(@Param("list")List<String> list,@Param("audit")String audit,@Param("month")String month);

}
