package com.steering.pss.ydm.Report;

import java.util.ArrayList;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;
import com.steering.comm.db.DBCommon;

public class FrmMatResume extends DBCommon{
	/***
	 * 查询
	 * @param arr
	 * @return
	 */
	public CoreReturnObject doQuery(ArrayList<String> parm,String supplyUnit)
	{
		//return this.getDataBySqlID("FrmMatResume.doQuery", parm.toArray());
		String sql = CoreXmlSqlParsersFactory.getSql("FrmMatResume.doQuery");
		String strSupplyUnit="";
		if( supplyUnit.equals("120501"))
		{
			strSupplyUnit = " AND (T2.SUPPLY_UNIT_CODE = '"+supplyUnit+"' OR T2.SUPPLY_UNIT_CODE IS NULL)";
		}else if(supplyUnit.equals("120504")){
			strSupplyUnit = " AND T2.SUPPLY_UNIT_CODE = '"+supplyUnit+"'";
		}
		sql = sql.replace("#conditions#", strSupplyUnit);
		return this.getData(sql, parm.toArray());
	}
	/***
     * 查询
     * @param arr
     * @return
     */
    public CoreReturnObject queryMaterialStatusflag()
    {
        return this.getDataBySqlID("FrmMatResume.queryMaterialStatusflag");
    }
}
