| Line 58... |
Line 58... |
| 58 |
+ " from Order o join LineItem li on o.id = li.orderId where o.billingTimestamp is not null and o.refundTimestamp is null"
|
58 |
+ " from Order o join LineItem li on o.id = li.orderId where o.billingTimestamp is not null and o.refundTimestamp is null"
|
| 59 |
+ " and o.billingTimestamp >= :lmtdStartDate and o.warehouseId in :warehouseId group by li.brand"),
|
59 |
+ " and o.billingTimestamp >= :lmtdStartDate and o.warehouseId in :warehouseId group by li.brand"),
|
| 60 |
|
60 |
|
| 61 |
@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
61 |
@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
| 62 |
+ " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)"
|
62 |
+ " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)"
|
| 63 |
+ " from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId where o.billingTimestamp is not null and o.refundTimestamp is null"
|
63 |
+ " 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.billingTimestamp is not null and o.refundTimestamp is null"
|
| 64 |
+ " and o.billingTimestamp >= :startDate and o.billingTimestamp < :endDate and o.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc"),
|
64 |
+ " and o.billingTimestamp >= :startDate and o.billingTimestamp < :endDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc"),
|
| 65 |
|
65 |
|
| 66 |
@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
66 |
@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", 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 where o.billingTimestamp is not null and o.refundTimestamp is null"
|
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.billingTimestamp is not null and o.refundTimestamp is null"
|
| 69 |
+ " and o.billingTimestamp >= :startDate and o.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc")
|
69 |
+ " and o.billingTimestamp >= :startDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc")
|
| 70 |
|
70 |
|
| 71 |
})
|
71 |
})
|
| 72 |
public class Order implements Serializable {
|
72 |
public class Order implements Serializable {
|
| 73 |
|
73 |
|
| 74 |
private static final long serialVersionUID = 1L;
|
74 |
private static final long serialVersionUID = 1L;
|