package com.gk.hotwork.doublePrevention.repository; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.gk.hotwork.doublePrevention.entity.PreventDangerCheckTask; import com.gk.hotwork.doublePrevention.entity.PreventDangerCheckTaskRectifyDO; import com.gk.hotwork.doublePrevention.entity.dto.req.PreventDangerCheckTaskQueryReqDTO; import com.gk.hotwork.doublePrevention.entity.dto.req.PreventHandReportConfigReqDTO; import com.gk.hotwork.doublePrevention.repository.param.HandlerReportParam; import com.gk.hotwork.doublePrevention.repository.param.PreventDangerCheckTaskUpdateParams; import com.gk.hotwork.doublePrevention.repository.param.PreventDeleteParams; import com.gk.hotwork.doublePrevention.repository.param.PreventTaskToUserParams; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.time.LocalDateTime; import java.util.Date; import java.util.Date; import java.util.List; import java.util.Map; @Repository public interface PreventDangerCheckTaskRepository extends BaseMapper { /** * 隐患排查任务-分页查询 */ IPage getTaskPage(@Param("page") Page page,@Param("taskQueryReqDTO") PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO); /** * 隐患排查任务-分页查询-手机端使用 */ IPage getTaskPageForMobile(@Param("page") Page page,@Param("taskQueryReqDTO") PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO); /** * 隐患排查任务-修改 */ int updateTask(PreventDangerCheckTaskUpdateParams updateParams); /** * 隐患排查任务-删除 */ int deleteTask(PreventDeleteParams deleteParams); /** * 隐患排查任务-通过id查询信息 */ PreventDangerCheckTask getTaskById(Long checkTaskId); /** * 隐患排查任务-通过taskCode查询信息 */ PreventDangerCheckTask getTaskByCode(Long taskCode); /** * 隐患排查任务-通过id修改任务状态 */ int updateTaskStatus(@Param("taskId") Long taskId,@Param("taskStatus") Byte taskStatus); /** * 设置任务为超时 * */ int resetTaskStatus(Long taskId); /** * 隐患排查任务-通过作业id查询 */ List getTaskByCheckWorkId(Long checkWorkId); /** * 排查任务-手工上报-配置 */ int updateCheckTaskReport(PreventHandReportConfigReqDTO preventHandReportConfigReqDTO); /** * 排查任务-上报数据 */ List listReportTask(); /** * 排查任务-上报数据状态变更 */ int updateTaskReportStatus(HandlerReportParam handlerReportParam); /** * 排查任务-认领任务 */ int taskToUser(PreventTaskToUserParams taskToUserParams); List selectInspectorsStatistics(@Param("depId") Long depId,@Param("list") List list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); List selectInspectionCompleted(@Param("depId") Long depId,@Param("status") Byte status,@Param("list") List list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); /** * 排查任务-检查是否已经创建 */ PreventDangerCheckTask getTaskByCheckWorkIdAndStartTime(@Param("workId") Long workId,@Param("checkTime") Date checkTime); /** * 排查任务-查询应该已经过期,但是还在执行中状态的任务 */ List listOverTask(@Param("startTime") Date startTime,@Param("endTime") Date endTime); /** * 排查任务-查询应该已经开始,但是还在待执行状态的任务 */ List listWaitExecTask(Date endTime); /**查询应该已经结束,但是还在执行中状态的任务*/ List listTimeOutTask(Date endTime); List selectInspectionTask(@Param("depId") Long depId,@Param("list") List list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); List selectInspectionClaimedTask(@Param("depId") Long depId,@Param("list") List list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); List selectInspectionCompletedTask(@Param("depId") Long depId,@Param("list") List list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); List selectInspectionUnCompletedTask(@Param("depId") Long depId,@Param("list") List list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime); List selectPreventDangerPage(@Param("page") Page page, @Param("query") Map params); Map selectRectifyNum(); }