c4f010cfbec66a9337ab4cd7b8d4149ecaac8674.svn-base 1.83 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 java.util.Map;

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.qjxt.ZdK103;
import com.thinkgem.jeesite.modules.reg.dao.qjxt.ZdK103Dao;

/**
 * 权籍系统k103信息处理Service
 * @author xuyg
 * @version 2018-11-09
 */
@Service
@Transactional(readOnly = true)
public class ZdK103Service extends CrudService<ZdK103Dao, ZdK103> {

	public ZdK103 get(String id) {
		return super.get(id);
	}
	
	public List<ZdK103> findList(ZdK103 zdK103) {
		return super.findList(zdK103);
	}
	
	public String findzbinfo(String bdcdyhinfo) {
		return dao.findzbinfo(bdcdyhinfo);
	}
	
	public Page<ZdK103> findPage(Page<ZdK103> page, ZdK103 zdK103) {
		return super.findPage(page, zdK103);
	}
	
	@Transactional(readOnly = false)
	public void save(ZdK103 zdK103) {
		super.save(zdK103);
	}
	
	@Transactional(readOnly = false)
	public void delete(ZdK103 zdK103) {
		super.delete(zdK103);
	}
	/**
	 * 将zb转xml前字符串
	 * @param num
	 * @return
	 */
	public String ZBzhuanStr(ZdK103 zdk103) {  
		    String strzb103="";
	        List<ZdK103> kList = findList(zdk103);
	        if(kList.size()>0) {
			for(int j=0; j<kList.size(); j++){
				strzb103=strzb103+ "<ZD_K_103 BDCDYH=\""+zdk103.getBdcdyh()+"\" XH=\""+String.valueOf(j+1)+"\" XZB=\""+kList.get(j).getXzb()+"\" YZB=\""+kList.get(j).getYzb()+"\" ZDX=\"1\" />";
			}
			strzb103 = strzb103.replaceAll("null","");
	        }else {
	        	strzb103 = "1";
	        }
            return strzb103;
	}
}