package com.steering.pss.sale.order;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

import com.steering.comm.db.DBCommon;


public class CoreProWell extends DBCommon {
	/**
	 * 合同状态数据源绑定
	 * @return CoreReturnObject 必须返回CoreReturnObject
	 */
	public CoreReturnObject bindCmbProcess() {
		return this.getDataBySqlID("CoreProWell.bindCmbProcess");
	}
	
	/**
	 * 查询
	 * @return CoreReturnObject 必须返回CoreReturnObject
	 */
	public CoreReturnObject doQuery(String year,String month,String processCode) {
		String sql = CoreXmlSqlParsersFactory.getSql("CoreProWell.doQuery");
		sql = sql.replaceAll("#YEAR#", year);
		sql = sql.replaceAll("#MONTH#", month);
		
		if("0".equals(processCode)){
			processCode="";
		}
		
		sql = sql.replaceAll("#PROCESS_CODE#", processCode);
		
		return this.getData(sql);
	}
	
	/**
	 * 合同状态数据源绑定
	 * @return CoreReturnObject 必须返回CoreReturnObject
	 */
	public CoreReturnObject GetWellDelivery(String year,String month,String wellCode) {
		Object[] params = new Object[] { year,month,wellCode };
		return this.getDataBySqlID("CoreProWell.GetWellDelivery",params);
	}
}


