75aed2eeb16491d73f9328ef12388d449e33fbc0.svn-base 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package cn.com.goldenwater.dcproj.service.impl.zhejiang;
  2. import cn.com.goldenwater.dcproj.constValue.StateEnum;
  3. import cn.com.goldenwater.dcproj.dao.AttCwsBaseDao;
  4. import cn.com.goldenwater.dcproj.dao.BisZhejiangCountryFeeDao;
  5. import cn.com.goldenwater.dcproj.dao.BisZhejiangVillRgstrDao;
  6. import cn.com.goldenwater.dcproj.model.AttCwsBase;
  7. import cn.com.goldenwater.dcproj.model.BisZhejiangCountryFee;
  8. import cn.com.goldenwater.dcproj.model.BisZhejiangVillRgstr;
  9. import cn.com.goldenwater.dcproj.param.BisZhejiangCountryFeeParam;
  10. import cn.com.goldenwater.dcproj.param.CwsParam;
  11. import cn.com.goldenwater.dcproj.service.BisZhejiangCountryFeeService;
  12. import cn.com.goldenwater.core.service.AbstractCrudService;
  13. import com.github.pagehelper.PageHelper;
  14. import com.github.pagehelper.PageInfo;
  15. import org.apache.commons.lang3.StringUtils;
  16. import org.springframework.beans.factory.annotation.Autowired;
  17. import org.springframework.stereotype.Service;
  18. import org.springframework.transaction.annotation.Transactional;
  19. import java.util.List;
  20. /**
  21. * @author lune
  22. * @date 2020-5-11
  23. */
  24. @Service
  25. @Transactional
  26. public class BisZhejiangCountryFeeServiceImpl extends AbstractCrudService<BisZhejiangCountryFee, BisZhejiangCountryFeeParam> implements BisZhejiangCountryFeeService {
  27. @Autowired
  28. private BisZhejiangCountryFeeDao bisZhejiangCountryFeeDao;
  29. @Autowired
  30. private BisZhejiangVillRgstrDao bisZhejiangVillRgstrDao;
  31. @Autowired
  32. private AttCwsBaseDao attCwsBaseDao;
  33. public BisZhejiangCountryFeeServiceImpl(BisZhejiangCountryFeeDao bisZhejiangCountryFeeDao) {
  34. super(bisZhejiangCountryFeeDao);
  35. this.bisZhejiangCountryFeeDao = bisZhejiangCountryFeeDao;
  36. }
  37. @Override
  38. public void updateWaterOrPay(String regstrId) {
  39. if(StringUtils.isBlank(regstrId)){
  40. return;
  41. }
  42. BisZhejiangCountryFeeParam countryFeeParam=new BisZhejiangCountryFeeParam();
  43. countryFeeParam.setRgstrId(regstrId);
  44. countryFeeParam.setStatus(StateEnum.COMASTSTATE.getKey());
  45. BisZhejiangVillRgstr bisNewVillRgstr=new BisZhejiangVillRgstr();
  46. List<BisZhejiangCountryFee> countryFeeList=bisZhejiangCountryFeeDao.findList(countryFeeParam);
  47. if(!countryFeeList.isEmpty()){
  48. bisNewVillRgstr.setId(regstrId);
  49. bisNewVillRgstr.setWaterSafeOrPay(StateEnum.COMASTSTATE.getKey());
  50. bisZhejiangVillRgstrDao.update(bisNewVillRgstr);
  51. }
  52. }
  53. @Override
  54. public PageInfo<AttCwsBase> pageNotDC(CwsParam cwsParam) {
  55. PageHelper.startPage(cwsParam.getPageNum(), cwsParam.getPageSize());
  56. List<AttCwsBase> bisInspBaseDtos = attCwsBaseDao.queryListByRegstrIdNotDC(cwsParam);
  57. PageInfo page = new PageInfo(bisInspBaseDtos);
  58. return page;
  59. }
  60. }