package com.steering.ydm.bc.report;

import java.util.ArrayList;

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

import com.steering.comm.converter.CoreConverter;
import com.steering.comm.db.DBCommon;

public class FrmReportBcOutput extends DBCommon{

	/***
	 * 查询(仓库权限)
	 * @param list
	 * @param arr
	 * @return
	 */
	public CoreReturnObject doQueryData(ArrayList<String> list,String[] arr,String strPlanSql,String bathYear)
	{
		String sql = CoreXmlSqlParsersFactory.getSql("FrmReportBcOutput.doQueryData").replace("#COLUMNS#", list.get(0));
		sql +=CoreConverter.toSqlConditionString("t.STORAGE_NO", arr);
		sql = sql.replace("#CONDITIONS#", list.get(1));
		sql = sql + list.get(2);
		
		return this.getData(sql);
	}
	
	/***
	 * 查询(所属权)
	 * @param list
	 * @param arr
	 * @return
	 */
	public CoreReturnObject doQueryDataBelong(ArrayList<String> list,String[] arr)
	{
		String sql = CoreXmlSqlParsersFactory.getSql("FrmReportBcOutput.doQueryDataBelong").replace("#COLUMNS#", list.get(0));
		sql +=CoreConverter.toSqlConditionString("t.BELONG_CODE", arr);
		sql = sql.replace("#CONDITIONS#", list.get(1));
		sql = sql + list.get(2);
		return this.getData(sql);
	}
}
