双重预防项目-国泰新华二开定制版
heheng
2025-06-19 46c37398a52d1dcf81788960ec90faa91249e77f
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
package com.ruoyi.doublePrevention.service.baseService.impl;
 
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.doublePrevention.entity.PreventRiskJobAndMeasure;
import com.ruoyi.doublePrevention.enums.ResultCodes;
import com.ruoyi.doublePrevention.repository.PreventRiskJobAndMeasureRepository;
import com.ruoyi.doublePrevention.repository.param.HandlerReportParam;
import com.ruoyi.doublePrevention.service.baseService.PreventRiskJobAndMeasureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service("PreventRiskJobAndMeasureService")
public class PreventRiskJobAndMeasureServiceImpl implements PreventRiskJobAndMeasureService {
 
    @Autowired
    private PreventRiskJobAndMeasureRepository preventRiskJobAndMeasureRepository;
 
    /**
     * 插入管控措施与job的对应关系
     * */
    @Override
    public int insertJobAndMeasure(PreventRiskJobAndMeasure jobAndMeasure) {
        return preventRiskJobAndMeasureRepository.insertJobAndMeasure(jobAndMeasure);
    }
 
    /**
     * 查询JobAndMeasure - By JobId
     */
    @Override
    public PreventRiskJobAndMeasure getJobAndMeasureByJobId(Long jobId) {
        return preventRiskJobAndMeasureRepository.getJobAndMeasureByJobId(jobId);
    }
 
    @Override
    public List<PreventRiskJobAndMeasure> getJobAndMeasureListByJobId(Long jobId) {
        return preventRiskJobAndMeasureRepository.getJobAndMeasureListByJobId(jobId);
    }
    /**
     * 删除job管控措施的附属表关联信息
     */
    @Override
    public int deleteJobAndMeasure(Long jobId) {
        return preventRiskJobAndMeasureRepository.deleteJobAndMeasure(jobId);
    }
 
 
 
    /**
     * 检索需要上报的隐患排查任务
     */
    @Override
    public List<PreventRiskJobAndMeasure> listReportWork() {
        return preventRiskJobAndMeasureRepository.listReportWork();
    }
    /**
     * 根据jobId查询对应的管控措施
     */
    @Override
    public List<PreventRiskJobAndMeasure> getMeasureListByJobId(Long jobId) {
        return preventRiskJobAndMeasureRepository.getMeasureListByJobId(jobId);
    }
    /**
     * 修改上报状态
     */
    @Override
    public int updateWorkReportStatus(HandlerReportParam handlerReportParam) {
        int result = preventRiskJobAndMeasureRepository.updateWorkReportStatus(handlerReportParam);
        if (result == 0) {
            throw new BusinessException(ResultCodes.SERVER_UPDATE_ERROR.getCode());
        }
        return result;
    }
 
    @Override
    public List<PreventRiskJobAndMeasure> listReportWorkTest() {
        return preventRiskJobAndMeasureRepository.listReportWorkTest();
    }
 
    @Override
    public List<PreventRiskJobAndMeasure> getRectifyJobData(Long jobId) {
        return preventRiskJobAndMeasureRepository.getRectifyJobData(jobId);
    }
 
 
}