双重预防项目-国泰新华二开定制版
16639036659
2022-10-31 5334a4a5d54f2d826bbf248fc05c8fc8e612b677
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
package com.ruoyi.doublePrevention.service.baseService.impl;
 
import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo;
import com.ruoyi.doublePrevention.entity.dto.DataCountDangerResultRespDO;
import com.ruoyi.doublePrevention.repository.PreventRiskDangerInfoRepository;
import com.ruoyi.doublePrevention.repository.param.DataCountStartAndEndTimeParams;
import com.ruoyi.doublePrevention.repository.param.HandlerReportParam;
import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.Date;
import java.util.List;
 
@Service("PreventRiskDangerInfoService")
public class PreventRiskDangerInfoServiceImpl implements PreventRiskDangerInfoService {
 
    @Autowired
    private PreventRiskDangerInfoRepository preventRiskDangerInfoRepository;
 
    /**
     * 新增隐患上报
     * */
    @Override
    public int insertDangerInfo(PreventRiskDangerInfo dangerInfo) {
        return preventRiskDangerInfoRepository.insertDangerInfo(dangerInfo);
    }
 
    /**
     * 修改隐患上报
     * */
    @Override
    public int updateDangerInfo(PreventRiskDangerInfo dangerInfo) {
        return preventRiskDangerInfoRepository.updateDangerInfo(dangerInfo);
    }
 
    /**
     * 删除隐患上报
     */
    @Override
    public int deleteDangerInfo(Long id) {
        return preventRiskDangerInfoRepository.deleteDangerInfo(id);
    }
 
    /**
     * 修改隐患整改状态
     */
    @Override
    public int updateDangerInfoState(PreventRiskDangerInfo dangerInfo) {
        return preventRiskDangerInfoRepository.updateDangerInfoState(dangerInfo);
    }
 
 
    /**
     * @description 统计时间段内所有、死亡、重伤、轻伤的隐患数量
     */
    @Override
    public DataCountDangerResultRespDO listDangerResultCountByTime(Date startTime, Date endTime, List<Long> depIds) {
        return preventRiskDangerInfoRepository.listDangerResultCountByTime(startTime,endTime,depIds);
    }
 
    /**
     * 搜索需要上报的隐患
     */
    @Override
    public List<PreventRiskDangerInfo> listReportDanger() {
        return preventRiskDangerInfoRepository.listReportDanger();
    }
    /**
     * 修改上报的数据的姿态
     */
    @Override
    public PreventRiskDangerInfo updateDangerInfoReportStatus(HandlerReportParam handlerReportParam) {
        return preventRiskDangerInfoRepository.updateDangerInfoReportStatus(handlerReportParam);
    }
}