Subversion Repositories SmartDukaan

Rev

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

Rev 27903 Rev 28004
Line 81... Line 81...
81
		@NamedQuery(name = "Order.selectAllBilledOrderBrandItemByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockBrandItemModel("
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)))"
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)"
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"),
84
				+ "	and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId  group by i.id"),
85
 
85
 
-
 
86
		@NamedQuery(name = "Order.selectAllGrnPendingOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
-
 
87
				+ "  fs.id,sum(li.quantity )) from FofoStore fs join  Order o on fs.id = o.retailerId "
-
 
88
				+ "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId "
-
 
89
				+ "  join Item i on (i.id = tl.itemId ) where " + "	 fs.active = 1 and fs.internal = 0 and"
-
 
90
				+ "  o.billingTimestamp is not null and o.refundTimestamp is null and o.deliveryTimestamp is null"
-
 
91
				+ "  and i.catalogItemId = :catalogItemId group by fs.id"),
-
 
92
 
-
 
93
		@NamedQuery(name = "Order.selectAllPendingIndentOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
-
 
94
				+ " fs.id,sum(case when li.quantity is null then 0 else  li.quantity end))"
-
 
95
				+ "	 from FofoStore fs  join  Order o on fs.id = o.retailerId"
-
 
96
				+ "  join LineItem li on o.id = li.orderId " + "  join TagListing tl on tl.itemId = li.itemId "
-
 
97
				+ "  join Item i on i.id = tl.itemId  where "
-
 
98
				+ "	 fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId = :catalogItemId group by fs.id"),
-
 
99
 
-
 
100
		@NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
-
 
101
				+ "  fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join  Order o on fs.id = o.retailerId "
-
 
102
				+ "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId "
-
 
103
				+ "  join Item i on (i.id = tl.itemId ) where " + "	 fs.active = 1 and fs.internal = 0 and"
-
 
104
				+ "  o.billingTimestamp is not null and o.refundTimestamp is null and o.deliveryTimestamp is null"
-
 
105
				+ "  and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
-
 
106
 
-
 
107
		@NamedQuery(name = "Order.selectAllPendingIndentOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
-
 
108
				+ " fs.id,sum(case when li.quantity is null then 0 else  li.quantity end),i.brand,i.modelName,i.modelNumber,i.catalogItemId)"
-
 
109
				+ "	 from FofoStore fs  join  Order o on fs.id = o.retailerId"
-
 
110
				+ "  join LineItem li on o.id = li.orderId " + "  join TagListing tl on tl.itemId = li.itemId "
-
 
111
				+ "  join Item i on i.id = tl.itemId  where "
-
 
112
				+ "	 fs.active = 1 and fs.internal = 0 and o.status in (3,4) and tl.mop between :startPrice and :endPrice  and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
-
 
113
 
86
})
114
})
87
public class Order implements Serializable {
115
public class Order implements Serializable {
88
 
116
 
89
	private static final long serialVersionUID = 1L;
117
	private static final long serialVersionUID = 1L;
90
 
118