package cn.com.goldenwater.dcproj.service.impl.zhejiang; import cn.com.goldenwater.dcproj.constValue.StateEnum; import cn.com.goldenwater.dcproj.dao.AttCwsBaseDao; import cn.com.goldenwater.dcproj.dao.BisZhejiangCountryFeeDao; import cn.com.goldenwater.dcproj.dao.BisZhejiangVillRgstrDao; import cn.com.goldenwater.dcproj.model.AttCwsBase; import cn.com.goldenwater.dcproj.model.BisZhejiangCountryFee; import cn.com.goldenwater.dcproj.model.BisZhejiangVillRgstr; import cn.com.goldenwater.dcproj.param.BisZhejiangCountryFeeParam; import cn.com.goldenwater.dcproj.param.CwsParam; import cn.com.goldenwater.dcproj.service.BisZhejiangCountryFeeService; import cn.com.goldenwater.core.service.AbstractCrudService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @author lune * @date 2020-5-11 */ @Service @Transactional public class BisZhejiangCountryFeeServiceImpl extends AbstractCrudService implements BisZhejiangCountryFeeService { @Autowired private BisZhejiangCountryFeeDao bisZhejiangCountryFeeDao; @Autowired private BisZhejiangVillRgstrDao bisZhejiangVillRgstrDao; @Autowired private AttCwsBaseDao attCwsBaseDao; public BisZhejiangCountryFeeServiceImpl(BisZhejiangCountryFeeDao bisZhejiangCountryFeeDao) { super(bisZhejiangCountryFeeDao); this.bisZhejiangCountryFeeDao = bisZhejiangCountryFeeDao; } @Override public void updateWaterOrPay(String regstrId) { if(StringUtils.isBlank(regstrId)){ return; } BisZhejiangCountryFeeParam countryFeeParam=new BisZhejiangCountryFeeParam(); countryFeeParam.setRgstrId(regstrId); countryFeeParam.setStatus(StateEnum.COMASTSTATE.getKey()); BisZhejiangVillRgstr bisNewVillRgstr=new BisZhejiangVillRgstr(); List countryFeeList=bisZhejiangCountryFeeDao.findList(countryFeeParam); if(!countryFeeList.isEmpty()){ bisNewVillRgstr.setId(regstrId); bisNewVillRgstr.setWaterSafeOrPay(StateEnum.COMASTSTATE.getKey()); bisZhejiangVillRgstrDao.update(bisNewVillRgstr); } } @Override public PageInfo pageNotDC(CwsParam cwsParam) { PageHelper.startPage(cwsParam.getPageNum(), cwsParam.getPageSize()); List bisInspBaseDtos = attCwsBaseDao.queryListByRegstrIdNotDC(cwsParam); PageInfo page = new PageInfo(bisInspBaseDtos); return page; } }