Subversion Repositories SmartDukaan

Rev

Rev 27867 | Rev 27903 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27867 Rev 27893
Line 64... Line 64...
64
				+ "	and o.billingTimestamp >= :startDate and  o.billingTimestamp < :endDate and (null is :brand or li.brand = :brand) group by fs.warehouseId, date(o.billingTimestamp), li.brand"),
64
				+ "	and o.billingTimestamp >= :startDate and  o.billingTimestamp < :endDate and (null is :brand or li.brand = :brand) group by fs.warehouseId, date(o.billingTimestamp), li.brand"),
65
 
65
 
66
		@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
66
		@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
67
				+ " i.modelNumber, i.color," + "o.totalAmount," + "	 li.quantity)"
67
				+ " i.modelNumber, i.color," + "o.totalAmount," + "	 li.quantity)"
68
				+ "	 from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
68
				+ "	 from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
69
				+ "	and date(o.billingTimestamp) = :date and fs.warehouseId in :warehouseId and li.brand = :brand order by li.itemId desc"),
69
				+ "	and date(o.billingTimestamp) in :date and fs.warehouseId in :warehouseId and li.brand = :brand order by li.itemId desc"),
70
 
70
 
71
		@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
71
		@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
72
				+ " i.modelNumber, i.color," + "o.totalAmount," + "	 li.quantity)"
72
				+ " i.modelNumber, i.color," + "o.totalAmount," + "	 li.quantity)"
73
				+ "	 from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
73
				+ "	 from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
74
				+ "	and o.billingTimestamp >= :startDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc")
74
				+ "	and o.billingTimestamp >= :startDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc"),
-
 
75
 
-
 
76
		@NamedQuery(name = "Order.selectAllBilledOrderBrandByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockBrandModel(li.brand,"
-
 
77
				+ "	 Sum(li.quantity),Sum(CAST(o.totalAmount As int)))"
-
 
78
				+ "	 from Order o join LineItem li on o.id = li.orderId where o.status in (7,9,10,12)"
-
 
79
				+ "	and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId group by li.brand"),
-
 
80
 
-
 
81
		@NamedQuery(name = "Order.selectAllBilledOrderBrandItemByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockBrandItemModel("
-
 
82
				+ " i.brand, i.modelName, i.modelNumber, i.color,Sum(li.quantity), Sum(CAST(o.totalAmount As int)))"
-
 
83
				+ "	 from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId where o.status in (7,9,10,12)"
-
 
84
				+ "	and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId  group by i.id"),
75
 
85
 
76
})
86
})
77
public class Order implements Serializable {
87
public class Order implements Serializable {
78
 
88
 
79
	private static final long serialVersionUID = 1L;
89
	private static final long serialVersionUID = 1L;