package com.usky.iot.service;

import com.aliyuncs.exceptions.ClientException;
import com.usky.iot.domain.PmWorkContent;
import com.usky.iot.domain.PmWorkReport;
import com.usky.common.mybatis.core.CrudService;
import com.usky.iot.service.vo.PmProjectTotalWorkTimeVo;

import java.time.LocalDateTime;
import java.time.temporal.TemporalAccessor;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 工作报告表 服务类
 * </p>
 *
 * @author fu
 * @since 2024-05-20
 */
public interface PmWorkReportService extends CrudService<PmWorkReport> {

    /**
     * 获取时间内工作报告
     * @param startDate 开始时间
     * @param endDate 结束时间
     * @param reportId 报告id
     * @return
     */
    List<Map<String, List<PmWorkReport>>> weekWork(String startDate, String endDate, Integer reportId);

    /**
     * 新增、编辑工作报告
     * @param pmWorkReport 工作报告
     */
    void addReport(PmWorkReport pmWorkReport);

    /**
     * 工时计算
     * @return
     */
    PmProjectTotalWorkTimeVo countTime(Integer nowYear, Integer dateType, Integer dateNum);

    /**
     * 定时发送
     */
    void timedSending(LocalDateTime time);

    /**
     * 删除报告
     * @param reportId 报告id
     */
    void deleteContent(Integer reportId);

    /**
     * 定时报告查询
     * @return
     */
    List<PmWorkReport> timedReportQuery();

    /**
     * 报告提交定时提醒
     */
    void reportSubmissionReminder();
}
