| | |
| | | package com.ruoyi.doublePrevention.service.baseService.impl;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.ruoyi.doublePrevention.entity.PreventRiskUnitUuid;
|
| | | import com.ruoyi.doublePrevention.repository.PreventRiskUnitUuidRepository;
|
| | | import com.ruoyi.doublePrevention.service.baseService.PreventRiskUnitUuidService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | @Service("PreventRiskUnitUuidService")
|
| | | public class PreventRiskUnitUuidServiceImpl implements PreventRiskUnitUuidService {
|
| | |
|
| | | @Autowired
|
| | | private PreventRiskUnitUuidRepository preventRiskUnitUuidRepository;
|
| | | /**
|
| | | * 为设施设备清单附属表添加uuid
|
| | | * */
|
| | | @Override
|
| | | public int insertRiskUnitUuid(PreventRiskUnitUuid riskUnitUuid) {
|
| | | return preventRiskUnitUuidRepository.insertUuid(riskUnitUuid);
|
| | | }
|
| | | /**
|
| | | * 通过id获取uuid
|
| | | * */
|
| | | @Override
|
| | | public PreventRiskUnitUuid getRiskUnitUuidById(Long id) {
|
| | | return preventRiskUnitUuidRepository.getRiskUnitUuidById(id);
|
| | | }
|
| | | /**
|
| | | * 修改
|
| | | * */
|
| | | @Override
|
| | | public int updateRiskUnitUuid(PreventRiskUnitUuid riskUnitUuid) {
|
| | | return preventRiskUnitUuidRepository.updateRiskUnitUuid(riskUnitUuid);
|
| | | }
|
| | | /**
|
| | | * 删除附属表信息
|
| | | */
|
| | | @Override
|
| | | public int deleteRiskUnit(String[] riskListIds) {
|
| | | return preventRiskUnitUuidRepository.deleteRiskUnit(riskListIds);
|
| | | }
|
| | | }
|
| | | package com.ruoyi.doublePrevention.service.baseService.impl; |
| | | |
| | | 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 { |
| | | |
| | | @Autowired |
| | | private PreventRiskUnitUuidRepository preventRiskUnitUuidRepository; |
| | | /** |
| | | * 为设施设备清单附属表添加uuid |
| | | * */ |
| | | @Override |
| | | public int insertRiskUnitUuid(PreventRiskUnitUuid riskUnitUuid) { |
| | | return preventRiskUnitUuidRepository.insertUuid(riskUnitUuid); |
| | | } |
| | | /** |
| | | * 通过id获取uuid |
| | | * */ |
| | | @Override |
| | | public PreventRiskUnitUuid getRiskUnitUuidById(Long id) { |
| | | return preventRiskUnitUuidRepository.getRiskUnitUuidById(id); |
| | | } |
| | | /** |
| | | * 修改 |
| | | * */ |
| | | @Override |
| | | public int updateRiskUnitUuid(PreventRiskUnitUuid riskUnitUuid) { |
| | | return preventRiskUnitUuidRepository.updateRiskUnitUuid(riskUnitUuid); |
| | | } |
| | | /** |
| | | * 删除附属表信息 |
| | | */ |
| | | @Override |
| | | 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; |
| | | } |
| | | |
| | | @Override |
| | | public PreventRiskUnitUuid getRiskUnitUuidByUnitId(Long riskUnitId) { |
| | | return preventRiskUnitUuidRepository.getRiskUnitUuidByUnitId(riskUnitId); |
| | | } |
| | | |
| | | |
| | | } |