5fa9bed6f92c71dda1eb2b82936647af2f1d9e89.svn-base 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package cn.com.goldenwater.dcproj.service.impl;
  2. import cn.com.goldenwater.core.service.AbstractCrudService;
  3. import cn.com.goldenwater.dcproj.dao.ChkSafeStatListIndustryDao;
  4. import cn.com.goldenwater.dcproj.model.ChkSafeStatListIndustry;
  5. import cn.com.goldenwater.dcproj.param.ChkSafeStatListIndustryParam;
  6. import cn.com.goldenwater.dcproj.service.ChkSafeStatListIndustryService;
  7. import cn.com.goldenwater.id.util.UuidUtil;
  8. import org.slf4j.Logger;
  9. import org.slf4j.LoggerFactory;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.stereotype.Service;
  12. import org.springframework.transaction.annotation.Transactional;
  13. import java.util.Date;
  14. import java.util.List;
  15. /**
  16. * 成都市水务行业安全大检查行业(领域)Service业务层处理
  17. *
  18. * @author ruoyi
  19. * @date 2023-02-22
  20. */
  21. @Service
  22. @Transactional
  23. public class ChkSafeStatListIndustryServiceImpl extends AbstractCrudService<ChkSafeStatListIndustry, ChkSafeStatListIndustryParam> implements ChkSafeStatListIndustryService
  24. {
  25. private Logger logger = LoggerFactory.getLogger(getClass());
  26. @Autowired
  27. private ChkSafeStatListIndustryDao chkSafeStatListIndustryDao;
  28. public ChkSafeStatListIndustryServiceImpl(ChkSafeStatListIndustryDao chkSafeStatListIndustryDao) {
  29. super(chkSafeStatListIndustryDao);
  30. this.chkSafeStatListIndustryDao = chkSafeStatListIndustryDao;
  31. }
  32. /**
  33. * 增加成都市水务行业安全大检查行业(领域)
  34. *
  35. * @return 成都市水务行业安全大检查行业(领域)
  36. */
  37. @Override
  38. public int insert(ChkSafeStatListIndustry chkSafeStatListIndustry) {
  39. logger.debug("ChkSafeStatListIndustry 新增");
  40. String uuid = UuidUtil.uuid(); // 生成uuid
  41. chkSafeStatListIndustry.setId(uuid);
  42. chkSafeStatListIndustry.setIntm(new Date());
  43. chkSafeStatListIndustry.setUptm(new Date());
  44. chkSafeStatListIndustry.setDataStat("0");
  45. return this.chkSafeStatListIndustryDao.insert(chkSafeStatListIndustry);
  46. }
  47. /**
  48. * 更新 成都市水务行业安全大检查行业(领域)
  49. * 主键更新
  50. * @param chkSafeStatListIndustry 成都市水务行业安全大检查行业(领域)
  51. * @return 成都市水务行业安全大检查行业(领域)
  52. */
  53. @Override
  54. public int update(ChkSafeStatListIndustry chkSafeStatListIndustry) {
  55. logger.debug("ChkSafeStatListIndustry 更新");
  56. chkSafeStatListIndustry.setUptm(new Date());
  57. return this.chkSafeStatListIndustryDao.update(chkSafeStatListIndustry);
  58. }
  59. /**
  60. * 主键删除 成都市水务行业安全大检查行业(领域)
  61. *
  62. * @param id 成都市水务行业安全大检查行业(领域)主键
  63. * @return 成都市水务行业安全大检查行业(领域)
  64. */
  65. @Override
  66. public int delete(String id) {
  67. logger.debug("ChkSafeStatListIndustry 删除");
  68. return this.chkSafeStatListIndustryDao.delete(id);
  69. }
  70. /**
  71. * 查询行业领域下拉框列表
  72. * @param chkSafeStatListIndustryParam
  73. * @return
  74. */
  75. @Override
  76. public List<ChkSafeStatListIndustry> querySelectOptions(ChkSafeStatListIndustryParam chkSafeStatListIndustryParam){
  77. if(null == chkSafeStatListIndustryParam || null == chkSafeStatListIndustryParam.getPid()){
  78. return this.chkSafeStatListIndustryDao.findRootList();
  79. }else {
  80. chkSafeStatListIndustryParam.setDataStat("0");
  81. return this.chkSafeStatListIndustryDao.findList(chkSafeStatListIndustryParam);
  82. }
  83. }
  84. }