698142c0423e496d6fe7232154f854be00bd5a17.svn-base 2.74 KB
/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.reg.service.qjxt;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusQlr;
import com.thinkgem.jeesite.modules.reg.entity.qjxt.BdcQlrxx;
import com.thinkgem.jeesite.modules.reg.entity.qjxt.BdcZdxx;
import com.thinkgem.jeesite.modules.reg.service.bus.RegBusQlrService;
import com.thinkgem.jeesite.modules.sys.utils.DictUtils;
import com.thinkgem.jeesite.modules.reg.dao.qjxt.BdcQlrxxDao;

/**
 * 权籍系统权利人信息处理Service
 * @author xuyg
 * @version 2018-11-09
 */
@Service
@Transactional(readOnly = true)
public class BdcQlrxxService extends CrudService<BdcQlrxxDao, BdcQlrxx> {
	@Autowired
	private RegBusQlrService regBusQlrService;
	
	public BdcQlrxx get(String id) {
		return super.get(id);
	}
	
	public List<BdcQlrxx> findList(BdcQlrxx bdcQlrxx) {
		return super.findList(bdcQlrxx);
	}
	
	public Page<BdcQlrxx> findPage(Page<BdcQlrxx> page, BdcQlrxx bdcQlrxx) {
		return super.findPage(page, bdcQlrxx);
	}
	
	@Transactional(readOnly = false)
	public void save(BdcQlrxx bdcQlrxx) {
		super.save(bdcQlrxx);
	}
	
	@Transactional(readOnly = false)
	public void delete(BdcQlrxx bdcQlrxx) {
		super.delete(bdcQlrxx);
	}
	
	/**
	 * 查询权利人信息
	 * @param bdcZdxx
	 * @return
	 */
	public void insertqlrxx(String bdcdyh,String ywh) {
		//获取权籍系统土地变更的权利人
		BdcQlrxx bdcQlrxx = new BdcQlrxx();
		bdcQlrxx.setBdcdyh(bdcdyh);
		bdcQlrxx.setZt("1");
		List<BdcQlrxx> findList_1 = findList(bdcQlrxx);
		for(int i=0; i<findList_1.size(); i++){
			bdcQlrxx = findList_1.get(i);
			//保存权利人
			RegBusQlr regBusQlr = new RegBusQlr();
			regBusQlr.setYwh(ywh);
			regBusQlr.setId(null);
			regBusQlr.setQszt("0");
			regBusQlr.setQllx("27");
			regBusQlr.setSxh(i+1);
			regBusQlr.setZjzl(bdcQlrxx.getZjzl());
			regBusQlr.setZjh(bdcQlrxx.getZjh());
			regBusQlr.setQlrlx(bdcQlrxx.getQlrlx());
//			regBusQlr.setHjszss(btQlr.getQlrhjszss());
//			regBusQlr.setXb(btQlr.getQlrxb());
//			regBusQlr.setDh(btQlr.getQlrdh());
//			regBusQlr.setBz(btQlr.getQlrbz());
//			regBusQlr.setGyfs(btQlr.getQlrgyfs());
//			regBusQlr.setGyfs(btQlr.getQlrgyfs());
//			regBusQlr.setQlbl(btQlr.getQlrqlbl());
//			regBusQlr.setGyqk(DictUtils.getDictLabel(btQlr.getQlrgyfs(), "reg_bus_gyfs", ""));
			regBusQlr.setSfczr(DictUtils.getDictValue("是", "yes_no",""));
			regBusQlrService.save(regBusQlr);
		}
	}
}