郑永安
2023-09-19 69185134fcfaf913ea45f1255677225a2cc311a4
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package com.gk.hotwork.doublePrevention.service.baseService;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
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 java.time.LocalDateTime;
import java.util.Date;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
public interface PreventDangerCheckTaskService extends IService<PreventDangerCheckTask> {
 
    /**
     * 隐患排查任务-分页查询
     */
    IPage<PreventDangerCheckTask> getTaskPage(Page<Object> objectPage, PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO);
    /**
     * 隐患排查任务-分页查询-手机端使用
     */
    IPage<PreventDangerCheckTask> getTaskPageForMobile(Page<Object> objectPage, PreventDangerCheckTaskQueryReqDTO taskQueryReqDTO);
    /**
     * 隐患排查任务-手动新增
     * ----应存在任务调度新增方式
     */
    int saveTask(PreventDangerCheckTask checkTask);
    /**
     * 隐患排查任务-修改
     */
    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();
 
    /**
     * 排查任务-上报数据状态变更
     */
    void updateTaskReportStatus(HandlerReportParam handlerReportParam);
    /**
     * 排查任务-认领任务
     */
    int taskToUser(PreventTaskToUserParams taskToUserParams);
 
 
    /**
    * @Description: 获取巡检人员统计
    */
 
    List<Map> selectInspectorsStatistics(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
 
 
    /**
    * @Description: 获取巡检完成数量
    */
 
    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);
 
    /**
    * @Description: 巡检任务统计
    */
    List<Map> selectInspectionTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
 
    /**
    * @Description: 每日已认领巡检任务统计
    */
    List<Map> selectInspectionClaimedTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
 
    /**
    * @Description: 每日已完成巡检任务统计
    */
    List<Map> selectInspectionCompletedTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
 
    /**
    * @Description: 每日未完成巡检任务统计
    */
    List<Map> selectInspectionUnCompletedTask(Long depId, List<String> list, LocalDateTime startTime, LocalDateTime endTime);
 
    /**
    * @Description: 隐患统计
    */
    List<PreventDangerCheckTaskRectifyDO> selectPreventDangerPage(Page<PreventDangerCheckTaskRectifyDO> page, Map<String, Object> params);
 
    /**
    * @Description: 各个整改数量
    */
    Map<String, Integer> selectRectifyNum();
    /**查询应该已经结束,但是还在执行中状态的任务*/
    List<PreventDangerCheckTask> listTimeOutTask(Date endTime);
}