oqs sample
This commit is contained in:
@@ -2,12 +2,34 @@ class Oqs::HomeController < BaseOqsController
|
||||
def index
|
||||
@queue_stations=OrderQueueStation.all
|
||||
|
||||
#sample Data
|
||||
@queue_items_details = { :queue_id => 1, :order_id => 1, :station_name => 'Queue Station 1', :zone => 'Table4', :item_name => 'beef', :price => 10.00, :qty => 2, :customer => 'Wathon', :item_order_by => 'Yan', :created_at => '2007-05-17'}
|
||||
# @queue_items_details = OrderItem.select("oqs as queue_id, oqs.station_name, oqs.is_active, oqpz.zone_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.created_at")
|
||||
# .joins("join order_queue_process_by_zones as oqpz ON oqpz.order_queue_station_id = order_queue_items.order_queue_station_id")
|
||||
# .joins("right join order_queue_stations as oqs ON oqs.id = order_queue_items.order_queue_station_id")
|
||||
# .joins("right join orders as od ON od.id = order_queue_items.order_id")
|
||||
# .joins("right join order_items as odt ON odt.item_code = order_queue_items.item_code")
|
||||
# .order("odt.item_name DESC")
|
||||
|
||||
# puts @queue_items_details
|
||||
# @queue_stations.each do |que|
|
||||
# Contact.find(:all, :joins => ['left join sales s on s.customer_id = contacts.id'], :conditions => ["contact_type = 'Customer' AND name IS NOT NULL"],:group => ["contacts.id"])
|
||||
# AssignedOrderItem.find(:all, :conditions=>["order_queue_station_id=#{que.id}"], :group => ["order_queue_station_id"])
|
||||
# zone_id = OrderQueueProcessByZone.where('order_queue_station_id=#{que.id}').select(:zone_id).take
|
||||
# type = DiningFacility.find_by_zone_id(zone_id).select(:type).take
|
||||
# end
|
||||
# @queue_items_details = { :queue_id, :zone_id, :item_code, :item_name, :item_options, :price, :qty, :order_by, :order_at }
|
||||
# @queue_stations.each do |que|
|
||||
# # Contact.find(:all, :joins => ['left join sales s on s.customer_id = contacts.id'], :conditions => ["contact_type = 'Customer' AND name IS NOT NULL"],:group => ["contacts.id"])
|
||||
# assigned_items=AssignedOrderItem.find(:all, :conditions=>["order_queue_station_id = #{que.id}"], :group => ["order_queue_station_id"])
|
||||
# assigned_items.each do |ass_items|
|
||||
# order_item_details=OrderItems.joins('left join order').where("item_code = #{ ass_items.item_code } AND order_item_status = 1")
|
||||
# end
|
||||
# # AssignedOrderItem.where("order_queue_station_id = :que_id", {:que_id => que_id}).get
|
||||
# end
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user