| Line 106... |
Line 106... |
| 106 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
106 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
| 107 |
+ " join Item i on i.id = tl.itemId where "
|
107 |
+ " join Item i on i.id = tl.itemId where "
|
| 108 |
+ " fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId and fs.warehouseId in :warehouseId group by i.catalogItemId, fs.id"),
|
108 |
+ " fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId and fs.warehouseId in :warehouseId group by i.catalogItemId, fs.id"),
|
| 109 |
|
109 |
|
| 110 |
@NamedQuery(name = "Order.selectFirstBilling", query = "select new com.spice.profitmandi.dao.model.FofoFirstBillingModel(fs.id, min(o.billingTimestamp) )"
|
110 |
@NamedQuery(name = "Order.selectFirstBilling", query = "select new com.spice.profitmandi.dao.model.FofoFirstBillingModel(fs.id, min(o.billingTimestamp) )"
|
| 111 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId" + " group by fs.id"),
|
111 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId" + " where o.billingTimestamp > '2018-01-01' group by fs.id"),
|
| 112 |
|
112 |
|
| 113 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
113 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
| 114 |
+ " fs.warehouseId,fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join Order o on fs.id = o.retailerId "
|
114 |
+ " fs.warehouseId,fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join Order o on fs.id = o.retailerId "
|
| 115 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
115 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
| 116 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = 1 and fs.internal = 0 and"
|
116 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = 1 and fs.internal = 0 and"
|