package org.jeecg.modules.projectManagement.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.projectManagement.entity.FdProjectFile;
import org.jeecg.modules.projectManagement.entity.FdWorkingHours;
import org.jeecg.modules.projectManagement.entity.FdWorkingHoursItems;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Description: 工时记录明细
 * @author： jeecg-boot
 * @date：   2019-06-25
 * @version： V1.0
 */
public interface IFdWorkingHoursItemsService extends IService<FdWorkingHoursItems> {
    FdWorkingHoursItems queryByContractId(String contractId);

    FdWorkingHoursItems queryBySpecialType();

    IPage<FdWorkingHoursItems> findByPage(Page<FdWorkingHoursItems> page, QueryWrapper<FdWorkingHoursItems> queryWrapper);

    List<FdWorkingHoursItems> getWorkingReport(String startDate,String endDate,List<String> departs);

    List<FdWorkingHoursItems> getWorkingReportPersonnel(String startDate,String endDate,List<String> personnelCodes);

    List<FdProjectFile> getContractList(FdProjectFile fdProjectFile);

    public List<FdWorkingHoursItems> abnormalHoursReport(String startDate,String endDate,String roleId);

    /**
     * 根据条件导出工时需要的数据（主子表联结）
     * @param fdWorkingHoursItems
     * @return
     */
    List<FdWorkingHoursItems>  getWorkingItemsExport(FdWorkingHoursItems fdWorkingHoursItems);


    /**
    * @Author chenchuang
    * @Description //TODO 统计人员总工时按月
    * @Date 2020/6/3 14:22
    * @Param [fdWorkingHoursItems]
    * @return java.util.List<org.jeecg.modules.projectManagement.entity.FdWorkingHoursItems>
    */
    FdWorkingHours getDateExport(FdWorkingHoursItems fdWorkingHoursItems);

    /**
    * @Author chenchuang
    * @Description //TODO 统计人员工时按天
    * @Date 2020/6/12 13:12
    * @Param [fdWorkingHoursItems]
    * @return org.jeecg.modules.projectManagement.entity.FdWorkingHours
    */
    FdWorkingHours getDayDateExport(FdWorkingHoursItems fdWorkingHoursItems);

    /**
    * @Author chenchuang
    * @Description //TODO 工时查看分页查询
    * @Date 2020/7/23 14:00
    * @Param [page, queryWrapper]
    * @return com.baomidou.mybatisplus.core.metadata.IPage<org.jeecg.modules.projectManagement.entity.FdWorkingHoursItems>
    */
    IPage<FdWorkingHoursItems> getViewPage(Page<FdWorkingHoursItems> page,QueryWrapper<FdWorkingHoursItems> queryWrapper);
}
