package cn.wisenergy.service;

import cn.wisenergy.model.app.WorkTimeOrder;
import cn.wisenergy.model.dto.CreateWorkOrderDto;
import cn.wisenergy.model.dto.ExamineGroupbyProjectDto;
import cn.wisenergy.model.dto.SubtotalDto;
import cn.wisenergy.model.dto.WorkTimeOrderDto;

import java.util.Date;
import java.util.List;


/**
 *
 * @author chenqi
 * @since 2021-01-19
 */
public interface WorkTimeOrderService {

    /**
     * 获取用户本月填报和审批情况，权限为填报时只有填报情况
     * @param userId
     * @return
     */
    List<Object> getMonthlyStatistics(Integer userId);

    /**
     * 功能; 获取某日填报信息
     *
     * @param userId
     * @param workDay
     * @return
     */
    List<WorkTimeOrder> getByDay(Integer userId, Date workDay);

    /**
     * 功能：获取某日填报小计
     *
     * @param userId
     * @param workDay
     * @return
     */
    SubtotalDto getSubtotalReport(Integer userId, Date workDay);

    /**
     * 功能; 获取某日填报信息
     *
     * @param userId
     * @param workDay
     * @return DTO
     */
    List<WorkTimeOrderDto> getByDayToDto(Integer userId, Date workDay);

    /**
     * 功能：工时填报
     *
     * @param createWorkOrderDto
     * @return
     */
    List<WorkTimeOrderDto> add(CreateWorkOrderDto createWorkOrderDto);


    /**
     * 功能： 驳回重新填报
     *
     * @param createWorkOrderDto
     * @return
     */
    List<WorkTimeOrderDto> update(CreateWorkOrderDto createWorkOrderDto);


    /**
     * 功能：获取待审批数据
     *
     * @param userId
     * @return
     */
    List<ExamineGroupbyProjectDto> getExamine(Integer userId, Integer projectId, Integer type,Integer page,Integer size,Integer status);


    /**
     * 功能：批量审批
     *
     * @param ids
     * @return
     */
    Boolean examinsByIds(Integer reviewerId, List<Integer> ids);

    /**
     * 功能： 驳回
     *
     * @param id
     * @param reason
     * @return
     */
    Boolean rejectById(Integer reviewerId, Integer id, String reason);

    /**
     * 功能：查询驳回未提交的
     *
     * @param userId
     * @return
     */
    List<WorkTimeOrderDto> rejectNotSubmit(Integer userId);
}
