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(@Param("page") Page<Object> page,@Param("taskQueryReqDTO") PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO);
|
/**
|
* 隐患排查任务-分页查询-手机端使用
|
*/
|
IPage<PreventDangerCheckTask> getTaskPageForMobile(@Param("page") Page<Object> 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<PreventDangerCheckTask> getTaskByCheckWorkId(Long checkWorkId);
|
/**
|
* 排查任务-手工上报-配置
|
*/
|
int updateCheckTaskReport(PreventHandReportConfigReqDTO preventHandReportConfigReqDTO);
|
|
|
|
|
|
|
|
/**
|
* 排查任务-上报数据
|
*/
|
List<PreventDangerCheckTask> listReportTask();
|
/**
|
* 排查任务-上报数据状态变更
|
*/
|
int updateTaskReportStatus(HandlerReportParam handlerReportParam);
|
/**
|
* 排查任务-认领任务
|
*/
|
int taskToUser(PreventTaskToUserParams taskToUserParams);
|
|
List<Map> selectInspectorsStatistics(@Param("depId") Long depId,@Param("list") List<String> list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
|
|
List<Map> selectInspectionCompleted(@Param("depId") Long depId,@Param("status") Byte status,@Param("list") List<String> list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
|
/**
|
* 排查任务-检查是否已经创建
|
*/
|
PreventDangerCheckTask getTaskByCheckWorkIdAndStartTime(@Param("workId") Long workId,@Param("checkTime") Date checkTime);
|
/**
|
* 排查任务-查询应该已经过期,但是还在执行中状态的任务
|
*/
|
List<PreventDangerCheckTask> listOverTask(@Param("startTime") Date startTime,@Param("endTime") Date endTime);
|
/**
|
* 排查任务-查询应该已经开始,但是还在待执行状态的任务
|
*/
|
List<PreventDangerCheckTask> listWaitExecTask(Date endTime);
|
/**查询应该已经结束,但是还在执行中状态的任务*/
|
List<PreventDangerCheckTask> listTimeOutTask(Date endTime);
|
|
List<Map> selectInspectionTask(@Param("depId") Long depId,@Param("list") List<String> list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
|
|
List<Map> selectInspectionClaimedTask(@Param("depId") Long depId,@Param("list") List<String> list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
|
|
List<Map> selectInspectionCompletedTask(@Param("depId") Long depId,@Param("list") List<String> list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
|
|
List<Map> selectInspectionUnCompletedTask(@Param("depId") Long depId,@Param("list") List<String> list,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
|
|
List<PreventDangerCheckTaskRectifyDO> selectPreventDangerPage(@Param("page") Page<PreventDangerCheckTaskRectifyDO> page, @Param("query") Map<String, Object> params);
|
|
Map<String, Integer> selectRectifyNum();
|
|
|
}
|