| Line 78... |
Line 78... |
| 78 |
|
78 |
|
| 79 |
|
79 |
|
| 80 |
@NamedQuery(name = "Order.getLastOrderByFofoId", query = "select Max(o.id) from Order o where o.retailerId = :fofoId and o.status in (7,9,10,12) and o.deliveryTimestamp is not null"),
|
80 |
@NamedQuery(name = "Order.getLastOrderByFofoId", query = "select Max(o.id) from Order o where o.retailerId = :fofoId and o.status in (7,9,10,12) and o.deliveryTimestamp is not null"),
|
| 81 |
|
81 |
|
| 82 |
@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"),
|
82 |
@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"),
|
| - |
|
83 |
@NamedQuery(name = "Order.selectOrdersByBilledDateCatalogId",
|
| - |
|
84 |
query = "select new com.spice.profitmandi.common.model.GrnPendingDataModel(" +
|
| - |
|
85 |
"o.retailerId, fs.code, o.retailerName, o.invoiceNumber, o.billingTimestamp, l.itemId, l.brand, l.modelName, l.modelNumber, l.color, " +
|
| - |
|
86 |
"l.unitPrice, lii.serialNumber, v.name, wi.created, ai.activationTimestamp, ai.createTimestamp)" +
|
| - |
|
87 |
|
| - |
|
88 |
"from Order o join FofoStore fs on fs.id = o.retailerId" +
|
| - |
|
89 |
" join LineItem l on l.orderId = o.id" +
|
| - |
|
90 |
" join LineItemImei lii on lii.lineItemId = l.id" +
|
| - |
|
91 |
" join Warehouse w on w.id = o.fulfilmentWarehouseId" +
|
| - |
|
92 |
" join Vendor v on v.id = w.vendor" +
|
| - |
|
93 |
" left join ActivatedImei ai on ai.serialNumber = lii.serialNumber" +
|
| - |
|
94 |
" join WarehouseInventoryItem wi on wi.serialNumber = lii.serialNumber" +
|
| - |
|
95 |
" join WarehouseScan ws on (ws.orderId = o.id and ws.type = 'SALE' and wi.id = ws.inventoryItemId)" +
|
| - |
|
96 |
" join Item i on i.id=l.itemId " +
|
| - |
|
97 |
"where i.catalogItemId=:catalogId and o.billingTimestamp between :startDate and :endDate and (o.refundTimestamp is null or o.refundTimestamp <= :endDate)"),
|
| 83 |
|
98 |
|
| 84 |
|
99 |
|
| 85 |
})
|
100 |
})
|
| 86 |
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where o.id = '1694173'", resultClass = Order.class)
|
101 |
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where o.id = '1694173'", resultClass = Order.class)
|
| 87 |
|
102 |
|