PdmVehicleAlarmServiceImpl.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package com.ruoyi.powerdistribution.service.impl;
  2. import java.util.List;
  3. import com.ruoyi.common.utils.DateUtils;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Service;
  6. import com.ruoyi.powerdistribution.mapper.PdmVehicleAlarmMapper;
  7. import com.ruoyi.powerdistribution.domain.PdmVehicleAlarm;
  8. import com.ruoyi.powerdistribution.service.IPdmVehicleAlarmService;
  9. /**
  10. * 施工车辆告警Service业务层处理
  11. *
  12. * @author ruoyi
  13. * @date 2025-01-21
  14. */
  15. @Service
  16. public class PdmVehicleAlarmServiceImpl implements IPdmVehicleAlarmService
  17. {
  18. @Autowired
  19. private PdmVehicleAlarmMapper pdmVehicleAlarmMapper;
  20. /**
  21. * 查询施工车辆告警
  22. *
  23. * @param id 施工车辆告警主键
  24. * @return 施工车辆告警
  25. */
  26. @Override
  27. public PdmVehicleAlarm selectPdmVehicleAlarmById(Long id)
  28. {
  29. return pdmVehicleAlarmMapper.selectPdmVehicleAlarmById(id);
  30. }
  31. /**
  32. * 查询施工车辆告警列表
  33. *
  34. * @param pdmVehicleAlarm 施工车辆告警
  35. * @return 施工车辆告警
  36. */
  37. @Override
  38. public List<PdmVehicleAlarm> selectPdmVehicleAlarmList(PdmVehicleAlarm pdmVehicleAlarm)
  39. {
  40. return pdmVehicleAlarmMapper.selectPdmVehicleAlarmList(pdmVehicleAlarm);
  41. }
  42. /**
  43. * 新增施工车辆告警
  44. *
  45. * @param pdmVehicleAlarm 施工车辆告警
  46. * @return 结果
  47. */
  48. @Override
  49. public int insertPdmVehicleAlarm(PdmVehicleAlarm pdmVehicleAlarm)
  50. {
  51. pdmVehicleAlarm.setCreateTime(DateUtils.getNowDate());
  52. return pdmVehicleAlarmMapper.insertPdmVehicleAlarm(pdmVehicleAlarm);
  53. }
  54. /**
  55. * 修改施工车辆告警
  56. *
  57. * @param pdmVehicleAlarm 施工车辆告警
  58. * @return 结果
  59. */
  60. @Override
  61. public int updatePdmVehicleAlarm(PdmVehicleAlarm pdmVehicleAlarm)
  62. {
  63. pdmVehicleAlarm.setUpdateTime(DateUtils.getNowDate());
  64. return pdmVehicleAlarmMapper.updatePdmVehicleAlarm(pdmVehicleAlarm);
  65. }
  66. /**
  67. * 批量删除施工车辆告警
  68. *
  69. * @param ids 需要删除的施工车辆告警主键
  70. * @return 结果
  71. */
  72. @Override
  73. public int deletePdmVehicleAlarmByIds(Long[] ids)
  74. {
  75. return pdmVehicleAlarmMapper.deletePdmVehicleAlarmByIds(ids);
  76. }
  77. /**
  78. * 删除施工车辆告警信息
  79. *
  80. * @param id 施工车辆告警主键
  81. * @return 结果
  82. */
  83. @Override
  84. public int deletePdmVehicleAlarmById(Long id)
  85. {
  86. return pdmVehicleAlarmMapper.deletePdmVehicleAlarmById(id);
  87. }
  88. }