package core.stlmes.server.sale.dao;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import CoreFS.SA06.CoreReturnObject;
import core.stlmes.server.sale.dao.*;
import core.stlmes.server.sale.po.*;

public class SlmBalanceOutStockPricCofDao extends BaseService
{
	String sql = " select * from  SLM_BALANCE_OUTSTOACKPRIC_COF where 1 = 1";

	public java.sql.ResultSet getAllPriceForRs() throws java.sql.SQLException

	{
		java.sql.ResultSet rs = null;
		rs = super.executeForResult(sql);
		return rs;

	}

	public java.util.Hashtable getAllPrice() throws java.sql.SQLException

	{
		java.util.Hashtable hs = new java.util.Hashtable();
		java.sql.ResultSet rs = getAllPriceForRs();
		String key = "";
		Double price = 0.0;
		while (rs.next())
		{
			key = rs.getString("SALE_ORG") + rs.getString("STORAGE_NO")
					+ rs.getString("TRANS_TYPE");
			price = rs.getDouble("PRICE");
			if (hs.containsKey(key))
			{
				hs.remove(key);
			}
			hs.put(key, price);

		}
		rs.close();
		return hs;
	}

}
