package com.ruoyi.project.dc.accidentInformation.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.accidentInformation.mapper.AccidentInformationMapper;
|
import com.ruoyi.project.dc.accidentInformation.domain.AccidentInformation;
|
import com.ruoyi.project.dc.accidentInformation.service.IAccidentInformationService;
|
import com.ruoyi.common.utils.text.Convert;
|
|
/**
|
* 事故信息Service业务层处理
|
*
|
* @author wm
|
* @date 2020-12-07
|
*/
|
@Service
|
public class AccidentInformationServiceImpl implements IAccidentInformationService
|
{
|
@Autowired
|
private AccidentInformationMapper accidentInformationMapper;
|
|
/**
|
* 查询事故信息
|
*
|
* @param accidentId 事故信息ID
|
* @return 事故信息
|
*/
|
@Override
|
public AccidentInformation selectAccidentInformationById(Long accidentId)
|
{
|
return accidentInformationMapper.selectAccidentInformationById(accidentId);
|
}
|
|
/**
|
* 查询事故信息列表
|
*
|
* @param accidentInformation 事故信息
|
* @return 事故信息
|
*/
|
@Override
|
public List<AccidentInformation> selectAccidentInformationList(AccidentInformation accidentInformation)
|
{
|
return accidentInformationMapper.selectAccidentInformationList(accidentInformation);
|
}
|
|
/**
|
* 新增事故信息
|
*
|
* @param accidentInformation 事故信息
|
* @return 结果
|
*/
|
@Override
|
public int insertAccidentInformation(AccidentInformation accidentInformation)
|
{
|
accidentInformation.setCreateTime(DateUtils.getNowDate());
|
return accidentInformationMapper.insertAccidentInformation(accidentInformation);
|
}
|
|
/**
|
* 修改事故信息
|
*
|
* @param accidentInformation 事故信息
|
* @return 结果
|
*/
|
@Override
|
public int updateAccidentInformation(AccidentInformation accidentInformation)
|
{
|
accidentInformation.setUpdateTime(DateUtils.getNowDate());
|
return accidentInformationMapper.updateAccidentInformation(accidentInformation);
|
}
|
|
/**
|
* 删除事故信息对象
|
*
|
* @param ids 需要删除的数据ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccidentInformationByIds(String ids)
|
{
|
return accidentInformationMapper.deleteAccidentInformationByIds(Convert.toStrArray(ids));
|
}
|
|
/**
|
* 删除事故信息信息
|
*
|
* @param accidentId 事故信息ID
|
* @return 结果
|
*/
|
@Override
|
public int deleteAccidentInformationById(Long accidentId)
|
{
|
return accidentInformationMapper.deleteAccidentInformationById(accidentId);
|
}
|
}
|