fc5acfcfb6d5703f8d2263c9b1b81c2bbb6ca747.svn-base 2.0 KB

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