From 247a4a1f10f233c89a4bd054dee3cb9b7d4a76f1 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期三, 19 十一月 2025 08:40:12 +0800
Subject: [PATCH] 新增数据上传准东
---
src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java | 126 +++++++++++++++++++++++++++++------------
1 files changed, 88 insertions(+), 38 deletions(-)
diff --git a/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java b/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java
index d0a54da..c87a2de 100644
--- a/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java
+++ b/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java
@@ -1,38 +1,88 @@
-package com.ruoyi.doublePrevention.service.baseService.impl;
-
-import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo;
-import com.ruoyi.doublePrevention.repository.PreventRiskDangerInfoRepository;
-import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerInfoService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@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);
- }
-}
+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);
+ }
+ /**
+ * 查询隐患附属表信息
+ */
+ @Override
+ public PreventRiskDangerInfo getByHiddenDangerId(Long id) {
+ return preventRiskDangerInfoRepository.getByHiddenDangerId(id);
+ }
+
+ @Override
+ public PreventRiskDangerInfo getDangerInfoByDangerCheckPointId(Long checkId) {
+ return preventRiskDangerInfoRepository.getByHiddenDangerId(checkId);
+ }
+
+ /**
+ * @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);
+ }
+
+}
--
Gitblit v1.9.2