From 5334a4a5d54f2d826bbf248fc05c8fc8e612b677 Mon Sep 17 00:00:00 2001 From: 16639036659 <577530412@qq.com> Date: 星期一, 31 十月 2022 09:21:32 +0800 Subject: [PATCH] 隐患数据上报功能测试成功 --- src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskUnitUuidServiceImpl.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskUnitUuidServiceImpl.java b/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskUnitUuidServiceImpl.java index 5f999a2..8aa2b8b 100644 --- a/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskUnitUuidServiceImpl.java +++ b/src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskUnitUuidServiceImpl.java @@ -2,10 +2,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.doublePrevention.entity.PreventRiskUnitUuid; +import com.ruoyi.doublePrevention.enums.E; +import com.ruoyi.doublePrevention.exception.AusinessException; import com.ruoyi.doublePrevention.repository.PreventRiskUnitUuidRepository; +import com.ruoyi.doublePrevention.repository.param.HandlerReportParam; import com.ruoyi.doublePrevention.service.baseService.PreventRiskUnitUuidService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; + +import java.util.List; @Service("PreventRiskUnitUuidService") public class PreventRiskUnitUuidServiceImpl implements PreventRiskUnitUuidService { @@ -40,4 +45,24 @@ public int deleteRiskUnit(String[] riskListIds) { return preventRiskUnitUuidRepository.deleteRiskUnit(riskListIds); } + + + /** + * 检索需要上报的数据 + */ + @Override + public List<PreventRiskUnitUuid> listRiskAnaUnit() { + return preventRiskUnitUuidRepository.listRiskAnaUnit(); + } + /** + * 修改已经被检索读取完成数据的状态 + */ + @Override + public int updateReportStatus(HandlerReportParam handlerReportParam) { + int result = preventRiskUnitUuidRepository.updateReportStatus(handlerReportParam); + if (result < 1){ + throw new AusinessException(E.UPDATE_FAIL.getCode(), "安全风险分析单元-更新上报状态失败"); + } + return result; + } } -- Gitblit v1.9.2