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<PreventDangerCheckTask> {
|
|
/**
|
* 隐患排查任务-分页查询
|
*/
|
IPage<PreventDangerCheckTask> getTaskPage(Page<Object> page, PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO);
|
/**
|
* 隐患排查任务-分页查询-手机端使用
|
*/
|
IPage<PreventDangerCheckTask> getTaskPageForMobile(Page<Object> page, PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO);
|
/**
|
* 隐患排查任务-修改
|
*/
|
int updateTask(PreventDangerCheckTaskUpdateParams updateParams);
|
/**
|
* 隐患排查任务-删除
|
*/
|
int deleteTask(PreventDeleteParams deleteParams);
|
/**
|
* 隐患排查任务-通过id查询信息
|
*/
|
PreventDangerCheckTask getTaskById(Long checkTaskId);
|
/**
|
* 隐患排查任务-通过taskCode查询信息
|
*/
|
PreventDangerCheckTask getTaskByCode(Long taskCode);
|
/**
|
* 隐患排查任务-通过id修改任务状态
|
*/
|
int updateTaskStatus(Long taskId, Byte taskStatus);
|
/**
|
* 设置任务为超时
|
* */
|
int resetTaskStatus(Long taskId);
|
/**
|
* 隐患排查任务-通过作业id查询
|
*/
|
List<PreventDangerCheckTask> getTaskByCheckWorkId(Long checkWorkId);
|
/**
|
* 排查任务-手工上报-配置
|
*/
|
int updateCheckTaskReport(PreventHandReportConfigReqDTO preventHandReportConfigReqDTO);
|
|
|
|
|
|
|
|
/**
|
* 排查任务-上报数据
|
*/
|
List<PreventDangerCheckTask> listReportTask();
|
/**
|
* 排查任务-上报数据状态变更
|
*/
|
int updateTaskReportStatus(HandlerReportParam handlerReportParam);
|
/**
|
* 排查任务-认领任务
|
*/
|
int taskToUser(PreventTaskToUserParams taskToUserParams);
|
|
List<Map> selectInspectorsStatistics(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
|
|
List<Map> selectInspectionCompleted(Long depId, Byte status, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
|
/**
|
* 排查任务-检查是否已经创建
|
*/
|
PreventDangerCheckTask getTaskByCheckWorkIdAndStartTime(Long workId, Date checkTime);
|
/**
|
* 排查任务-查询应该已经过期,但是还在执行中状态的任务
|
*/
|
List<PreventDangerCheckTask> listOverTask(Date startTime, Date endTime);
|
/**
|
* 排查任务-查询应该已经开始,但是还在待执行状态的任务
|
*/
|
List<PreventDangerCheckTask> listWaitExecTask(Date endTime);
|
/**查询应该已经结束,但是还在执行中状态的任务*/
|
List<PreventDangerCheckTask> listTimeOutTask(Date endTime);
|
|
List<Map> selectInspectionTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
|
|
List<Map> selectInspectionClaimedTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
|
|
List<Map> selectInspectionCompletedTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
|
|
List<Map> selectInspectionUnCompletedTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
|
|
List<PreventDangerCheckTaskRectifyDO> selectPreventDangerPage(Page<PreventDangerCheckTaskRectifyDO> page, @Param("query") Map<String, Object> params);
|
|
Map<String, Integer> selectRectifyNum();
|
|
|
}
|