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

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseH;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBasePerson;
import com.thinkgem.jeesite.modules.reg.dao.base.RegBasePersonDao;

/**
 * 人员信息维护Service
 * @author xuyg
 * @version 2016-04-12
 */
@Service
@Transactional(readOnly = true)
public class RegBasePersonService extends CrudService<RegBasePersonDao, RegBasePerson> {

	public RegBasePerson get(String id) {
		return super.get(id);
	}
	
	/**
	* @Title: getID 
	* @Description: 通过证件号获取一个人员信息对象
	* @param @param id
	* @param @return    设定文件 
	* @return RegBasePerson    返回类型 
	* @throws
	 */
	public RegBasePerson getID(String zjh) {
		return dao.getID(zjh);
	}
	
	public String getHMaxPCode(){
		if("oracle".equals(Global.getDbName())){
			return dao.getHMaxPCodeOfOracle();
		}else{
			return dao.getHMaxPCode();
		}
	}
	
	public List<RegBasePerson> findList(RegBasePerson regBasePerson) {
		return super.findList(regBasePerson);
	}
	
	public List<RegBasePerson> findListqy(RegBasePerson regBasePerson) {
		return dao.findListqy(regBasePerson);
	}
	
	public List<RegBasePerson> findIsexistList(RegBasePerson regBasePerson) {
		return dao.findIsexistList(regBasePerson);
	}
	
	public Page<RegBasePerson> findPage(Page<RegBasePerson> page, RegBasePerson regBasePerson) {
		return super.findPage(page, regBasePerson);
	}
	
	public Page<RegBasePerson> findfwqlrgmPage(Page<RegBasePerson> page, RegBasePerson regBasePerson) {
		return super.findfwqlrgmPage(page, regBasePerson);
	}

	public Page<RegBasePerson> findAllPage(Page<RegBasePerson> page, RegBasePerson regBasePerson) {
		regBasePerson.setPage(page);
		return page.setList(dao.findAllList(regBasePerson));
	}

	@Transactional(readOnly = false)
	public void save(RegBasePerson regBasePerson) {
		super.save(regBasePerson);
	}
	
	@Transactional(readOnly = false)
	public void delete(RegBasePerson regBasePerson) {
		super.delete(regBasePerson);
	}
	@Transactional(readOnly = false)
	public void deletery(RegBasePerson regBasePerson) {
		dao.deletery(regBasePerson);
	}

	public RegBasePerson getByZwr(String zwrzjh, String zwr) {
		// TODO Auto-generated method stub
		return dao.getByZwr(zwrzjh,zwr);
	}
}