5db0e7fe76616e07dc7308da47aff9264bb89b37.svn-base 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package cn.com.goldenwater.dcproj.service.impl;
  2. import cn.com.goldenwater.core.service.AbstractCrudService;
  3. import cn.com.goldenwater.dcproj.dao.AttProjectInsuranceRecordDao;
  4. import cn.com.goldenwater.dcproj.model.AttProjectInsuranceRecord;
  5. import cn.com.goldenwater.dcproj.param.AttProjectInsuranceRecordParam;
  6. import cn.com.goldenwater.dcproj.service.AttProjectInsuranceRecordService;
  7. import cn.com.goldenwater.id.util.UuidUtil;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.stereotype.Service;
  10. import org.springframework.transaction.annotation.Transactional;
  11. import java.util.Date;
  12. /**
  13. * @author lql
  14. * @date 2026-4-21
  15. */
  16. @Service
  17. @Transactional
  18. public class AttProjectInsuranceRecordServiceImpl extends AbstractCrudService<AttProjectInsuranceRecord, AttProjectInsuranceRecordParam> implements AttProjectInsuranceRecordService {
  19. @Autowired
  20. private AttProjectInsuranceRecordDao attProjectInsuranceRecordDao;
  21. public AttProjectInsuranceRecordServiceImpl(AttProjectInsuranceRecordDao attProjectInsuranceRecordDao) {
  22. super(attProjectInsuranceRecordDao);
  23. this.attProjectInsuranceRecordDao = attProjectInsuranceRecordDao;
  24. }
  25. @Override
  26. public int insert(AttProjectInsuranceRecord attProjectInsuranceRecord) {
  27. String uuid = UuidUtil.uuid(); // 生成uuid
  28. attProjectInsuranceRecord.setId(uuid);
  29. attProjectInsuranceRecord.setDataStat("0");
  30. attProjectInsuranceRecord.setIntm(new Date());
  31. attProjectInsuranceRecord.setUptm(new Date());
  32. return this.attProjectInsuranceRecordDao.insert(attProjectInsuranceRecord);
  33. }
  34. @Override
  35. public int update(AttProjectInsuranceRecord attProjectInsuranceRecord) {
  36. attProjectInsuranceRecord.setUptm(new Date());
  37. return this.attProjectInsuranceRecordDao.update(attProjectInsuranceRecord);
  38. }
  39. @Override
  40. public int delete(String id) {
  41. // 删除
  42. return this.attProjectInsuranceRecordDao.delete(id);
  43. }
  44. }