package com.ruoyi.project.dc.incidentReport.service.impl;
|
|
import java.util.List;
|
import com.ruoyi.common.utils.DateUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import com.ruoyi.project.dc.incidentReport.mapper.IncidentReportMapper;
|
import com.ruoyi.project.dc.incidentReport.domain.IncidentReport;
|
import com.ruoyi.project.dc.incidentReport.service.IIncidentReportService;
|
import com.ruoyi.common.utils.text.Convert;
|
|
/**
|
* 事件上报Service业务层处理
|
*
|
* @author wm
|
* @date 2020-12-07
|
*/
|
@Service
|
public class IncidentReportServiceImpl implements IIncidentReportService
|
{
|
@Autowired
|
private IncidentReportMapper incidentReportMapper;
|
|
/**
|
* 查询事件上报
|
*
|
* @param incidentReportId 事件上报ID
|
* @return 事件上报
|
*/
|
@Override
|
public IncidentReport selectIncidentReportById(Long incidentReportId)
|
{
|
return incidentReportMapper.selectIncidentReportById(incidentReportId);
|
}
|
|
/**
|
* 查询事件上报列表
|
*
|
* @param incidentReport 事件上报
|
* @return 事件上报
|
*/
|
@Override
|
public List<IncidentReport> selectIncidentReportList(IncidentReport incidentReport)
|
{
|
return incidentReportMapper.selectIncidentReportList(incidentReport);
|
}
|
|
/**
|
* 新增事件上报
|
*
|
* @param incidentReport 事件上报
|
* @return 结果
|
*/
|
@Override
|
public int insertIncidentReport(IncidentReport incidentReport)
|
{
|
incidentReport.setCreateTime(DateUtils.getNowDate());
|
return incidentReportMapper.insertIncidentReport(incidentReport);
|
}
|
|
/**
|
* 修改事件上报
|
*
|
* @param incidentReport 事件上报
|
* @return 结果
|
*/
|
@Override
|
public int updateIncidentReport(IncidentReport incidentReport)
|
{
|
incidentReport.setUpdateTime(DateUtils.getNowDate());
|
return incidentReportMapper.updateIncidentReport(incidentReport);
|
}
|
|
/**
|
* 删除事件上报对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteIncidentReportByIds(String ids)
|
{
|
return incidentReportMapper.deleteIncidentReportByIds(Convert.toStrArray(ids));
|
}
|
|
/**
|
* 删除事件上报信息
|
*
|
* @param incidentReportId 事件上报ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteIncidentReportById(Long incidentReportId)
|
{
|
return incidentReportMapper.deleteIncidentReportById(incidentReportId);
|
}
|
}
|