package com.zcloud.safetyDutyList.persistence.repository.tasklist;

import com.alibaba.cola.dto.PageResponse;
import com.jjb.saas.framework.repository.repo.BaseRepository;
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.TaskListIssueDO;

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

public interface TaskListIssueRepository extends BaseRepository<TaskListIssueDO> {

    PageResponse<TaskListIssueDO> listPage(Map<String, Object> params, String menuPath);

    PageResponse<TaskListIssueDO> listPage(Map<String, Object> params);

    TaskListIssueDO getByTaskIssueId(String taskIssueId);

    List<TaskListIssueDO> listByTaskListId(String taskListId);

    List<TaskListIssueDO> listByIssueInfo(String taskListId, Long executeCorpId, Long executeDepartmentId, Long executeUserId,
                                           java.time.LocalDateTime periodStartTime, java.time.LocalDateTime periodEndTime);

    List<TaskListIssueDO> listExpiredInProgress();

    List<TaskListIssueDO> listIssuedWithPeriod();

    /**
     * 统计执行者为指定用户的下发记录数量
     *
     * @param executeUserId 执行用户ID
     * @return 数量
     */
    long countByExecuteUserId(Long executeUserId);
}
