| Line 178... |
Line 178... |
| 178 |
+ " group by (pot.createTimestamp), pot.referenceType "),
|
178 |
+ " group by (pot.createTimestamp), pot.referenceType "),
|
| 179 |
|
179 |
|
| 180 |
|
180 |
|
| 181 |
@NamedQuery(name = "Order.getLastOrderByFofoId", query = "select COALESCE(Max(o.id),0) from Order o where o.retailerId = :fofoId and o.status in (7,9,10,12)"),
|
181 |
@NamedQuery(name = "Order.getLastOrderByFofoId", query = "select COALESCE(Max(o.id),0) from Order o where o.retailerId = :fofoId and o.status in (7,9,10,12)"),
|
| 182 |
|
182 |
|
| - |
|
183 |
@NamedQuery(name = "Order.getLastOrderByFofoIds", query = "select o.retailerId, Max(o.id) from Order o where o.retailerId in :fofoIds and o.status in (7,9,10,12) group by o.retailerId"),
|
| - |
|
184 |
|
| - |
|
185 |
@NamedQuery(name = "Order.selectAllBilledByCategoryOrderGroupByBrandFofoIds", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(o.retailerId, li.brand," + " DATE_FORMAT(o.billingTimestamp, '%m-%Y'),sum(cast((li.unitPrice * li.quantity) AS integer)))" + " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId join Item i on i.id = li.itemId where o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId in :fofoIds and i.categoryId in (:categoryIds) group by o.retailerId, li.brand, DATE_FORMAT(o.billingTimestamp, '%m-%Y')"),
|
| - |
|
186 |
|
| 183 |
@NamedQuery(name = "Order.selectOrderValueByCreateDateGroupByFofoId", query = "select new com.spice.profitmandi.common.model.IdAmountModel(o.retailerId, sum(o.totalAmount)) from Order o where o.retailerId in :retailerIds and o.status in :status and o.createTimestamp between :startDate and :endDate group by o.retailerId"),
|
187 |
@NamedQuery(name = "Order.selectOrderValueByCreateDateGroupByFofoId", query = "select new com.spice.profitmandi.common.model.IdAmountModel(o.retailerId, sum(o.totalAmount)) from Order o where o.retailerId in :retailerIds and o.status in :status and o.createTimestamp between :startDate and :endDate group by o.retailerId"),
|
| 184 |
|
188 |
|
| 185 |
@NamedQuery(name = "Order.selectOrderValueByBillingDateGroupByFofoId", query = "select new com.spice.profitmandi.common.model.IdAmountModel(o.retailerId, sum(o.totalAmount)) from Order o where o.retailerId in :retailerIds and o.billingTimestamp between :startDate and :endDate group by o.retailerId"),
|
189 |
@NamedQuery(name = "Order.selectOrderValueByBillingDateGroupByFofoId", query = "select new com.spice.profitmandi.common.model.IdAmountModel(o.retailerId, sum(o.totalAmount)) from Order o where o.retailerId in :retailerIds and o.billingTimestamp between :startDate and :endDate group by o.retailerId"),
|
| 186 |
|
190 |
|
| 187 |
@NamedQuery(name = "Order.selectOrdersByBilledDateCatalogId",
|
191 |
@NamedQuery(name = "Order.selectOrdersByBilledDateCatalogId",
|