双重预防项目-国泰新华二开定制版
16639036659
2024-07-11 1f2b9020ffb33a70f77747a6712c54a86ba1e6af
src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskJobAndMeasureServiceImpl.java
@@ -1,10 +1,15 @@
package com.ruoyi.doublePrevention.service.baseService.impl;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.doublePrevention.entity.PreventRiskJobAndMeasure;
import com.ruoyi.doublePrevention.enums.ResultCodes;
import com.ruoyi.doublePrevention.repository.PreventRiskJobAndMeasureRepository;
import com.ruoyi.doublePrevention.repository.param.HandlerReportParam;
import com.ruoyi.doublePrevention.service.baseService.PreventRiskJobAndMeasureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service("PreventRiskJobAndMeasureService")
public class PreventRiskJobAndMeasureServiceImpl implements PreventRiskJobAndMeasureService {
@@ -27,6 +32,11 @@
    public PreventRiskJobAndMeasure getJobAndMeasureByJobId(Long jobId) {
        return preventRiskJobAndMeasureRepository.getJobAndMeasureByJobId(jobId);
    }
    @Override
    public List<PreventRiskJobAndMeasure> getJobAndMeasureListByJobId(Long jobId) {
        return preventRiskJobAndMeasureRepository.getJobAndMeasureListByJobId(jobId);
    }
    /**
     * 删除job管控措施的附属表关联信息
     */
@@ -35,4 +45,43 @@
        return preventRiskJobAndMeasureRepository.deleteJobAndMeasure(jobId);
    }
    /**
     * 检索需要上报的隐患排查任务
     */
    @Override
    public List<PreventRiskJobAndMeasure> listReportWork() {
        return preventRiskJobAndMeasureRepository.listReportWork();
    }
    /**
     * 根据jobId查询对应的管控措施
     */
    @Override
    public List<PreventRiskJobAndMeasure> getMeasureListByJobId(Long jobId) {
        return preventRiskJobAndMeasureRepository.getMeasureListByJobId(jobId);
    }
    /**
     * 修改上报状态
     */
    @Override
    public int updateWorkReportStatus(HandlerReportParam handlerReportParam) {
        int result = preventRiskJobAndMeasureRepository.updateWorkReportStatus(handlerReportParam);
        if (result == 0) {
            throw new BusinessException(ResultCodes.SERVER_UPDATE_ERROR.getCode());
        }
        return result;
    }
    @Override
    public List<PreventRiskJobAndMeasure> listReportWorkTest() {
        return preventRiskJobAndMeasureRepository.listReportWorkTest();
    }
    @Override
    public List<PreventRiskJobAndMeasure> getRectifyJobData(Long jobId) {
        return preventRiskJobAndMeasureRepository.getRectifyJobData(jobId);
    }
}