From cad4c065afbc423c012eedef4a505dba6c80d0c6 Mon Sep 17 00:00:00 2001 From: huangzhen <867127663@qq.com> Date: 星期二, 25 四月 2023 11:08:57 +0800 Subject: [PATCH] 措施和事件增加@RequestBody --- 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