郑永安
2023-07-20 66de1a166391376d71a028c2069e90e9c509d499
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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();
 
 
}