郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
package com.gkhy.safePlatform.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.gkhy.safePlatform.doublePrevention.entity.PreventRiskControlMeasure;
import com.gkhy.safePlatform.doublePrevention.entity.dto.req.PreventHandReportConfigReqDTO;
import com.gkhy.safePlatform.doublePrevention.entity.dto.req.PreventRiskControlMeasureDeleteReqDTO;
import com.gkhy.safePlatform.doublePrevention.repository.param.HandlerReportParam;
import com.gkhy.safePlatform.doublePrevention.repository.param.PreventRiskControlMeasureDeleteParams;
import com.gkhy.safePlatform.doublePrevention.repository.param.PreventRiskControlMeasureQueryParams;
import com.gkhy.safePlatform.doublePrevention.repository.param.PreventRiskControlMeasureUpdateParams;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
 
import java.util.List;
 
@Repository
public interface PreventRiskControlMeasureRepository extends BaseMapper<PreventRiskControlMeasure> {
 
    /**
     * 管控措施-分页查询
     */
    IPage<PreventRiskControlMeasure> getRiskControlMeasurePage(@Param("page")Page<Object> page, @Param("queryParams")PreventRiskControlMeasureQueryParams queryParams);
 
    /**
     * 管控措施-根据RiskEventId查询
     */
    List<PreventRiskControlMeasure> getRiskControlMeasureByRiskEventId(Long riskEventId);
    /**
     * 管控措施-根据riskEventId与编码查询
     */
    PreventRiskControlMeasure getRiskControlMeasureByCodeAndEventId(Long riskEventId, String controlMeasureCode);
    /**
     * 管控措施-修改
     */
    int updateRiskControlMeasure(PreventRiskControlMeasureUpdateParams updateParams);
    /**
     * 管控措施-删除
     */
    int deleteRiskControlMeasure(PreventRiskControlMeasureDeleteParams deleteParams);
    /**
     * 任务单元、任务关联修改
     * 管控措施-修改管控措施By measureCode UnitId
     */
    int updateControlMeasureByCodeAndUnitId(String measureCode, Long taskUnitId);
    /**
     * 任务单元、任务关联修改
     * 管控措施-修改管控措施 UnitId
     */
    int updateControlMeasureByUnitId(Long unitId);
    /**
     * 管控措施-根据measureCode查询
     */
    PreventRiskControlMeasure getControlMeasureByCode(String measureCode);
    /**
     * 管控措施-根据measureCode
     * 修改关联checkWorkId
     */
    PreventRiskControlMeasure updateWorkIdByMeasureCode(String controlMeasureCode, Long checkWorkId);
    /**
     * 管控措施-根据WorkId查询
     */
    List<PreventRiskControlMeasure> getControlMeasureByWorkId(Long workId);
    /**
     * 管控措施-根据单元id查找对应措施id列表
     */
    List<PreventRiskControlMeasure> getListByUnitId(Long taskUnitId);
    /**
     * 管控措施-根据measureCode修改关联的任务taskId
     */
    void updateTaskIdByMeasureCode(Long measureId, Long taskId);
    /**
     * 管控措施-先重置关联管控措施的workId
     */
    int deleteTaskIdByMeasureCode(String measureCode);
 
    /**
     * 管控措施-根据measureId修改关联的任务taskId
     */
    int updateControlMeasureByMeasureIdAndUnitId(Long measureId, Long taskUnitId);
    /**
     * 安全风险事件-手工上报-配置
     */
    int updateRiskEventReport(PreventHandReportConfigReqDTO preventHandReportConfigReqDTO);
    /**
     * 管控措施-根据id查询
     */
    PreventRiskControlMeasure selectByMeasureId(Long id);
 
 
    /**
     * 措施-手工上报-配置
     */
    List<PreventRiskControlMeasure> listReportMeasure();
    /**
     * 管控措施- 管控措施列表
     */
    List<PreventRiskControlMeasure> listControlMeasure();
 
 
    /**
     * 管控措施- 管控措施UUid
     */
    PreventRiskControlMeasure getControlMeasureByUuid(String measureUuid);
    /**
     * 管控措施- 上报状态更新
     */
    int updateMeasureReportStatus(HandlerReportParam handlerReportParam);
}