| Line 18... |
Line 18... |
| 18 |
* @author ashikali
|
18 |
* @author ashikali
|
| 19 |
*/
|
19 |
*/
|
| 20 |
|
20 |
|
| 21 |
@Entity
|
21 |
@Entity
|
| 22 |
@Table(name = "transaction.`order`", schema = "transaction")
|
22 |
@Table(name = "transaction.`order`", schema = "transaction")
|
| 23 |
@NamedQueries({ @NamedQuery(name = "Order.selectAll", query = "select o from Order o"),
|
23 |
@NamedQueries({@NamedQuery(name = "Order.selectAll", query = "select o from Order o"),
|
| 24 |
@NamedQuery(name = "Order.selectById", query = "select o from Order o where o.id= :id"),
|
24 |
@NamedQuery(name = "Order.selectById", query = "select o from Order o where o.id= :id"),
|
| 25 |
@NamedQuery(name = "Order.selectByTransactionId", query = "select t.id, t.createTimestamp, o.retailerAddress1, o.retailerAddress2, o.retailerCity, "
|
25 |
@NamedQuery(name = "Order.selectByTransactionId", query = "select t.id, t.createTimestamp, o.retailerAddress1, o.retailerAddress2, o.retailerCity, "
|
| 26 |
+ "o.retailerPinCode, o.retailerState, o.shippingCost, o.statusDescription, o.invoiceNumber, o.airwayBillNumber, o.totalAmount, li.brand, li.modelName, "
|
26 |
+ "o.retailerPinCode, o.retailerState, o.shippingCost, o.statusDescription, o.invoiceNumber, o.airwayBillNumber, o.totalAmount, li.brand, li.modelName, "
|
| 27 |
+ "li.modelNumber, li.color, li.quantity, li.unitPrice, p.id, p.name, o.shippingTimestamp, o.status, o.promisedDeliveryTime, o.retailerName, t.status, i.catalogItemId from Transaction t join Order o on o.transactionId = t.id "
|
27 |
+ "li.modelNumber, li.color, li.quantity, li.unitPrice, p.id, p.name, o.shippingTimestamp, o.status, o.promisedDeliveryTime, o.retailerName, t.status, i.catalogItemId from Transaction t join Order o on o.transactionId = t.id "
|
| 28 |
+ "join LineItem li on li.orderId = o.id left join Provider p on p.id = o.logisticsProviderId join Item i on i.id=li.itemId where o.transactionId = :transactionId"),
|
28 |
+ "join LineItem li on li.orderId = o.id left join Provider p on p.id = o.logisticsProviderId join Item i on i.id=li.itemId where o.transactionId = :transactionId"),
|
| Line 40... |
Line 40... |
| 40 |
+ " sum(case when concat(year(o.billingTimestamp), month(o.billingTimestamp))= :mtd then li.quantity else 0 end),"
|
40 |
+ " sum(case when concat(year(o.billingTimestamp), month(o.billingTimestamp))= :mtd then li.quantity else 0 end),"
|
| 41 |
+ " sum(case when o.billingTimestamp between :lmtdStartDate and :lmtdEndDate then li.quantity else 0 end),"
|
41 |
+ " sum(case when o.billingTimestamp between :lmtdStartDate and :lmtdEndDate then li.quantity else 0 end),"
|
| 42 |
+ " sum(case when o.billingTimestamp between :lmtdStartDate and :lmsEndDate then li.quantity else 0 end)"
|
42 |
+ " sum(case when o.billingTimestamp between :lmtdStartDate and :lmsEndDate then li.quantity else 0 end)"
|
| 43 |
+ " )"
|
43 |
+ " )"
|
| 44 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
|
44 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
|
| 45 |
+ " and o.billingTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and fs.internal = 0 group by li.brand"),
|
45 |
+ " and o.billingTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and fs.internal = false group by li.brand"),
|
| 46 |
|
46 |
|
| 47 |
@NamedQuery(name = "Order.selectAllBilledOrderGroupByBrandFofoId", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(li.brand,"
|
47 |
@NamedQuery(name = "Order.selectAllBilledOrderGroupByBrandFofoId", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(li.brand,"
|
| 48 |
+ " DATE_FORMAT(o.billingTimestamp, '%m-%Y'),sum(cast(o.totalAmount AS integer)))"
|
48 |
+ " DATE_FORMAT(o.billingTimestamp, '%m-%Y'),sum(cast(o.totalAmount AS integer)))"
|
| 49 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
|
49 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
|
| 50 |
+ " and o.billingTimestamp >= :startDate and o.retailerId =:fofoId group by li.brand,DATE_FORMAT(o.billingTimestamp, '%m-%Y')"),
|
50 |
+ " and o.billingTimestamp >= :startDate and o.retailerId =:fofoId group by li.brand,DATE_FORMAT(o.billingTimestamp, '%m-%Y')"),
|
| Line 60... |
Line 60... |
| 60 |
+ " and o.billingTimestamp >= :startDate and o.billingTimestamp < :endDate and (null is :brand or li.brand = :brand) and fs.internal = 0 group by fs.warehouseId, date(o.billingTimestamp), li.brand"),
|
60 |
+ " and o.billingTimestamp >= :startDate and o.billingTimestamp < :endDate and (null is :brand or li.brand = :brand) and fs.internal = 0 group by fs.warehouseId, date(o.billingTimestamp), li.brand"),
|
| 61 |
|
61 |
|
| 62 |
@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
62 |
@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
| 63 |
+ " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)"
|
63 |
+ " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)"
|
| 64 |
+ " 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.status in (7,9,10,12)"
|
64 |
+ " 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.status in (7,9,10,12)"
|
| 65 |
+ " and date(o.billingTimestamp) in :date and fs.warehouseId in :warehouseId and li.brand = :brand and fs.internal = 0 order by li.itemId desc"),
|
65 |
+ " and date(o.billingTimestamp) in :date and fs.warehouseId in :warehouseId and li.brand = :brand and fs.internal = false order by li.itemId desc"),
|
| 66 |
|
66 |
|
| 67 |
@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
67 |
@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, "
|
| 68 |
+ " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)"
|
68 |
+ " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)"
|
| 69 |
+ " 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.status in (7,9,10,12)"
|
69 |
+ " 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.status in (7,9,10,12)"
|
| 70 |
+ " and o.billingTimestamp >= :startDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc"),
|
70 |
+ " and o.billingTimestamp >= :startDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc"),
|
| Line 80... |
Line 80... |
| 80 |
+ " and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId group by i.id"),
|
80 |
+ " and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId group by i.id"),
|
| 81 |
|
81 |
|
| 82 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
|
82 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
|
| 83 |
+ " fs.warehouseId,fs.id,sum(li.quantity )) from FofoStore fs join Order o on fs.id = o.retailerId "
|
83 |
+ " fs.warehouseId,fs.id,sum(li.quantity )) from FofoStore fs join Order o on fs.id = o.retailerId "
|
| 84 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
84 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
| 85 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = 1 and fs.internal = 0 and"
|
85 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = false and fs.internal = true and"
|
| 86 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
86 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
| 87 |
+ " and i.catalogItemId in :catalogItemId group by fs.id"),
|
87 |
+ " and i.catalogItemId in :catalogItemId group by fs.id"),
|
| 88 |
|
88 |
|
| 89 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
|
89 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
|
| 90 |
+ " fs.warehouseId,fs.id,sum(case when li.quantity is null then 0 else li.quantity end))"
|
90 |
+ " fs.warehouseId,fs.id,sum(case when li.quantity is null then 0 else li.quantity end))"
|
| 91 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
91 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
| 92 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
92 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
| 93 |
+ " join Item i on i.id = tl.itemId where "
|
93 |
+ " join Item i on i.id = tl.itemId where "
|
| 94 |
+ " fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId group by fs.id"),
|
94 |
+ " fs.active = false and fs.internal = true and o.status in (3,4) and i.catalogItemId in :catalogItemId group by fs.id"),
|
| 95 |
|
95 |
|
| 96 |
@NamedQuery(name = "Order.selectGrnPendingOrdersByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
|
96 |
@NamedQuery(name = "Order.selectGrnPendingOrdersByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
|
| 97 |
+ " fs.warehouseId,fs.id,i.catalogItemId,sum(li.quantity )) from FofoStore fs join Order o on fs.id = o.retailerId "
|
97 |
+ " fs.warehouseId,fs.id,i.catalogItemId,sum(li.quantity )) from FofoStore fs join Order o on fs.id = o.retailerId "
|
| 98 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
98 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
| 99 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = 1 and fs.internal = 0 and"
|
99 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = true and fs.internal = false and"
|
| 100 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
100 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
| 101 |
+ " and i.catalogItemId in :catalogItemId and fs.warehouseId in :warehouseId group by i.catalogItemId, fs.id"),
|
101 |
+ " and i.catalogItemId in :catalogItemId and fs.warehouseId in :warehouseId group by i.catalogItemId, fs.id"),
|
| 102 |
|
102 |
|
| 103 |
@NamedQuery(name = "Order.selectPendingIndentOrdersByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
|
103 |
@NamedQuery(name = "Order.selectPendingIndentOrdersByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
|
| 104 |
+ " fs.warehouseId,fs.id,i.catalogItemId,sum(case when li.quantity is null then 0 else li.quantity end))"
|
104 |
+ " fs.warehouseId,fs.id,i.catalogItemId,sum(case when li.quantity is null then 0 else li.quantity end))"
|
| 105 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
105 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
| 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 = true and fs.internal = false 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 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 = true and fs.internal = false and"
|
| 117 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
117 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
| 118 |
+ " and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
|
118 |
+ " and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
|
| 119 |
|
119 |
|
| 120 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
120 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
| 121 |
+ " fs.warehouseId, fs.id,sum(case when li.quantity is null then 0 else li.quantity end),i.brand,i.modelName,i.modelNumber,i.catalogItemId)"
|
121 |
+ " fs.warehouseId, fs.id,sum(case when li.quantity is null then 0 else li.quantity end),i.brand,i.modelName,i.modelNumber,i.catalogItemId)"
|
| 122 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
122 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
| 123 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
123 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
| 124 |
+ " join Item i on i.id = tl.itemId where "
|
124 |
+ " join Item i on i.id = tl.itemId where "
|
| 125 |
+ " 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"),
|
125 |
+ " fs.active = true and fs.internal = false 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"),
|
| 126 |
|
126 |
|
| 127 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
127 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
| 128 |
+ " 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 "
|
128 |
+ " 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 "
|
| 129 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
129 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
| 130 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = true and fs.internal = 0 and"
|
130 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = true and fs.internal = false and"
|
| 131 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
131 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
| 132 |
+ " and i.catalogItemId in :catalogItemId and i.categoryId=10006 and fs.id = :fofoId group by i.catalogItemId, i.brand,i.modelName,i.modelNumber"),
|
132 |
+ " and i.catalogItemId in :catalogItemId and i.categoryId=10006 and fs.id = :fofoId group by i.catalogItemId, i.brand,i.modelName,i.modelNumber"),
|
| 133 |
|
133 |
|
| 134 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
134 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
| 135 |
+ " fs.warehouseId, fs.id, sum(li.quantity), i.brand, i.modelName, i.modelNumber, i.catalogItemId)"
|
135 |
+ " fs.warehouseId, fs.id, sum(li.quantity), i.brand, i.modelName, i.modelNumber, i.catalogItemId)"
|
| 136 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
136 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
| 137 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
137 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
| 138 |
+ " join Item i on i.id = tl.itemId where "
|
138 |
+ " join Item i on i.id = tl.itemId where "
|
| 139 |
+ " fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId and i.categoryId=10006 and fs.id = :fofoId group by i.catalogItemId, i.brand,i.modelName,i.modelNumber"),
|
139 |
+ " fs.active = true and fs.internal = false and o.status in (3,4) and i.catalogItemId in :catalogItemId and i.categoryId=10006 and fs.id = :fofoId group by i.catalogItemId, i.brand,i.modelName,i.modelNumber"),
|
| 140 |
|
140 |
|
| 141 |
@NamedQuery(name = "Order.selectGroupByBrandLmp", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(li.brand,"
|
141 |
@NamedQuery(name = "Order.selectGroupByBrandLmp", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(li.brand,"
|
| 142 |
+ " DATE_FORMAT(o.billingTimestamp,:groupParameter ),sum(cast(o.totalAmount AS integer)))"
|
142 |
+ " DATE_FORMAT(o.billingTimestamp,:groupParameter ),sum(cast(o.totalAmount AS integer)))"
|
| 143 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
|
143 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.status in (7,9,10,12)"
|
| 144 |
+ " and (o.billingTimestamp between :lmsStartDate and :endDate) and fs.id in :fofoId and fs.warehouseId in :warehouseId and fs.internal = 0 group by li.brand,DATE_FORMAT(o.billingTimestamp, :groupParameter)"),
|
144 |
+ " and (o.billingTimestamp between :lmsStartDate and :endDate) and fs.id in :fofoId and fs.warehouseId in :warehouseId and fs.internal = false group by li.brand,DATE_FORMAT(o.billingTimestamp, :groupParameter)"),
|
| 145 |
|
145 |
|
| 146 |
@NamedQuery(name = "Order.selectGrnPendingOrderQtyByCatalogId", query = "select sum(case when li.quantity is null then 0 else li.quantity end)"
|
146 |
@NamedQuery(name = "Order.selectGrnPendingOrderQtyByCatalogId", query = "select sum(case when li.quantity is null then 0 else li.quantity end)"
|
| 147 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId "
|
147 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId "
|
| 148 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
148 |
+ " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId "
|
| 149 |
+ " join Item i on (i.id = tl.itemId ) where " + " fs.active = 1 and fs.internal = 0 and"
|
149 |
+ " join Item i on (i.id = tl.itemId ) where fs.active = true and fs.internal = false and"
|
| 150 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
150 |
+ " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null"
|
| 151 |
+ " and i.catalogItemId = :catalogItemId and fs.id = :fofoId group by i.catalogItemId, fs.id"),
|
151 |
+ " and i.catalogItemId = :catalogItemId and fs.id = :fofoId group by i.catalogItemId, fs.id"),
|
| 152 |
|
152 |
|
| 153 |
@NamedQuery(name = "Order.selectPendingIndentOrderQtyByCatalogId", query = "select sum(case when li.quantity is null then 0 else li.quantity end)"
|
153 |
@NamedQuery(name = "Order.selectPendingIndentOrderQtyByCatalogId", query = "select sum(case when li.quantity is null then 0 else li.quantity end)"
|
| 154 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
154 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId"
|
| 155 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
155 |
+ " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId "
|
| 156 |
+ " join Item i on i.id = tl.itemId where "
|
156 |
+ " join Item i on i.id = tl.itemId where "
|
| 157 |
+ " fs.active = 1 and fs.internal = 0 and o.status in (3,4)and i.catalogItemId = :catalogItemId and fs.id = :fofoId group by i.catalogItemId, fs.id"),
|
157 |
+ " fs.active = true and fs.internal = false and o.status in (3,4)and i.catalogItemId = :catalogItemId and fs.id = :fofoId group by i.catalogItemId, fs.id"),
|
| 158 |
|
158 |
|
| 159 |
@NamedQuery(name = "Order.selectTodayOrders", query = "select new com.spice.profitmandi.dao.model.BrandRegionPOModel("
|
159 |
@NamedQuery(name = "Order.selectTodayOrders", query = "select new com.spice.profitmandi.dao.model.BrandRegionPOModel("
|
| 160 |
+ " case when (pr.regionId is not null) then pr.regionId else fs.warehouseId end , li.brand, "
|
160 |
+ " case when (pr.regionId is not null) then pr.regionId else fs.warehouseId end , li.brand, "
|
| 161 |
+ " sum(case when (o.createTimestamp between :startDate and :endDate) then cast(o.totalAmount AS integer ) else 0 end),"
|
161 |
+ " sum(case when (o.createTimestamp between :startDate and :endDate) then cast(o.totalAmount AS integer ) else 0 end),"
|
| 162 |
+ " sum(case when (o.billingTimestamp is not null and (o.createTimestamp between :startDate and :endDate)) then cast(o.totalAmount AS integer) else 0 end),"
|
162 |
+ " sum(case when (o.billingTimestamp is not null and (o.createTimestamp between :startDate and :endDate)) then cast(o.totalAmount AS integer) else 0 end),"
|
| 163 |
+ " sum(case when o.billingTimestamp is not null then cast(o.totalAmount AS integer ) else 0 end))"
|
163 |
+ " sum(case when o.billingTimestamp is not null then cast(o.totalAmount AS integer ) else 0 end))"
|
| 164 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId"
|
164 |
+ " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId"
|
| 165 |
+ " left join PartnerRegion pr on pr.fofoId=o.retailerId and pr.regionId=18"
|
165 |
+ " left join PartnerRegion pr on pr.fofoId=o.retailerId and pr.regionId=18"
|
| 166 |
+ " where o.refundTimestamp is null and ((o.createTimestamp between :startDate and :endDate) or (o.billingTimestamp between :startDate and :endDate)) and fs.internal = 0 and li.brand not in ('Smartdukaan','Dummy')"
|
166 |
+ " where o.refundTimestamp is null and ((o.createTimestamp between :startDate and :endDate) or (o.billingTimestamp between :startDate and :endDate)) and fs.internal = false and li.brand not in ('Smartdukaan','Dummy')"
|
| 167 |
+ " group by case when (pr.regionId is not null) then pr.regionId else fs.warehouseId end, li.brand"),
|
167 |
+ " group by case when (pr.regionId is not null) then pr.regionId else fs.warehouseId end, li.brand"),
|
| 168 |
|
168 |
|
| 169 |
@NamedQuery(name = "Order.selectAllPendingIndentAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvFofoIdModel("
|
169 |
@NamedQuery(name = "Order.selectAllPendingIndentAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvFofoIdModel("
|
| 170 |
+ " o.retailerId, SUM(case when c.parentCategoryId = 10011 then CAST(o.totalAmount AS integer) else 0 end), SUM(case when c.parentCategoryId = 14200 then CAST(o.totalAmount AS integer) else 0 end))"
|
170 |
+ " o.retailerId, SUM(case when c.parentCategoryId = 10011 then CAST(o.totalAmount AS integer) else 0 end), SUM(case when c.parentCategoryId = 14200 then CAST(o.totalAmount AS integer) else 0 end))"
|
| 171 |
+ " from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join Category c on c.id = i.categoryId "
|
171 |
+ " from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join Category c on c.id = i.categoryId "
|
| Line 174... |
Line 174... |
| 174 |
@NamedQuery(name = "Order.selectAllGrnPendingAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvFofoIdModel("
|
174 |
@NamedQuery(name = "Order.selectAllGrnPendingAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvFofoIdModel("
|
| 175 |
+ " o.retailerId, SUM(case when c.parentCategoryId = 10011 then CAST(o.totalAmount AS integer) else 0 end), SUM(case when c.parentCategoryId = 14200 then CAST(o.totalAmount AS integer) else 0 end))"
|
175 |
+ " o.retailerId, SUM(case when c.parentCategoryId = 10011 then CAST(o.totalAmount AS integer) else 0 end), SUM(case when c.parentCategoryId = 14200 then CAST(o.totalAmount AS integer) else 0 end))"
|
| 176 |
+ " from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join Category c on c.id = i.categoryId "
|
176 |
+ " from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId join Category c on c.id = i.categoryId "
|
| 177 |
+ " where o.retailerId in :fofoIds and o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null and i.categoryId != 10006 group by o.retailerId"),
|
177 |
+ " where o.retailerId in :fofoIds and o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null and i.categoryId != 10006 group by o.retailerId"),
|
| 178 |
|
178 |
|
| - |
|
179 |
@NamedQuery(name = "Order.selectPartnersBilledBetweenDates", query = "select new com.spice.profitmandi.dao.model.PartnerSecondaryModel(fs.warehouseId, fs.id, count(o.id), sum(o.totalAmount) )" +
|
| - |
|
180 |
" from FofoStore fs left join Order o on (fs.id=o.retailerId and o.billingTimestamp between :startDate and :endDate " +
|
| - |
|
181 |
" and o.refundTimestamp is null) where" +
|
| - |
|
182 |
" fs.internal = false and (fs.active= true or o.retailerId is not null) group by fs.warehouseId, fs.id"),
|
| - |
|
183 |
|
| 179 |
@NamedQuery(name = "Order.selectCollectionSummary", query = "select new com.spice.profitmandi.dao.model.CollectionSummary(pot.createTimestamp, "
|
184 |
@NamedQuery(name = "Order.selectCollectionSummary", query = "select new com.spice.profitmandi.dao.model.CollectionSummary(pot.createTimestamp, "
|
| 180 |
+ " pot.referenceType,sum(case when po.name = 'CASH' then cast(pot.amount As int) else 0 end),"
|
185 |
+ " pot.referenceType,sum(case when po.name = 'CASH' then cast(pot.amount As int) else 0 end),"
|
| 181 |
+ " sum(case when po.name = 'PINELABS' then cast(pot.amount As int) else 0 end),"
|
186 |
+ " sum(case when po.name = 'PINELABS' then cast(pot.amount As int) else 0 end),"
|
| 182 |
+ " sum(case when po.name = 'BAJAJ FINSERV' then cast(pot.amount As int) else 0 end),"
|
187 |
+ " sum(case when po.name = 'BAJAJ FINSERV' then cast(pot.amount As int) else 0 end),"
|
| 183 |
+ " sum(case when po.name = 'HOME CREDIT' then cast(pot.amount As int) else 0 end),"
|
188 |
+ " sum(case when po.name = 'HOME CREDIT' then cast(pot.amount As int) else 0 end),"
|
| Line 217... |
Line 222... |
| 217 |
@ColumnResult(name = "id", type = Integer.class),
|
222 |
@ColumnResult(name = "id", type = Integer.class),
|
| 218 |
@ColumnResult(name = "brand", type = String.class),
|
223 |
@ColumnResult(name = "brand", type = String.class),
|
| 219 |
@ColumnResult(name = "secondary_plan", type = Long.class),
|
224 |
@ColumnResult(name = "secondary_plan", type = Long.class),
|
| 220 |
@ColumnResult(name = "total_price", type = Long.class),
|
225 |
@ColumnResult(name = "total_price", type = Long.class),
|
| 221 |
@ColumnResult(name = "auth_id", type = Integer.class),
|
226 |
@ColumnResult(name = "auth_id", type = Integer.class),
|
| 222 |
@ColumnResult(name = "commited_timestamp", type = LocalDateTime.class) }) }),
|
227 |
@ColumnResult(name = "commited_timestamp", type = LocalDateTime.class)})}),
|
| 223 |
|
228 |
|
| 224 |
@SqlResultSetMapping(name = "PriceDropReportModel", classes = {
|
229 |
@SqlResultSetMapping(name = "PriceDropReportModel", classes = {
|
| 225 |
@ConstructorResult(targetClass = PriceDropReportModel.class, columns = {
|
230 |
@ConstructorResult(targetClass = PriceDropReportModel.class, columns = {
|
| 226 |
@ColumnResult(name = "code", type = String.class),
|
231 |
@ColumnResult(name = "code", type = String.class),
|
| 227 |
@ColumnResult(name = "id", type = Integer.class),
|
232 |
@ColumnResult(name = "id", type = Integer.class),
|
| Line 232... |
Line 237... |
| 232 |
@ColumnResult(name = "amount", type = Float.class),
|
237 |
@ColumnResult(name = "amount", type = Float.class),
|
| 233 |
@ColumnResult(name = "partner_payout", type = Float.class),
|
238 |
@ColumnResult(name = "partner_payout", type = Float.class),
|
| 234 |
@ColumnResult(name = "imei", type = String.class),
|
239 |
@ColumnResult(name = "imei", type = String.class),
|
| 235 |
@ColumnResult(name = "status", type = String.class),
|
240 |
@ColumnResult(name = "status", type = String.class),
|
| 236 |
@ColumnResult(name = "update_timestamp", type = LocalDateTime.class),
|
241 |
@ColumnResult(name = "update_timestamp", type = LocalDateTime.class),
|
| 237 |
@ColumnResult(name = "rejection_reason", type = String.class), }) })
|
242 |
@ColumnResult(name = "rejection_reason", type = String.class),})})
|
| 238 |
|
243 |
|
| 239 |
})
|
244 |
})
|
| 240 |
|
245 |
|
| 241 |
public class Order implements Serializable {
|
246 |
public class Order implements Serializable {
|
| 242 |
|
247 |
|
| 243 |
private static final long serialVersionUID = 1L;
|
248 |
private static final long serialVersionUID = 1L;
|
| 244 |
|
- |
|
| 245 |
public Order() {
|
- |
|
| 246 |
}
|
- |
|
| 247 |
|
- |
|
| 248 |
@Id
|
249 |
@Id
|
| 249 |
@Column(name = "id", unique = true, updatable = false)
|
250 |
@Column(name = "id", unique = true, updatable = false)
|
| 250 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
251 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
| 251 |
private Integer id;
|
252 |
private Integer id;
|
| 252 |
|
- |
|
| 253 |
@Column(name = "warehouse_id")
|
253 |
@Column(name = "warehouse_id")
|
| 254 |
private Integer warehouseId;
|
254 |
private Integer warehouseId;
|
| 255 |
|
- |
|
| 256 |
@Column(name = "seller_id")
|
255 |
@Column(name = "seller_id")
|
| 257 |
private Integer sellerId;
|
256 |
private Integer sellerId;
|
| 258 |
|
- |
|
| 259 |
@Column(name = "warehouse_address_id")
|
257 |
@Column(name = "warehouse_address_id")
|
| 260 |
private Integer warehouseAddressId;
|
258 |
private Integer warehouseAddressId;
|
| 261 |
|
- |
|
| 262 |
@Column(name = "logistics_provider_id")
|
259 |
@Column(name = "logistics_provider_id")
|
| 263 |
private Integer logisticsProviderId;
|
260 |
private Integer logisticsProviderId;
|
| 264 |
|
- |
|
| 265 |
@Column(name = "airwaybill_no", length = 50)
|
261 |
@Column(name = "airwaybill_no", length = 50)
|
| 266 |
private String airwayBillNumber;
|
262 |
private String airwayBillNumber;
|
| 267 |
|
- |
|
| 268 |
@Column(name = "tracking_id", length = 50)
|
263 |
@Column(name = "tracking_id", length = 50)
|
| 269 |
private String trackingId;
|
264 |
private String trackingId;
|
| 270 |
|
- |
|
| 271 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
265 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 272 |
@Column(name = "expected_delivery_time")
|
266 |
@Column(name = "expected_delivery_time")
|
| 273 |
private LocalDateTime expectedDeliveryTime;
|
267 |
private LocalDateTime expectedDeliveryTime;
|
| 274 |
|
- |
|
| 275 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
268 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 276 |
@Column(name = "promised_delivery_time")
|
269 |
@Column(name = "promised_delivery_time")
|
| 277 |
private LocalDateTime promisedDeliveryTime;
|
270 |
private LocalDateTime promisedDeliveryTime;
|
| 278 |
|
- |
|
| 279 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
271 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 280 |
@Column(name = "expected_shipping_time")
|
272 |
@Column(name = "expected_shipping_time")
|
| 281 |
private LocalDateTime expectedShippingTime;
|
273 |
private LocalDateTime expectedShippingTime;
|
| 282 |
|
- |
|
| 283 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
274 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 284 |
@Column(name = "promised_shipping_time")
|
275 |
@Column(name = "promised_shipping_time")
|
| 285 |
private LocalDateTime promisedShippingTime;
|
276 |
private LocalDateTime promisedShippingTime;
|
| 286 |
|
- |
|
| 287 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
277 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 288 |
@Column(name = "partner_grn_timestamp")
|
278 |
@Column(name = "partner_grn_timestamp")
|
| 289 |
private LocalDateTime partnerGrnTimestamp;
|
279 |
private LocalDateTime partnerGrnTimestamp;
|
| 290 |
|
- |
|
| 291 |
public LocalDateTime getPartnerGrnTimestamp() {
|
- |
|
| 292 |
return partnerGrnTimestamp;
|
- |
|
| 293 |
}
|
- |
|
| 294 |
|
- |
|
| 295 |
public void setPartnerGrnTimestamp(LocalDateTime partnerGrnTimestamp) {
|
- |
|
| 296 |
this.partnerGrnTimestamp = partnerGrnTimestamp;
|
- |
|
| 297 |
}
|
- |
|
| 298 |
|
- |
|
| 299 |
@Transient
|
280 |
@Transient
|
| 300 |
private List<String> returnedImeis;
|
281 |
private List<String> returnedImeis;
|
| 301 |
|
- |
|
| 302 |
public List<String> getReturnedImeis() {
|
- |
|
| 303 |
return returnedImeis;
|
- |
|
| 304 |
}
|
- |
|
| 305 |
|
- |
|
| 306 |
public void setReturnedImeis(List<String> returnedImeis) {
|
- |
|
| 307 |
this.returnedImeis = returnedImeis;
|
- |
|
| 308 |
}
|
- |
|
| 309 |
|
- |
|
| 310 |
@Column(name = "customer_id")
|
282 |
@Column(name = "customer_id")
|
| 311 |
private Integer retailerId;
|
283 |
private Integer retailerId;
|
| 312 |
|
- |
|
| 313 |
@Column(name = "customer_name", length = 50)
|
284 |
@Column(name = "customer_name", length = 50)
|
| 314 |
private String retailerName;
|
285 |
private String retailerName;
|
| 315 |
|
- |
|
| 316 |
@Column(name = "customer_mobilenumber", length = 20)
|
286 |
@Column(name = "customer_mobilenumber", length = 20)
|
| 317 |
private String retailerMobileNumber;
|
287 |
private String retailerMobileNumber;
|
| 318 |
|
- |
|
| 319 |
@Column(name = "customer_pincode", length = 10)
|
288 |
@Column(name = "customer_pincode", length = 10)
|
| 320 |
private String retailerPinCode;
|
289 |
private String retailerPinCode;
|
| 321 |
|
- |
|
| 322 |
@Column(name = "customer_address1", length = 100)
|
290 |
@Column(name = "customer_address1", length = 100)
|
| 323 |
private String retailerAddress1;
|
291 |
private String retailerAddress1;
|
| 324 |
|
- |
|
| 325 |
@Column(name = "customer_address2", length = 100)
|
292 |
@Column(name = "customer_address2", length = 100)
|
| 326 |
private String retailerAddress2;
|
293 |
private String retailerAddress2;
|
| 327 |
|
- |
|
| 328 |
@Column(name = "customer_city", length = 100)
|
294 |
@Column(name = "customer_city", length = 100)
|
| 329 |
private String retailerCity;
|
295 |
private String retailerCity;
|
| 330 |
|
- |
|
| 331 |
@Column(name = "customer_state", length = 100)
|
296 |
@Column(name = "customer_state", length = 100)
|
| 332 |
private String retailerState;
|
297 |
private String retailerState;
|
| 333 |
|
- |
|
| 334 |
@Column(name = "customer_email", length = 50)
|
298 |
@Column(name = "customer_email", length = 50)
|
| 335 |
private String retailerEmailId;
|
299 |
private String retailerEmailId;
|
| 336 |
|
- |
|
| 337 |
@Column(name = "status")
|
300 |
@Column(name = "status")
|
| 338 |
@Enumerated(EnumType.ORDINAL)
|
301 |
@Enumerated(EnumType.ORDINAL)
|
| 339 |
private OrderStatus status;
|
302 |
private OrderStatus status;
|
| 340 |
|
- |
|
| 341 |
@Column(name = "statusDescription", length = 50)
|
303 |
@Column(name = "statusDescription", length = 50)
|
| 342 |
private String statusDescription;
|
304 |
private String statusDescription;
|
| 343 |
|
- |
|
| 344 |
@Column(name = "total_amount")
|
305 |
@Column(name = "total_amount")
|
| 345 |
private Float totalAmount;
|
306 |
private Float totalAmount;
|
| 346 |
|
- |
|
| 347 |
@Column(name = "gvAmount")
|
307 |
@Column(name = "gvAmount")
|
| 348 |
private Float gvAmount;
|
308 |
private Float gvAmount;
|
| 349 |
|
- |
|
| 350 |
@Column(name = "total_weight")
|
309 |
@Column(name = "total_weight")
|
| 351 |
private Float totalWeight;
|
310 |
private Float totalWeight;
|
| 352 |
|
- |
|
| 353 |
@Column(name = "invoice_number", length = 30)
|
311 |
@Column(name = "invoice_number", length = 30)
|
| 354 |
private String invoiceNumber;
|
312 |
private String invoiceNumber;
|
| 355 |
|
- |
|
| 356 |
@Column(name = "billed_by", length = 30)
|
313 |
@Column(name = "billed_by", length = 30)
|
| 357 |
private String billedBy;
|
314 |
private String billedBy;
|
| 358 |
|
- |
|
| 359 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
315 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 360 |
@Column(name = "created_timestamp")
|
316 |
@Column(name = "created_timestamp")
|
| 361 |
private LocalDateTime createTimestamp;
|
317 |
private LocalDateTime createTimestamp;
|
| 362 |
|
- |
|
| 363 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
318 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 364 |
@Column(name = "accepted_timestamp")
|
319 |
@Column(name = "accepted_timestamp")
|
| 365 |
private LocalDateTime acceptedTimestamp;
|
320 |
private LocalDateTime acceptedTimestamp;
|
| 366 |
|
- |
|
| 367 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
321 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 368 |
@Column(name = "billing_timestamp")
|
322 |
@Column(name = "billing_timestamp")
|
| 369 |
private LocalDateTime billingTimestamp;
|
323 |
private LocalDateTime billingTimestamp;
|
| 370 |
|
- |
|
| 371 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
324 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 372 |
@Column(name = "shipping_timestamp")
|
325 |
@Column(name = "shipping_timestamp")
|
| 373 |
private LocalDateTime shippingTimestamp;
|
326 |
private LocalDateTime shippingTimestamp;
|
| 374 |
|
- |
|
| 375 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
327 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 376 |
@Column(name = "pickup_timestamp")
|
328 |
@Column(name = "pickup_timestamp")
|
| 377 |
private LocalDateTime pickupTimestamp;
|
329 |
private LocalDateTime pickupTimestamp;
|
| 378 |
|
- |
|
| 379 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
330 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 380 |
@Column(name = "delivery_timestamp")
|
331 |
@Column(name = "delivery_timestamp")
|
| 381 |
private LocalDateTime deliveryTimestamp;
|
332 |
private LocalDateTime deliveryTimestamp;
|
| 382 |
|
- |
|
| 383 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
333 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 384 |
@Column(name = "outofstock_timestamp")
|
334 |
@Column(name = "outofstock_timestamp")
|
| 385 |
private LocalDateTime outOfStockTimestamp;
|
335 |
private LocalDateTime outOfStockTimestamp;
|
| 386 |
|
- |
|
| 387 |
@Column(name = "transaction_id")
|
336 |
@Column(name = "transaction_id")
|
| 388 |
private Integer transactionId;
|
337 |
private Integer transactionId;
|
| 389 |
|
- |
|
| 390 |
/*
|
- |
|
| 391 |
* @Column(name = "jacket_number", length = 10) private Integer jacketNumber;
|
- |
|
| 392 |
*/
|
- |
|
| 393 |
|
- |
|
| 394 |
@Column(name = "receiver", length = 50)
|
338 |
@Column(name = "receiver", length = 50)
|
| 395 |
private String receiver;
|
339 |
private String receiver;
|
| 396 |
|
- |
|
| 397 |
@Column(name = "batchNo")
|
340 |
@Column(name = "batchNo")
|
| 398 |
private Integer batchNumber;
|
341 |
private Integer batchNumber;
|
| 399 |
|
- |
|
| 400 |
@Column(name = "serialNo")
|
342 |
@Column(name = "serialNo")
|
| 401 |
private Integer serialNumber;
|
343 |
private Integer serialNumber;
|
| 402 |
|
- |
|
| 403 |
@Column(name = "doaFlag", columnDefinition = "tinyInteger(1) default 0")
|
344 |
@Column(name = "doaFlag", columnDefinition = "tinyInteger(1) default 0")
|
| 404 |
private Boolean doaFlag;
|
345 |
private Boolean doaFlag;
|
| 405 |
|
- |
|
| 406 |
@Column(name = "pickupRequestNo")
|
346 |
@Column(name = "pickupRequestNo")
|
| 407 |
private Integer pickupRequestNumber;
|
347 |
private Integer pickupRequestNumber;
|
| 408 |
|
348 |
|
| - |
|
349 |
/*
|
| - |
|
350 |
* @Column(name = "jacket_number", length = 10) private Integer jacketNumber;
|
| - |
|
351 |
*/
|
| 409 |
@Column(name = "new_order_id")
|
352 |
@Column(name = "new_order_id")
|
| 410 |
private Integer newOrderId;
|
353 |
private Integer newOrderId;
|
| 411 |
|
- |
|
| 412 |
@Column(name = "doa_auth_timestamp")
|
354 |
@Column(name = "doa_auth_timestamp")
|
| 413 |
private LocalDateTime doaAuthTimestamp;
|
355 |
private LocalDateTime doaAuthTimestamp;
|
| 414 |
|
- |
|
| 415 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
356 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 416 |
@Column(name = "doa_pickup_timestamp")
|
357 |
@Column(name = "doa_pickup_timestamp")
|
| 417 |
private LocalDateTime doaPickupTimestamp;
|
358 |
private LocalDateTime doaPickupTimestamp;
|
| 418 |
|
- |
|
| 419 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
359 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 420 |
@Column(name = "received_return_timestamp")
|
360 |
@Column(name = "received_return_timestamp")
|
| 421 |
private LocalDateTime receiverReturnTimestamp;
|
361 |
private LocalDateTime receiverReturnTimestamp;
|
| 422 |
|
- |
|
| 423 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
362 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 424 |
@Column(name = "reship_timestamp")
|
363 |
@Column(name = "reship_timestamp")
|
| 425 |
private LocalDateTime reShipTimestamp;
|
364 |
private LocalDateTime reShipTimestamp;
|
| 426 |
|
- |
|
| 427 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
365 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 428 |
@Column(name = "refund_timestamp")
|
366 |
@Column(name = "refund_timestamp")
|
| 429 |
private LocalDateTime refundTimestamp;
|
367 |
private LocalDateTime refundTimestamp;
|
| 430 |
|
- |
|
| 431 |
@Column(name = "purchase_order_id")
|
368 |
@Column(name = "purchase_order_id")
|
| 432 |
private Integer purchaseOrderId;
|
369 |
private Integer purchaseOrderId;
|
| 433 |
|
- |
|
| 434 |
@Column(name = "cod", columnDefinition = "tinyInteger(1) default 0")
|
370 |
@Column(name = "cod", columnDefinition = "tinyInteger(1) default 0")
|
| 435 |
private Boolean cod;
|
371 |
private Boolean cod;
|
| 436 |
|
- |
|
| 437 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
372 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 438 |
@Column(name = "verification_timestamp")
|
373 |
@Column(name = "verification_timestamp")
|
| 439 |
private LocalDateTime verificationTimestamp;
|
374 |
private LocalDateTime verificationTimestamp;
|
| 440 |
|
- |
|
| 441 |
@Column(name = "refunded_by", length = 30)
|
375 |
@Column(name = "refunded_by", length = 30)
|
| 442 |
private String refundBy;
|
376 |
private String refundBy;
|
| 443 |
|
- |
|
| 444 |
@Column(name = "refund_reason", length = 256)
|
377 |
@Column(name = "refund_reason", length = 256)
|
| 445 |
private String refundReason;
|
378 |
private String refundReason;
|
| 446 |
|
- |
|
| 447 |
/*
|
- |
|
| 448 |
* @Column(name = "delay_reason") private DelayReason delayReason;
|
- |
|
| 449 |
*/
|
- |
|
| 450 |
|
- |
|
| 451 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
379 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 452 |
@Column(name = "cod_reconciliation_timestamp")
|
380 |
@Column(name = "cod_reconciliation_timestamp")
|
| 453 |
private LocalDateTime codReconciliationTimestamp;
|
381 |
private LocalDateTime codReconciliationTimestamp;
|
| 454 |
|
- |
|
| 455 |
private Integer previousStatus;
|
382 |
private Integer previousStatus;
|
| 456 |
|
- |
|
| 457 |
@Column(name = "vendorId")
|
383 |
@Column(name = "vendorId")
|
| 458 |
private Integer vendorId;
|
384 |
private Integer vendorId;
|
| 459 |
|
- |
|
| 460 |
@Column(name = "delayReasonText", length = 250)
|
385 |
@Column(name = "delayReasonText", length = 250)
|
| 461 |
private String delayReasonText;
|
386 |
private String delayReasonText;
|
| 462 |
|
- |
|
| 463 |
@Column(name = "doa_logistics_provider_id")
|
387 |
@Column(name = "doa_logistics_provider_id")
|
| 464 |
private Integer doaLogisticsProviderId;
|
388 |
private Integer doaLogisticsProviderId;
|
| 465 |
|
389 |
|
| - |
|
390 |
/*
|
| - |
|
391 |
* @Column(name = "delay_reason") private DelayReason delayReason;
|
| - |
|
392 |
*/
|
| 466 |
@Column(name = "vendor_paid", columnDefinition = "tinyInteger(1) default 0")
|
393 |
@Column(name = "vendor_paid", columnDefinition = "tinyInteger(1) default 0")
|
| 467 |
private Boolean vendorPaid;
|
394 |
private Boolean vendorPaid;
|
| 468 |
|
- |
|
| 469 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
395 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 470 |
@Column(name = "local_connected_timestamp")
|
396 |
@Column(name = "local_connected_timestamp")
|
| 471 |
private LocalDateTime localConnectedTimestamp;
|
397 |
private LocalDateTime localConnectedTimestamp;
|
| 472 |
|
- |
|
| 473 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
398 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 474 |
@Column(name = "reached_destination_timestamp")
|
399 |
@Column(name = "reached_destination_timestamp")
|
| 475 |
private LocalDateTime reachedDestinationTimestamp;
|
400 |
private LocalDateTime reachedDestinationTimestamp;
|
| 476 |
|
- |
|
| 477 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
401 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 478 |
@Column(name = "first_dlvyatmp_timestamp")
|
402 |
@Column(name = "first_dlvyatmp_timestamp")
|
| 479 |
private LocalDateTime firstDlvyatmpTimestamp;
|
403 |
private LocalDateTime firstDlvyatmpTimestamp;
|
| 480 |
|
- |
|
| 481 |
@Column(name = "originalOrderId")
|
404 |
@Column(name = "originalOrderId")
|
| 482 |
private Integer originalOrderId;
|
405 |
private Integer originalOrderId;
|
| 483 |
|
- |
|
| 484 |
@Column(name = "fulfilmentWarehouseId")
|
406 |
@Column(name = "fulfilmentWarehouseId")
|
| 485 |
private Integer fulfilmentWarehouseId;
|
407 |
private Integer fulfilmentWarehouseId;
|
| 486 |
|
- |
|
| 487 |
@Column(name = "orderType")
|
408 |
@Column(name = "orderType")
|
| 488 |
private Integer orderType;
|
409 |
private Integer orderType;
|
| 489 |
|
- |
|
| 490 |
@Column(name = "pickupStoreId")
|
410 |
@Column(name = "pickupStoreId")
|
| 491 |
private Integer pickupStoreId;
|
411 |
private Integer pickupStoreId;
|
| 492 |
|
- |
|
| 493 |
@Column(name = "otg", columnDefinition = "tinyInteger(1) default 0")
|
412 |
@Column(name = "otg", columnDefinition = "tinyInteger(1) default 0")
|
| 494 |
private Boolean otg;
|
413 |
private Boolean otg;
|
| 495 |
|
- |
|
| 496 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
414 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 497 |
@Column(name = "courier_delivery_time")
|
415 |
@Column(name = "courier_delivery_time")
|
| 498 |
private LocalDateTime courierDeliveryTimestamp;
|
416 |
private LocalDateTime courierDeliveryTimestamp;
|
| 499 |
|
- |
|
| 500 |
@Column(name = "insurer")
|
417 |
@Column(name = "insurer")
|
| 501 |
private Integer insurer;
|
418 |
private Integer insurer;
|
| 502 |
|
- |
|
| 503 |
@Column(name = "insuranceAmount")
|
419 |
@Column(name = "insuranceAmount")
|
| 504 |
private Float insuranceAmount;
|
420 |
private Float insuranceAmount;
|
| 505 |
|
- |
|
| 506 |
@Column(name = "freebieItemId")
|
421 |
@Column(name = "freebieItemId")
|
| 507 |
private Integer freebieItemId;
|
422 |
private Integer freebieItemId;
|
| 508 |
|
- |
|
| 509 |
@Column(name = "source")
|
423 |
@Column(name = "source")
|
| 510 |
private Integer source;
|
424 |
private Integer source;
|
| 511 |
|
- |
|
| 512 |
@Column(name = "advanceAmount")
|
425 |
@Column(name = "advanceAmount")
|
| 513 |
private Float advanceAmount;
|
426 |
private Float advanceAmount;
|
| 514 |
|
- |
|
| 515 |
@Column(name = "storeId")
|
427 |
@Column(name = "storeId")
|
| 516 |
private Integer storeId;
|
428 |
private Integer storeId;
|
| 517 |
|
- |
|
| 518 |
@Column(name = "productCondition")
|
429 |
@Column(name = "productCondition")
|
| 519 |
private Integer productCondition;
|
430 |
private Integer productCondition;
|
| 520 |
|
- |
|
| 521 |
@Column(name = "dataProtectionInsurer")
|
431 |
@Column(name = "dataProtectionInsurer")
|
| 522 |
private Integer dataProtectionInsurer;
|
432 |
private Integer dataProtectionInsurer;
|
| 523 |
|
- |
|
| 524 |
@Column(name = "dataProtectionAmount")
|
433 |
@Column(name = "dataProtectionAmount")
|
| 525 |
private Integer dataProtectionAmount;
|
434 |
private Integer dataProtectionAmount;
|
| 526 |
|
- |
|
| 527 |
@Column(name = "taxType")
|
435 |
@Column(name = "taxType")
|
| 528 |
@Enumerated(EnumType.ORDINAL)
|
436 |
@Enumerated(EnumType.ORDINAL)
|
| 529 |
private TaxType taxType;
|
437 |
private TaxType taxType;
|
| 530 |
|
- |
|
| 531 |
@Column(name = "logisticsTransactionId", length = 100)
|
438 |
@Column(name = "logisticsTransactionId", length = 100)
|
| 532 |
private String logisticsTransactionId;
|
439 |
private String logisticsTransactionId;
|
| 533 |
|
- |
|
| 534 |
@Column(name = "shippingCost")
|
440 |
@Column(name = "shippingCost")
|
| 535 |
private Float shippingCost;
|
441 |
private Float shippingCost;
|
| 536 |
|
- |
|
| 537 |
@Column(name = "codCharges")
|
442 |
@Column(name = "codCharges")
|
| 538 |
private Float codCharges;
|
443 |
private Float codCharges;
|
| 539 |
|
- |
|
| 540 |
@Column(name = "wallet_amount")
|
444 |
@Column(name = "wallet_amount")
|
| 541 |
private Float walletAmount;
|
445 |
private Float walletAmount;
|
| 542 |
|
- |
|
| 543 |
@Column(name = "net_payable_amount")
|
446 |
@Column(name = "net_payable_amount")
|
| 544 |
private Float netPayableAmount;
|
447 |
private Float netPayableAmount;
|
| 545 |
|
- |
|
| 546 |
@Column(name = "shippingRefund")
|
448 |
@Column(name = "shippingRefund")
|
| 547 |
private Float shippingRefund;
|
449 |
private Float shippingRefund;
|
| 548 |
|
- |
|
| 549 |
@Column(name = "irn_generated")
|
450 |
@Column(name = "irn_generated")
|
| 550 |
private Boolean irnGenerated;
|
451 |
private Boolean irnGenerated;
|
| 551 |
|
- |
|
| 552 |
@Column(name = "shipment_hold")
|
452 |
@Column(name = "shipment_hold")
|
| 553 |
private Boolean shipmentHold;
|
453 |
private Boolean shipmentHold;
|
| 554 |
|
- |
|
| 555 |
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
454 |
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
| 556 |
@JoinColumn(name = "id", insertable = false, updatable = false, nullable = false, referencedColumnName = "order_id")
|
455 |
@JoinColumn(name = "id", insertable = false, updatable = false, nullable = false, referencedColumnName = "order_id")
|
| 557 |
private LineItem lineItem;
|
456 |
private LineItem lineItem;
|
| 558 |
|
457 |
|
| - |
|
458 |
public Order() {
|
| - |
|
459 |
}
|
| - |
|
460 |
|
| - |
|
461 |
public LocalDateTime getPartnerGrnTimestamp() {
|
| - |
|
462 |
return partnerGrnTimestamp;
|
| - |
|
463 |
}
|
| - |
|
464 |
|
| - |
|
465 |
public void setPartnerGrnTimestamp(LocalDateTime partnerGrnTimestamp) {
|
| - |
|
466 |
this.partnerGrnTimestamp = partnerGrnTimestamp;
|
| - |
|
467 |
}
|
| - |
|
468 |
|
| - |
|
469 |
public List<String> getReturnedImeis() {
|
| - |
|
470 |
return returnedImeis;
|
| - |
|
471 |
}
|
| - |
|
472 |
|
| - |
|
473 |
public void setReturnedImeis(List<String> returnedImeis) {
|
| - |
|
474 |
this.returnedImeis = returnedImeis;
|
| - |
|
475 |
}
|
| - |
|
476 |
|
| 559 |
public Integer getId() {
|
477 |
public Integer getId() {
|
| 560 |
return id;
|
478 |
return id;
|
| 561 |
}
|
479 |
}
|
| 562 |
|
480 |
|
| 563 |
public void setId(Integer id) {
|
481 |
public void setId(Integer id) {
|