| 21716 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.transaction;
|
| 21545 |
ashik.ali |
2 |
|
| 29966 |
amit.gupta |
3 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
| 35155 |
ranu |
4 |
import com.spice.profitmandi.dao.model.*;
|
| 33396 |
amit.gupta |
5 |
import com.spice.profitmandi.model.WarehouseItemQtyModel;
|
| 29966 |
amit.gupta |
6 |
import in.shop2020.model.v1.order.OrderStatus;
|
|
|
7 |
import in.shop2020.model.v1.order.TaxType;
|
|
|
8 |
|
| 32417 |
amit.gupta |
9 |
import javax.persistence.*;
|
|
|
10 |
import java.io.Serializable;
|
|
|
11 |
import java.time.LocalDateTime;
|
|
|
12 |
import java.time.format.DateTimeFormatter;
|
|
|
13 |
import java.util.List;
|
|
|
14 |
|
| 21545 |
ashik.ali |
15 |
/**
|
|
|
16 |
* This class basically contains order details
|
| 29966 |
amit.gupta |
17 |
*
|
| 21545 |
ashik.ali |
18 |
* @author ashikali
|
|
|
19 |
*/
|
| 21634 |
ashik.ali |
20 |
|
| 21545 |
ashik.ali |
21 |
@Entity
|
| 31860 |
tejbeer |
22 |
@Table(name = "transaction.`order`")
|
|
|
23 |
@NamedQueries({@NamedQuery(name = "Order.selectAll", query = "select o from Order o"), @NamedQuery(name = "Order.selectById", query = "select o from Order o where o.id= :id"), @NamedQuery(name = "Order.selectByTransactionId", query = "select t.id, t.createTimestamp, o.retailerAddress1, o.retailerAddress2, o.retailerCity, " + "o.retailerPinCode, o.retailerState, o.shippingCost, o.statusDescription, o.invoiceNumber, o.airwayBillNumber, o.totalAmount, li.brand, li.modelName, " + "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 " + "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"),
|
| 33873 |
ranu |
24 |
@NamedQuery(name = "Order.partnerStockPoAndGrnPending",
|
|
|
25 |
query = "select new com.spice.profitmandi.dao.model.PoAndGrnPendingPartnerStockModel" +
|
|
|
26 |
"(li.itemId, odr.partnerGrnTimestamp, odr.billingTimestamp) " +
|
|
|
27 |
"FROM Order odr " +
|
|
|
28 |
"JOIN LineItem li on li.orderId = odr.id " +
|
|
|
29 |
"WHERE odr.retailerId = (:fofoId) " +
|
|
|
30 |
"AND odr.refundTimestamp is null " +
|
|
|
31 |
"AND (odr.billingTimestamp is null OR (odr.billingTimestamp is not null AND odr.partnerGrnTimestamp is null))"),
|
| 27723 |
tejbeer |
32 |
|
| 31860 |
tejbeer |
33 |
@NamedQuery(name = "Order.selectItemIdTypeQuantity", query = "select new com.spice.profitmandi.dao.model.ItemIdTypeQuantity(li.itemId, i.type, li.quantity) from Order o join LineItem li on li.orderId = o.id join Item i on i.id = li.itemId where o.invoiceNumber = :invoiceNumber and o.retailerId = :retailerId"),
|
| 27723 |
tejbeer |
34 |
|
| 31860 |
tejbeer |
35 |
@NamedQuery(name = "Order.selectAllBilledOrderGroupByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderBillingModel(li.brand, " + "sum(case when o.billingTimestamp >= :today then CAST(o.totalAmount AS integer) else 0 end)," + "sum(case when o.billingTimestamp >= :threedays and o.billingTimestamp < :endDate then CAST(o.totalAmount AS integer) else 0 end)," + "sum(case when concat(year(o.billingTimestamp ), month(o.billingTimestamp ))= :mtd then CAST(o.totalAmount AS integer) else 0 end)," + "sum(case when o.billingTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(o.totalAmount AS integer) else 0 end)," + "sum(case when o.billingTimestamp between :lmtdStartDate and :lmsEndDate then CAST(o.totalAmount AS integer) else 0 end)," + " sum(case when o.billingTimestamp >= :today then li.quantity else 0 end)," + " sum(case when o.billingTimestamp >= :threedays and o.billingTimestamp < :endDate then li.quantity else 0 end)," + " sum(case when concat(year(o.billingTimestamp), month(o.billingTimestamp))= :mtd then li.quantity else 0 end)," + " sum(case when o.billingTimestamp between :lmtdStartDate and :lmtdEndDate then li.quantity else 0 end)," + " sum(case when o.billingTimestamp between :lmtdStartDate and :lmsEndDate then li.quantity else 0 end)" + " )" + " 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)" + " and o.billingTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and fs.internal = false group by li.brand"),
|
| 27723 |
tejbeer |
36 |
|
| 31860 |
tejbeer |
37 |
@NamedQuery(name = "Order.selectAllBilledOrderGroupByBrandFofoId", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(li.brand," + " DATE_FORMAT(o.billingTimestamp, '%m-%Y'),sum(cast(o.totalAmount AS integer)))" + " 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)" + " and o.billingTimestamp >= :startDate and o.retailerId =:fofoId group by li.brand,DATE_FORMAT(o.billingTimestamp, '%m-%Y')"),
|
| 28439 |
tejbeer |
38 |
|
| 34849 |
ranu |
39 |
@NamedQuery(name = "Order.selectAllBilledByCategoryOrderGroupByBrandFofoId", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(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 =:fofoId and i.categoryId in (:categoryIds) group by li.brand,DATE_FORMAT(o.billingTimestamp, '%m-%Y')"),
|
| 34721 |
ranu |
40 |
|
| 33430 |
amit.gupta |
41 |
@NamedQuery(name = "Order.selectSecondaryGroupByYearMonth", query = "select new com.spice.profitmandi.dao.model.PartnerMonthlySaleModel(o.retailerId," + " DATE_FORMAT(o.billingTimestamp, '%m-%Y'),sum(cast(o.totalAmount AS integer)))" + " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId where o.billingTimestamp between :startDate and :endDate and o.retailerId in :fofoIds group by o.retailerId, DATE_FORMAT(o.billingTimestamp, '%m-%Y')"),
|
| 31361 |
amit.gupta |
42 |
|
| 31860 |
tejbeer |
43 |
@NamedQuery(name = "Order.selectAllBilledOrderGroupByBrandWarehouse", query = "select new com.spice.profitmandi.dao.model.SecondaryWarehouseWiseOrderBilllingModel(fs.warehouseId,date(o.billingTimestamp), li.brand, " + "sum(CAST(o.totalAmount AS integer)),sum( li.quantity))" + " 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)" + " 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"),
|
| 27867 |
tejbeer |
44 |
|
| 31860 |
tejbeer |
45 |
@NamedQuery(name = "Order.selectAllBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, " + " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)" + " 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)" + " and date(o.billingTimestamp) in :date and fs.warehouseId in :warehouseId and li.brand = :brand and fs.internal = false order by li.itemId desc"),
|
| 27738 |
tejbeer |
46 |
|
| 31860 |
tejbeer |
47 |
@NamedQuery(name = "Order.selectTodayBilledOrderItemByBrand", query = "select new com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel(o.retailerName,li.brand,i.modelName, " + " i.modelNumber, i.color," + "o.totalAmount," + " li.quantity)" + " 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)" + " and o.billingTimestamp >= :startDate and fs.warehouseId in :warehouseId and li.brand in :brand order by li.itemId desc"),
|
| 27738 |
tejbeer |
48 |
|
| 31860 |
tejbeer |
49 |
@NamedQuery(name = "Order.selectAllBilledOrderBrandByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockBrandModel(li.brand," + " Sum(li.quantity),Sum(CAST(o.totalAmount AS integer)))" + " from Order o join LineItem li on o.id = li.orderId where o.status in (7,9,10,12)" + " and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId group by li.brand"),
|
| 27893 |
tejbeer |
50 |
|
| 31860 |
tejbeer |
51 |
@NamedQuery(name = "Order.selectAllBilledOrderBrandItemByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockBrandItemModel(" + " i.brand, i.modelName, i.modelNumber, i.color,Sum(li.quantity), Sum(CAST(o.totalAmount AS integer)))" + " from Order o join LineItem li on o.id = li.orderId join Item i on i.id = li.itemId where o.status in (7,9,10,12)" + " and o.billingTimestamp >= :startDate and o.billingTimestamp <= :endDate and o.retailerId = :fofoId group by i.id"),
|
| 27893 |
tejbeer |
52 |
|
| 31860 |
tejbeer |
53 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel(" + " fs.warehouseId,fs.id,sum(li.quantity )) from FofoStore fs join Order o on fs.id = o.retailerId " + " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId " + " join Item i on (i.id = tl.itemId ) where " + " fs.active = false and fs.internal = true and" + " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + " and i.catalogItemId in :catalogItemId group by fs.id"),
|
| 28004 |
tejbeer |
54 |
|
| 31860 |
tejbeer |
55 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel(" + " fs.warehouseId,fs.id,sum(case when li.quantity is null then 0 else li.quantity end))" + " from FofoStore fs join Order o on fs.id = o.retailerId" + " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId " + " join Item i on i.id = tl.itemId where " + " fs.active = false and fs.internal = true and o.status in (3,4) and i.catalogItemId in :catalogItemId group by fs.id"),
|
| 28004 |
tejbeer |
56 |
|
| 31860 |
tejbeer |
57 |
@NamedQuery(name = "Order.selectGrnPendingOrdersByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel(" + " fs.warehouseId,fs.id,i.catalogItemId,sum(li.quantity )) from FofoStore fs join Order o on fs.id = o.retailerId " + " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId " + " join Item i on (i.id = tl.itemId ) where " + " fs.active = true and fs.internal = false and" + " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + " and i.catalogItemId in :catalogItemId and fs.warehouseId in :warehouseId group by i.catalogItemId, fs.id"),
|
| 28474 |
tejbeer |
58 |
|
| 31860 |
tejbeer |
59 |
@NamedQuery(name = "Order.selectPendingIndentOrdersByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel(" + " fs.warehouseId,fs.id,i.catalogItemId,sum(case when li.quantity is null then 0 else li.quantity end))" + " from FofoStore fs join Order o on fs.id = o.retailerId" + " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId " + " join Item i on i.id = tl.itemId where " + " 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"),
|
| 28474 |
tejbeer |
60 |
|
| 31860 |
tejbeer |
61 |
@NamedQuery(name = "Order.selectFirstBilling", query = "select new com.spice.profitmandi.dao.model.FofoFirstBillingModel(fs.id, min(o.billingTimestamp) )" + " from FofoStore fs join Order o on fs.id = o.retailerId group by fs.id"),
|
| 30673 |
amit.gupta |
62 |
|
| 31860 |
tejbeer |
63 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel(" + " 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 " + " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId " + " join Item i on (i.id = tl.itemId ) where fs.active = true and fs.internal = false and" + " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + " and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
|
| 28004 |
tejbeer |
64 |
|
| 34813 |
aman |
65 |
// query = "select o.*,tl.sellingPrice as tlSellingPrice" +
|
|
|
66 |
// "from FofoStore fs " +
|
|
|
67 |
@NamedQuery(
|
|
|
68 |
name = "Order.selectGrnPendingByFofoIdForAllMobile",
|
|
|
69 |
query = "select o " +
|
|
|
70 |
"from FofoStore fs " +
|
|
|
71 |
"join Order o on fs.id = o.retailerId " +
|
|
|
72 |
"join LineItem li on o.id = li.orderId " +
|
|
|
73 |
"join TagListing tl on tl.itemId = li.itemId " +
|
|
|
74 |
"join Item i on i.id = tl.itemId " +
|
|
|
75 |
"where fs.active = true and fs.internal = false " +
|
|
|
76 |
"and fs.id = :fofoId " +
|
|
|
77 |
"and o.billingTimestamp is not null " +
|
|
|
78 |
"and o.refundTimestamp is null " +
|
|
|
79 |
"and o.partnerGrnTimestamp is null " +
|
|
|
80 |
"and i.categoryId = 10006 " +
|
|
|
81 |
"group by o.id"
|
|
|
82 |
),
|
| 31860 |
tejbeer |
83 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel(" + " 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)" + " from FofoStore fs join Order o on fs.id = o.retailerId" + " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId " + " join Item i on i.id = tl.itemId where " + " 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"),
|
| 28004 |
tejbeer |
84 |
|
| 31860 |
tejbeer |
85 |
@NamedQuery(name = "Order.selectAllGrnPendingOrderItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel(" + " 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 " + " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId " + " join Item i on (i.id = tl.itemId ) where " + " fs.active = true and fs.internal = false and" + " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + " and i.catalogItemId in :catalogItemId and i.categoryId=10006 and fs.id = :fofoId group by i.catalogItemId, i.brand,i.modelName,i.modelNumber"),
|
| 28032 |
tejbeer |
86 |
|
| 31860 |
tejbeer |
87 |
@NamedQuery(name = "Order.selectAllPendingIndentOrderItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel(" + " 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" + " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId " + " join Item i on i.id = tl.itemId where " + " 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"),
|
| 28032 |
tejbeer |
88 |
|
| 31860 |
tejbeer |
89 |
@NamedQuery(name = "Order.selectGroupByBrandLmp", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(li.brand," + " DATE_FORMAT(o.billingTimestamp,:groupParameter ),sum(cast(o.totalAmount AS integer)))" + " 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)" + " 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)"),
|
| 28461 |
tejbeer |
90 |
|
| 31860 |
tejbeer |
91 |
@NamedQuery(name = "Order.selectGrnPendingOrderQtyByCatalogId", query = "select sum(case when li.quantity is null then 0 else li.quantity end)" + " from FofoStore fs join Order o on fs.id = o.retailerId " + " join LineItem li on o.id = li.orderId join TagListing tl on tl.itemId = li.itemId " + " join Item i on (i.id = tl.itemId ) where fs.active = true and fs.internal = false and" + " o.billingTimestamp is not null and o.refundTimestamp is null and o.partnerGrnTimestamp is null" + " and i.catalogItemId = :catalogItemId and fs.id = :fofoId group by i.catalogItemId, fs.id"),
|
| 28486 |
tejbeer |
92 |
|
| 31860 |
tejbeer |
93 |
@NamedQuery(name = "Order.selectPendingIndentOrderQtyByCatalogId", query = "select sum(case when li.quantity is null then 0 else li.quantity end)" + " from FofoStore fs join Order o on fs.id = o.retailerId" + " join LineItem li on o.id = li.orderId " + " join TagListing tl on tl.itemId = li.itemId " + " join Item i on i.id = tl.itemId where " + " 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"),
|
| 28486 |
tejbeer |
94 |
|
| 33947 |
ranu |
95 |
@NamedQuery(name = "Order.selectTodayOrders", query = "select new com.spice.profitmandi.dao.model.BrandRegionPOModel(" + " case when (pr.regionId is not null) then pr.regionId else fs.warehouseId end , li.brand, " + " sum(case when (o.createTimestamp between :startDate and :endDate and o.refundTimestamp is null) then cast(o.totalAmount AS integer ) else 0 end)," + " sum(case when (o.billingTimestamp is not null and (o.createTimestamp between :startDate and :endDate)) then cast(o.totalAmount AS integer) else 0 end)," + " sum(case when o.billingTimestamp is not null then cast(o.totalAmount AS integer ) else 0 end))" + " from Order o join LineItem li on o.id = li.orderId join FofoStore fs on fs.id = o.retailerId" + " left join PartnerRegion pr on pr.fofoId=o.retailerId and pr.regionId=18" + " 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')" + " group by case when (pr.regionId is not null) then pr.regionId else fs.warehouseId end, li.brand"),
|
| 35155 |
ranu |
96 |
/* @NamedQuery(name = "Order.selectTodayOrdersRBM", query = "select new com.spice.profitmandi.dao.model.BrandAuthUserPOModel( p.authUserId," +
|
|
|
97 |
" li.brand," +
|
|
|
98 |
" sum(case" +
|
|
|
99 |
" when (o.createTimestamp between :startDate and :endDate and o.refundTimestamp is null) then cast(o.totalAmount AS integer )" +
|
|
|
100 |
" else 0 end)," +
|
|
|
101 |
" sum(case" +
|
|
|
102 |
" when o.billingTimestamp is not null and (o.createTimestamp between :startDate and :endDate)" +
|
|
|
103 |
" then cast(o.totalAmount AS integer )" +
|
|
|
104 |
" else 0 end)," +
|
| 33801 |
amit.gupta |
105 |
" sum(case when o.billingTimestamp is not null then cast(o.totalAmount AS integer ) else 0 end)," +
|
| 35155 |
ranu |
106 |
" cast (count(distinct o.retailerId) as int))" +
|
|
|
107 |
"from Order o" +
|
|
|
108 |
" join LineItem li" +
|
|
|
109 |
" on o.id = li.orderId" +
|
|
|
110 |
" join FofoStore fs on fs.id = o.retailerId" +
|
|
|
111 |
" join PartnerPosition pp on pp.fofoId = o.retailerId" +
|
|
|
112 |
" join Position p on p.id = pp.positionId" +
|
|
|
113 |
"where o.refundTimestamp is null" +
|
|
|
114 |
" and ((o.createTimestamp between :startDate and :endDate) or (o.billingTimestamp between :startDate and :endDate))" +
|
|
|
115 |
" and fs.internal = false" +
|
|
|
116 |
" and p.categoryId = :categoryId" +
|
|
|
117 |
" and p.escalationType = :escalationType" +
|
|
|
118 |
" and li.brand not in ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo')" +
|
| 35154 |
ranu |
119 |
"group by p.authUserId, li.brand"),
|
| 35155 |
ranu |
120 |
*/
|
|
|
121 |
@NamedQuery(name = "Order.selectTodayPartnersBilledRBM", query = "select new com.spice.profitmandi.dao.model.AuthIdPartnerCountModel( p.authUserId," +
|
|
|
122 |
" cast (count(distinct o.retailerId) as int))" +
|
|
|
123 |
"from Order o" +
|
|
|
124 |
" join LineItem li" +
|
|
|
125 |
" on o.id = li.orderId" +
|
|
|
126 |
" join FofoStore fs on fs.id = o.retailerId" +
|
|
|
127 |
" join PartnerPosition pp on pp.fofoId = o.retailerId" +
|
|
|
128 |
" join Position p on p.id = pp.positionId" +
|
|
|
129 |
" where o.refundTimestamp is null" +
|
|
|
130 |
" and (o.createTimestamp between :startDate and :endDate)" +
|
|
|
131 |
" and fs.internal = false" +
|
|
|
132 |
" and p.categoryId = 18" +
|
|
|
133 |
" and p.escalationType = 'L1'" +
|
|
|
134 |
" and li.brand not in ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo')" +
|
| 33805 |
amit.gupta |
135 |
"group by p.authUserId"),
|
|
|
136 |
|
| 31860 |
tejbeer |
137 |
@NamedQuery(name = "Order.selectAllPendingIndentAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvFofoIdModel(" + " 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))" + " 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 " + " where o.retailerId in :fofoIds and o.status in (3,4) and i.categoryId != 10006 group by o.retailerId"),
|
| 30003 |
tejbeer |
138 |
|
| 35490 |
ranu |
139 |
@NamedQuery(name = "Order.selectAllQtyPendingIndentAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvQtyFofoIdModel(" + " o.retailerId, SUM(case when c.parentCategoryId = 10011 then CAST(li.quantity AS integer) else 0 end), SUM(case when c.parentCategoryId = 14200 then CAST(li.quantity AS integer) else 0 end))" + " 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 " + " where o.retailerId in :fofoIds and o.status in (3,4) and i.categoryId != 10006 group by o.retailerId"),
|
|
|
140 |
|
| 31860 |
tejbeer |
141 |
@NamedQuery(name = "Order.selectAllGrnPendingAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvFofoIdModel(" + " 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))" + " 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 " + " 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"),
|
| 30003 |
tejbeer |
142 |
|
| 35490 |
ranu |
143 |
@NamedQuery(name = "Order.selectAllQtyGrnPendingAccessoriesTvGroupByFofoId", query = "select new com.spice.profitmandi.dao.model.InStockAccessoriesTvQtyFofoIdModel(" + " o.retailerId, SUM(case when c.parentCategoryId = 10011 then CAST(li.quantity AS integer) else 0 end), SUM(case when c.parentCategoryId = 14200 then CAST(li.quantity AS integer) else 0 end))" + " 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 " + " 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"),
|
|
|
144 |
|
| 31860 |
tejbeer |
145 |
@NamedQuery(name = "Order.selectPartnersBilledBetweenDates", query = "select new com.spice.profitmandi.dao.model.PartnerSecondaryModel(fs.warehouseId, fs.id, count(o.id), sum(o.totalAmount) )" + " from FofoStore fs left join Order o on (fs.id=o.retailerId and o.billingTimestamp between :startDate and :endDate " + " and o.refundTimestamp is null) where" + " fs.internal = false and (fs.active= true or o.retailerId is not null) group by fs.warehouseId, fs.id"),
|
| 31539 |
amit.gupta |
146 |
|
| 31860 |
tejbeer |
147 |
@NamedQuery(name = "Order.selectCollectionSummary", query = "select new com.spice.profitmandi.dao.model.CollectionSummary(pot.createTimestamp, " + " pot.referenceType,sum(case when po.name = 'CASH' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'PINELABS' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'BAJAJ FINSERV' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'HOME CREDIT' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'PAYTM' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'CAPITAL FIRST' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'ZEST MONEY' then cast(pot.amount As int) else 0 end)," + " sum(case when po.name = 'SAMSUNG SURE' then cast(pot.amount As int) else 0 end),sum(cast(pot.amount As int)))" + " from PaymentOptionTransaction pot join PaymentOption po on pot.paymentOptionId=po.id join com.spice.profitmandi.dao.entity.user.User u on u.id=pot.fofoId" + " join Address a on a.id=u.addressId where 1=1 and pot.fofoId = :fofoId and pot.createTimestamp between :startDate and :endDate " + " group by (pot.createTimestamp), pot.referenceType "),
|
| 30279 |
tejbeer |
148 |
|
| 31860 |
tejbeer |
149 |
|
| 34641 |
ranu |
150 |
@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)"),
|
| 31860 |
tejbeer |
151 |
|
| 32478 |
amit.gupta |
152 |
@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"),
|
| 34715 |
ranu |
153 |
|
|
|
154 |
@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"),
|
|
|
155 |
|
| 33189 |
amit.gupta |
156 |
@NamedQuery(name = "Order.selectOrdersByBilledDateCatalogId",
|
|
|
157 |
query = "select new com.spice.profitmandi.common.model.GrnPendingDataModel(" +
|
|
|
158 |
"o.retailerId, fs.code, o.retailerName, o.invoiceNumber, o.billingTimestamp, l.itemId, l.brand, l.modelName, l.modelNumber, l.color, " +
|
|
|
159 |
"l.unitPrice, lii.serialNumber, v.name, wi.created, ai.activationTimestamp, ai.createTimestamp)" +
|
| 31860 |
tejbeer |
160 |
|
| 33189 |
amit.gupta |
161 |
"from Order o join FofoStore fs on fs.id = o.retailerId" +
|
|
|
162 |
" join LineItem l on l.orderId = o.id" +
|
|
|
163 |
" join LineItemImei lii on lii.lineItemId = l.id" +
|
|
|
164 |
" join Warehouse w on w.id = o.fulfilmentWarehouseId" +
|
|
|
165 |
" join Vendor v on v.id = w.vendor" +
|
|
|
166 |
" join WarehouseInventoryItem wi on wi.serialNumber = lii.serialNumber" +
|
|
|
167 |
" join WarehouseScan ws on (ws.orderId = o.id and ws.type = 'SALE' and wi.id = ws.inventoryItemId)" +
|
| 33202 |
amit.gupta |
168 |
" join Item i on i.id=l.itemId " +
|
|
|
169 |
" left join ActivatedImei ai on ai.serialNumber = lii.serialNumber " +
|
|
|
170 |
"where fs.internal=false and i.catalogItemId=:catalogId and o.billingTimestamp >= :startDate " +
|
|
|
171 |
"and (:endDate is null or o.billingTimestamp < :endDate) and (o.refundTimestamp is null or o.refundTimestamp <= :endDate)"),
|
| 33443 |
ranu |
172 |
@NamedQuery(
|
|
|
173 |
name = "Order.selectAllLiveDemoBrandItemsByBillingDate",
|
|
|
174 |
query = "select new com.spice.profitmandi.dao.model.LiveDemoOrderLineItemModel (" +
|
|
|
175 |
"o.id, " +
|
|
|
176 |
"o.invoiceNumber, " +
|
|
|
177 |
"o.billingTimestamp, " +
|
|
|
178 |
"o.retailerName, " +
|
|
|
179 |
"o.retailerCity, " +
|
|
|
180 |
"o.retailerPinCode, " +
|
|
|
181 |
"o.retailerState, " +
|
|
|
182 |
"lii.serialNumber, " +
|
|
|
183 |
"li.modelNumber, " +
|
|
|
184 |
"li.modelName, " +
|
|
|
185 |
"li.brand," +
|
|
|
186 |
"li.itemId )" +
|
|
|
187 |
"FROM Order o JOIN LineItem li on o.id = li.orderId " +
|
|
|
188 |
"JOIN LineItemImei lii on li.id = lii.lineItemId " +
|
|
|
189 |
"WHERE li.brand = 'Live Demo' " +
|
|
|
190 |
"AND o.billingTimestamp between :startDate and :endDate"
|
| 33464 |
ranu |
191 |
),
|
|
|
192 |
|
|
|
193 |
@NamedQuery(
|
|
|
194 |
name = "Order.selectTodayPocoBilling",
|
|
|
195 |
query = "select new com.spice.profitmandi.dao.model.LiveDemoOrderLineItemModel (" +
|
|
|
196 |
"o.id, " +
|
|
|
197 |
"o.invoiceNumber, " +
|
|
|
198 |
"o.billingTimestamp, " +
|
|
|
199 |
"o.retailerName, " +
|
|
|
200 |
"o.retailerCity, " +
|
|
|
201 |
"o.retailerPinCode, " +
|
|
|
202 |
"o.retailerState, " +
|
|
|
203 |
"lii.serialNumber, " +
|
|
|
204 |
"li.modelNumber, " +
|
|
|
205 |
"li.modelName, " +
|
|
|
206 |
"li.brand," +
|
|
|
207 |
"li.itemId )" +
|
|
|
208 |
"FROM Order o JOIN LineItem li on o.id = li.orderId " +
|
|
|
209 |
"JOIN LineItemImei lii on li.id = lii.lineItemId " +
|
|
|
210 |
"JOIN FofoStore fs on fs.id=o.retailerId "+
|
|
|
211 |
"WHERE li.brand = 'POCO' " +
|
|
|
212 |
"AND fs.internal = false " +
|
|
|
213 |
"AND o.billingTimestamp between :startDate and :endDate"
|
| 33443 |
ranu |
214 |
)
|
| 32478 |
amit.gupta |
215 |
|
| 33189 |
amit.gupta |
216 |
|
| 33443 |
ranu |
217 |
|
| 21545 |
ashik.ali |
218 |
})
|
| 30110 |
tejbeer |
219 |
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where o.id = '1694173'", resultClass = Order.class)
|
|
|
220 |
|
| 30161 |
manish |
221 |
@NamedNativeQueries({
|
| 30110 |
tejbeer |
222 |
|
| 31860 |
tejbeer |
223 |
@NamedNativeQuery(name = "Order.selectAllOrderWeight", query = "select i.catalog_item_id from transaction.`order` o join transaction.lineitem li on o.id = li.order_id " + "join catalog.item i on i.id = li.item_id " + "where date(o.created_timestamp) between :startDate and :endDate and o.status = 12 and i.hsnCode = '85171300' and i.brand != 'Live Demo'" + " group by i.catalog_item_id order by sum((datediff(now(),o.created_timestamp)/30)*li.quantity) desc"),
|
| 31604 |
tejbeer |
224 |
|
| 35631 |
ranu |
225 |
@NamedNativeQuery(name = "selectPartnerSecondaryGroupByBrand", query = "select ifnull(a.customer_id,fs.id) as id,ifnull(a.sb,brand) as brand,a.secondary_plan,sum(a.total_price) as total_price,a.auth_id, a.commited_timestamp from " + "fofo.fofo_store fs left join (select o.customer_id , li.brand as sb, li.total_price, psp.fofo_id , psp.brand, psp.secondary_plan,psp.auth_id,psp.commited_timestamp from transaction.`order` o join transaction.lineitem li on " + "(o.id = li.order_id) left join auth.partner_secondary_plan psp on (psp.fofo_id = o.customer_id and psp.commited_timestamp >= :startDate and " + "psp.active = 1 and psp.brand = li.brand ) where o.customer_id in :fofoIds and o.status in (7,9,10,12) and o.billing_timestamp >= :startDate and o.billing_timestamp < :nextDate" + " union select if(li.brand is null, null, o.customer_id) as customer_id, li.brand as sb, li.total_price, psp.fofo_id , psp.brand, psp.secondary_plan,psp.auth_id, psp.commited_timestamp " + " from auth.partner_secondary_plan psp left join transaction.`order` o on (psp.fofo_id = o.customer_id and o.status in (7,9,10,12) and o.billing_timestamp >= :startDate and o.billing_timestamp < :nextDate) " + "left join transaction.lineitem li on (o.id = li.order_id and psp.brand=li.brand) where psp.fofo_id in :fofoIds and psp.commited_timestamp >= :startDate " + "and psp.active = 1) a on fs.id = a.customer_id or fs.id = a.fofo_id where fs.id in :fofoIds group by id,brand;", resultSetMapping = "partnerSecondaryPlanModel"),
|
| 30161 |
manish |
226 |
|
| 33145 |
tejus.loha |
227 |
@NamedNativeQuery(name = "selectPriceDropReport", query = "select fs.code, pd.id, ci.brand,ci.model_name,"
|
|
|
228 |
+ " ci.model_number,pd.affected_on, pd.amount, pd.partner_payout, pdi.imei, pdi.status, pdi.update_timestamp, pdi.rejection_reason,pdi.credit_timestamp,pdi.reject_timestamp"
|
|
|
229 |
+ " from transaction.price_drop pd join transaction.price_drop_imei pdi on pdi.price_drop_id = pd.id "
|
|
|
230 |
+ " join (select catalog_item_id, brand, model_name, model_number from catalog.item group by catalog_item_id )"
|
|
|
231 |
+ " ci on ci.catalog_item_id=pd.catalog_id join fofo.fofo_store fs on fs.id=pdi.retailer_id where pdi.retailer_id = :fofoId and pd.affected_on between :startDate and :endDate and pd.amount > 0;",
|
|
|
232 |
resultSetMapping = "PriceDropReportModel"),
|
| 30279 |
tejbeer |
233 |
|
| 32044 |
tejbeer |
234 |
@NamedNativeQuery(name = "Order.selectCreateToBillingAvg", query = "select o.customer_id, avg(DATEDIFF(o.billing_timestamp,o.created_timestamp)) as average from transaction.`order` o join fofo.fofo_store fs on o.customer_id = fs.id where date(o.created_timestamp) between :startDate and :endDate and o.billing_timestamp is not null and fs.internal = 0 group by o.customer_id", resultSetMapping = "BillingDaysAvg"),
|
| 31860 |
tejbeer |
235 |
|
| 32044 |
tejbeer |
236 |
@NamedNativeQuery(name = "Order.selectBillingToDeliverAvg", query = "select o.customer_id, avg(DATEDIFF(o.delivery_timestamp,o.billing_timestamp)) as average from transaction.`order` o join fofo.fofo_store fs on o.customer_id = fs.id where date(o.created_timestamp) between :startDate and :endDate and o.billing_timestamp is not null and o.delivery_timestamp is not null and fs.internal = 0 group by o.customer_id", resultSetMapping = "BillingDaysAvg"),
|
|
|
237 |
|
|
|
238 |
|
|
|
239 |
@NamedNativeQuery(name = "Order.getLastOrders", query = "select o.customer_id, Max(o.created_timestamp) as maxdate from transaction.`order` o join fofo.fofo_store fs on fs.id = o.customer_id where o.status in (7,9,10,12) and o.delivery_timestamp is not null and fs.internal = 0 group by o.customer_id", resultSetMapping = "LastSaleDays"),
|
|
|
240 |
|
| 33396 |
amit.gupta |
241 |
@NamedNativeQuery(name = "Order.itemAvailability", query = "select grouped.item_id, " +
|
|
|
242 |
" grouped.vendor_warehouse_id, " +
|
|
|
243 |
" sum(grouped.availability) as availability, " +
|
|
|
244 |
" sum(grouped.reserved) as reserved, " +
|
|
|
245 |
" sum(grouped.availability - grouped.reserved) as net_availability " +
|
|
|
246 |
"from (select l.item_id, " +
|
|
|
247 |
" o.fulfilmentWarehouseId as vendor_warehouse_id, " +
|
|
|
248 |
" 0 as availability, " +
|
|
|
249 |
" sum(l.quantity) as reserved " +
|
|
|
250 |
" from fofo.fofo_store fs " +
|
|
|
251 |
" join transaction.order o on o.customer_id = fs.id " +
|
|
|
252 |
" join transaction.lineitem l on l.order_id = o.id " +
|
|
|
253 |
" join catalog.item i on i.id = l.item_id " +
|
|
|
254 |
" where o.status in (3, 4) " +
|
|
|
255 |
" and l.item_id in :itemIds " +
|
|
|
256 |
" and o.warehouse_id = :warehouseId " +
|
|
|
257 |
" group by l.item_id, o.warehouse_id, o.fulfilmentWarehouseId " +
|
|
|
258 |
" union " +
|
|
|
259 |
" select ii.itemId AS item_id, " +
|
|
|
260 |
" ii.currentWarehouseId, " +
|
|
|
261 |
" sum((case " +
|
|
|
262 |
" when (s2.type in ('SALE', 'LOST_IN_WAREHOUSE', 'PURCHASE_RETURN', 'MARKED_USED', 'MARKED_BAD')) " +
|
|
|
263 |
" then -(s2.quantity) " +
|
|
|
264 |
" when (s2.type in ('PURCHASE', 'SALE_RET', 'MARKED_GOOD')) then s2.quantity end)) AS availability, " +
|
|
|
265 |
" 0 as reserved " +
|
|
|
266 |
" from ((warehouse.scanNew s1 join warehouse.scanNew s2 " +
|
|
|
267 |
" on ((s1.inventoryItemId = s2.inventoryItemId))) join warehouse.inventoryItem ii " +
|
|
|
268 |
" on ((ii.id = s2.inventoryItemId)) join catalog.item i on i.id = ii.itemId) " +
|
|
|
269 |
" where ((s1.type = 'PURCHASE') and (s1.scannedAt >= '2017-07-01')) " +
|
|
|
270 |
" and ii.itemId in :itemIds " +
|
|
|
271 |
" and ii.physicalWarehouseId = :warehouseId " +
|
|
|
272 |
" group by ii.itemId, ii.currentWarehouseId) as grouped " +
|
|
|
273 |
"group by item_id, vendor_warehouse_id", resultSetMapping = "itemAvailabilityReservationMapping"),
|
| 32044 |
tejbeer |
274 |
|
| 35155 |
ranu |
275 |
@NamedNativeQuery(
|
| 35153 |
ranu |
276 |
name = "Order.selectTodayOrdersRBM",
|
| 35473 |
amit |
277 |
query = "SELECT auth_user_id, brand, " +
|
|
|
278 |
" SUM(today_po_value) AS today_po_value, " +
|
|
|
279 |
" SUM(today_billed_value) AS today_billed_value, " +
|
|
|
280 |
" SUM(total_billed_value) AS total_billed_value, " +
|
|
|
281 |
" COUNT(DISTINCT customer_id) AS partner_count " +
|
|
|
282 |
"FROM ( " +
|
| 35475 |
amit |
283 |
" SELECT p.auth_user_id, li.brand, o.customer_id, " +
|
| 35473 |
amit |
284 |
" CASE WHEN o.refund_timestamp IS NULL THEN o.total_amount ELSE 0 END AS today_po_value, " +
|
|
|
285 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END AS today_billed_value, " +
|
|
|
286 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END AS total_billed_value " +
|
|
|
287 |
" FROM transaction.`order` o " +
|
|
|
288 |
" JOIN transaction.lineitem li ON o.id = li.order_id " +
|
|
|
289 |
" JOIN fofo.fofo_store fs ON fs.id = o.customer_id " +
|
| 35475 |
amit |
290 |
" JOIN cs.partner_position ps ON ps.partner_id = fs.id " +
|
|
|
291 |
" JOIN cs.position p ON p.id = ps.position_id AND p.category_id = :categoryId AND p.escalation_type = :escalationType " +
|
|
|
292 |
" WHERE o.refund_timestamp IS NULL AND o.created_timestamp BETWEEN :startDate AND :endDate " +
|
|
|
293 |
" AND fs.internal = FALSE AND li.brand NOT IN ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo') " +
|
| 35473 |
amit |
294 |
" UNION ALL " +
|
| 35475 |
amit |
295 |
" SELECT p.auth_user_id, li.brand, o.customer_id, 0, 0, " +
|
|
|
296 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END " +
|
| 35473 |
amit |
297 |
" FROM transaction.`order` o " +
|
|
|
298 |
" JOIN transaction.lineitem li ON o.id = li.order_id " +
|
|
|
299 |
" JOIN fofo.fofo_store fs ON fs.id = o.customer_id " +
|
| 35475 |
amit |
300 |
" JOIN cs.partner_position ps ON ps.partner_id = fs.id " +
|
|
|
301 |
" JOIN cs.position p ON p.id = ps.position_id AND p.category_id = :categoryId AND p.escalation_type = :escalationType " +
|
|
|
302 |
" WHERE o.refund_timestamp IS NULL AND o.billing_timestamp BETWEEN :startDate AND :endDate " +
|
| 35473 |
amit |
303 |
" AND o.created_timestamp NOT BETWEEN :startDate AND :endDate " +
|
| 35475 |
amit |
304 |
" AND fs.internal = FALSE AND li.brand NOT IN ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo') " +
|
|
|
305 |
" UNION ALL " +
|
|
|
306 |
" SELECT p.auth_user_id, li.brand, o.customer_id, " +
|
|
|
307 |
" CASE WHEN o.refund_timestamp IS NULL THEN o.total_amount ELSE 0 END, " +
|
|
|
308 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END, " +
|
|
|
309 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END " +
|
|
|
310 |
" FROM transaction.`order` o " +
|
|
|
311 |
" JOIN transaction.lineitem li ON o.id = li.order_id " +
|
|
|
312 |
" JOIN fofo.fofo_store fs ON fs.id = o.customer_id " +
|
|
|
313 |
" JOIN cs.partner_region pr ON pr.fofo_id = fs.id " +
|
|
|
314 |
" JOIN cs.partner_position ps ON ps.partner_id = 0 AND ps.region_id = pr.region_id " +
|
|
|
315 |
" JOIN cs.position p ON p.id = ps.position_id AND p.category_id = :categoryId AND p.escalation_type = :escalationType " +
|
|
|
316 |
" WHERE o.refund_timestamp IS NULL AND o.created_timestamp BETWEEN :startDate AND :endDate " +
|
|
|
317 |
" AND fs.internal = FALSE AND li.brand NOT IN ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo') " +
|
|
|
318 |
" UNION ALL " +
|
|
|
319 |
" SELECT p.auth_user_id, li.brand, o.customer_id, 0, 0, " +
|
|
|
320 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END " +
|
|
|
321 |
" FROM transaction.`order` o " +
|
|
|
322 |
" JOIN transaction.lineitem li ON o.id = li.order_id " +
|
|
|
323 |
" JOIN fofo.fofo_store fs ON fs.id = o.customer_id " +
|
|
|
324 |
" JOIN cs.partner_region pr ON pr.fofo_id = fs.id " +
|
|
|
325 |
" JOIN cs.partner_position ps ON ps.partner_id = 0 AND ps.region_id = pr.region_id " +
|
|
|
326 |
" JOIN cs.position p ON p.id = ps.position_id AND p.category_id = :categoryId AND p.escalation_type = :escalationType " +
|
|
|
327 |
" WHERE o.refund_timestamp IS NULL AND o.billing_timestamp BETWEEN :startDate AND :endDate " +
|
|
|
328 |
" AND o.created_timestamp NOT BETWEEN :startDate AND :endDate " +
|
|
|
329 |
" AND fs.internal = FALSE AND li.brand NOT IN ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo') " +
|
| 35473 |
amit |
330 |
") AS combined " +
|
|
|
331 |
"GROUP BY auth_user_id, brand " +
|
|
|
332 |
"ORDER BY auth_user_id, brand",
|
| 35153 |
ranu |
333 |
resultSetMapping = "TodayPoByAuthUsers"
|
| 35172 |
ranu |
334 |
),
|
|
|
335 |
|
|
|
336 |
@NamedNativeQuery(
|
|
|
337 |
name = "Order.selectTodayOrdersModelWise",
|
|
|
338 |
query = "SELECT o.created_timestamp,o.customer_name,fs.code,fs.warehouse_id, li.brand,concat(i.model_name, ' ', i.model_number) as modal,i.catalog_item_id ,coalesce(cc.status, '-') as status,sum(li.quantity) as quantity," +
|
|
|
339 |
" SUM(" +
|
|
|
340 |
" CASE" +
|
|
|
341 |
" WHEN (o.created_timestamp BETWEEN :startDate AND :endDate and o.refund_timestamp is null)" +
|
|
|
342 |
" AND o.refund_timestamp IS NULL" +
|
|
|
343 |
" THEN o.total_amount" +
|
|
|
344 |
" ELSE 0" +
|
|
|
345 |
" END" +
|
|
|
346 |
" ) AS today_po_value," +
|
|
|
347 |
" SUM(" +
|
|
|
348 |
" CASE" +
|
|
|
349 |
" WHEN o.billing_timestamp IS NOT NULL" +
|
|
|
350 |
" AND (o.created_timestamp BETWEEN :startDate AND :endDate)" +
|
|
|
351 |
" THEN o.total_amount" +
|
|
|
352 |
" ELSE 0" +
|
|
|
353 |
" END" +
|
|
|
354 |
" ) AS today_billed_value" +
|
|
|
355 |
" FROM transaction.`order` o" +
|
|
|
356 |
" JOIN transaction.lineitem li" +
|
|
|
357 |
" ON o.id = li.order_id" +
|
|
|
358 |
" JOIN fofo.fofo_store fs ON fs.id = o.customer_id" +
|
|
|
359 |
" join catalog.item i on i.id = li.item_id" +
|
|
|
360 |
" join catalog.catagoriesd_catalog cc on i.catalog_item_id = cc.catalog_id AND cc.end_date IS NULL" +
|
|
|
361 |
" WHERE o.refund_timestamp IS NULL" +
|
|
|
362 |
" AND (" +
|
|
|
363 |
" (o.created_timestamp BETWEEN :startDate AND :endDate)" +
|
|
|
364 |
" OR (o.billing_timestamp BETWEEN :startDate AND :endDate)" +
|
|
|
365 |
" )" +
|
|
|
366 |
" AND fs.internal = FALSE" +
|
|
|
367 |
" AND fs.active = TRUE" +
|
|
|
368 |
" AND li.brand NOT IN ('Smartdukaan', 'Dummy', 'FOC', 'Live Demo')" +
|
|
|
369 |
"GROUP BY o.customer_id, i.catalog_item_id",
|
|
|
370 |
resultSetMapping = "TodayPoByCatalog"
|
| 35474 |
amit |
371 |
),
|
|
|
372 |
|
|
|
373 |
@NamedNativeQuery(
|
|
|
374 |
name = "Order.selectTodayOrdersNative",
|
|
|
375 |
query = "SELECT " +
|
|
|
376 |
" COALESCE(pr.region_id, fs.warehouse_id) AS warehouse_id, " +
|
|
|
377 |
" combined.brand, " +
|
|
|
378 |
" SUM(combined.today_po_value) AS today_po_value, " +
|
|
|
379 |
" SUM(combined.today_billed_value) AS today_billed_value, " +
|
|
|
380 |
" SUM(combined.total_billed_value) AS total_billed_value " +
|
|
|
381 |
"FROM ( " +
|
|
|
382 |
" SELECT " +
|
|
|
383 |
" o.customer_id, " +
|
|
|
384 |
" li.brand, " +
|
|
|
385 |
" CASE WHEN o.refund_timestamp IS NULL THEN o.total_amount ELSE 0 END AS today_po_value, " +
|
|
|
386 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END AS today_billed_value, " +
|
|
|
387 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END AS total_billed_value " +
|
|
|
388 |
" FROM transaction.`order` o " +
|
|
|
389 |
" JOIN transaction.lineitem li ON o.id = li.order_id " +
|
|
|
390 |
" JOIN fofo.fofo_store fs2 ON fs2.id = o.customer_id " +
|
|
|
391 |
" WHERE o.refund_timestamp IS NULL " +
|
|
|
392 |
" AND o.created_timestamp BETWEEN :startDate AND :endDate " +
|
|
|
393 |
" AND fs2.internal = FALSE " +
|
|
|
394 |
" AND li.brand NOT IN ('Smartdukaan', 'Dummy') " +
|
|
|
395 |
" UNION ALL " +
|
|
|
396 |
" SELECT " +
|
|
|
397 |
" o.customer_id, " +
|
|
|
398 |
" li.brand, " +
|
|
|
399 |
" 0 AS today_po_value, " +
|
|
|
400 |
" 0 AS today_billed_value, " +
|
|
|
401 |
" CASE WHEN o.billing_timestamp IS NOT NULL THEN o.total_amount ELSE 0 END AS total_billed_value " +
|
|
|
402 |
" FROM transaction.`order` o " +
|
|
|
403 |
" JOIN transaction.lineitem li ON o.id = li.order_id " +
|
|
|
404 |
" JOIN fofo.fofo_store fs2 ON fs2.id = o.customer_id " +
|
|
|
405 |
" WHERE o.refund_timestamp IS NULL " +
|
|
|
406 |
" AND o.billing_timestamp BETWEEN :startDate AND :endDate " +
|
|
|
407 |
" AND o.created_timestamp NOT BETWEEN :startDate AND :endDate " +
|
|
|
408 |
" AND fs2.internal = FALSE " +
|
|
|
409 |
" AND li.brand NOT IN ('Smartdukaan', 'Dummy') " +
|
|
|
410 |
") AS combined " +
|
|
|
411 |
"JOIN fofo.fofo_store fs ON fs.id = combined.customer_id " +
|
|
|
412 |
"LEFT JOIN cs.partner_region pr ON pr.fofo_id = combined.customer_id AND pr.region_id = 18 " +
|
|
|
413 |
"GROUP BY COALESCE(pr.region_id, fs.warehouse_id), combined.brand " +
|
|
|
414 |
"ORDER BY warehouse_id, combined.brand",
|
|
|
415 |
resultSetMapping = "TodayPoByRegion"
|
| 35155 |
ranu |
416 |
)
|
| 33396 |
amit.gupta |
417 |
|
| 30161 |
manish |
418 |
})
|
|
|
419 |
|
| 30279 |
tejbeer |
420 |
@SqlResultSetMappings({
|
| 33396 |
amit.gupta |
421 |
@SqlResultSetMapping(name = "itemAvailabilityReservationMapping", classes = {@ConstructorResult(targetClass = WarehouseItemQtyModel.class,
|
|
|
422 |
columns = {@ColumnResult(name = "item_id", type = Integer.class), @ColumnResult(name = "vendor_warehouse_id", type = Integer.class),
|
|
|
423 |
@ColumnResult(name = "availability", type = Integer.class),
|
|
|
424 |
@ColumnResult(name = "reserved", type = Integer.class), @ColumnResult(name = "net_availability", type = Integer.class)})}),
|
| 30161 |
manish |
425 |
|
| 31860 |
tejbeer |
426 |
@SqlResultSetMapping(name = "partnerSecondaryPlanModel", classes = {@ConstructorResult(targetClass = PartnerSecondaryPlanModel.class, columns = {@ColumnResult(name = "id", type = Integer.class), @ColumnResult(name = "brand", type = String.class), @ColumnResult(name = "secondary_plan", type = Long.class), @ColumnResult(name = "total_price", type = Long.class), @ColumnResult(name = "auth_id", type = Integer.class), @ColumnResult(name = "commited_timestamp", type = LocalDateTime.class)})}),
|
| 30279 |
tejbeer |
427 |
|
| 33145 |
tejus.loha |
428 |
@SqlResultSetMapping(name = "PriceDropReportModel", classes = {@ConstructorResult(targetClass = PriceDropReportModel.class, columns = {@ColumnResult(name = "code", type = String.class), @ColumnResult(name = "id", type = Integer.class), @ColumnResult(name = "brand", type = String.class), @ColumnResult(name = "model_name", type = String.class), @ColumnResult(name = "model_number", type = String.class), @ColumnResult(name = "affected_on", type = LocalDateTime.class), @ColumnResult(name = "amount", type = Float.class), @ColumnResult(name = "partner_payout", type = Float.class), @ColumnResult(name = "imei", type = String.class), @ColumnResult(name = "status", type = String.class), @ColumnResult(name = "update_timestamp", type = LocalDateTime.class), @ColumnResult(name = "rejection_reason", type = String.class), @ColumnResult(name = "credit_timestamp", type = LocalDateTime.class), @ColumnResult(name = "reject_timestamp", type = LocalDateTime.class)})}),
|
| 30279 |
tejbeer |
429 |
|
| 32044 |
tejbeer |
430 |
@SqlResultSetMapping(name = "BillingDaysAvg", classes = {@ConstructorResult(targetClass = BillingDaysAvg.class, columns = {@ColumnResult(name = "customer_id", type = Integer.class), @ColumnResult(name = "average", type = Long.class)})}),
|
|
|
431 |
|
| 35153 |
ranu |
432 |
@SqlResultSetMapping(name = "LastSaleDays", classes = {@ConstructorResult(targetClass = LastSaleDateModel.class, columns = {@ColumnResult(name = "customer_id", type = Integer.class), @ColumnResult(name = "maxdate", type = LocalDateTime.class)})}),
|
|
|
433 |
@SqlResultSetMapping(name = "TodayPoByAuthUsers",
|
| 35155 |
ranu |
434 |
classes = @ConstructorResult(
|
|
|
435 |
targetClass = BrandAuthUserPOModel.class,
|
| 35153 |
ranu |
436 |
columns = {
|
| 35155 |
ranu |
437 |
@ColumnResult(name = "auth_user_id", type = Integer.class),
|
| 35153 |
ranu |
438 |
@ColumnResult(name = "brand", type = String.class),
|
| 35155 |
ranu |
439 |
@ColumnResult(name = "today_po_value", type = Long.class),
|
|
|
440 |
@ColumnResult(name = "today_billed_value", type = Long.class),
|
|
|
441 |
@ColumnResult(name = "total_billed_value", type = Long.class),
|
|
|
442 |
@ColumnResult(name = "partner_count", type = Integer.class)
|
|
|
443 |
}
|
|
|
444 |
)
|
| 35172 |
ranu |
445 |
),
|
|
|
446 |
|
|
|
447 |
@SqlResultSetMapping(name = "TodayPoByCatalog",
|
|
|
448 |
classes = @ConstructorResult(
|
|
|
449 |
targetClass = ModelWisePartnerPoModel.class,
|
|
|
450 |
columns = {
|
|
|
451 |
@ColumnResult(name = "created_timestamp", type = LocalDateTime.class),
|
|
|
452 |
@ColumnResult(name = "customer_name", type = String.class),
|
|
|
453 |
@ColumnResult(name = "code", type = String.class),
|
|
|
454 |
@ColumnResult(name = "warehouse_id", type = Integer.class),
|
|
|
455 |
@ColumnResult(name = "brand", type = String.class),
|
|
|
456 |
@ColumnResult(name = "modal", type = String.class),
|
|
|
457 |
@ColumnResult(name = "catalog_item_id", type = Integer.class),
|
|
|
458 |
@ColumnResult(name = "status", type = String.class),
|
|
|
459 |
@ColumnResult(name = "quantity", type = Long.class),
|
|
|
460 |
@ColumnResult(name = "today_po_value", type = Long.class),
|
|
|
461 |
@ColumnResult(name = "today_billed_value", type = Long.class)
|
|
|
462 |
}
|
|
|
463 |
)
|
| 35474 |
amit |
464 |
),
|
|
|
465 |
|
|
|
466 |
@SqlResultSetMapping(name = "TodayPoByRegion",
|
|
|
467 |
classes = @ConstructorResult(
|
|
|
468 |
targetClass = BrandRegionPOModel.class,
|
|
|
469 |
columns = {
|
|
|
470 |
@ColumnResult(name = "warehouse_id", type = Integer.class),
|
|
|
471 |
@ColumnResult(name = "brand", type = String.class),
|
|
|
472 |
@ColumnResult(name = "today_po_value", type = Long.class),
|
|
|
473 |
@ColumnResult(name = "today_billed_value", type = Long.class),
|
|
|
474 |
@ColumnResult(name = "total_billed_value", type = Long.class)
|
|
|
475 |
}
|
|
|
476 |
)
|
| 35155 |
ranu |
477 |
)
|
| 35154 |
ranu |
478 |
|
| 30161 |
manish |
479 |
})
|
|
|
480 |
|
| 35155 |
ranu |
481 |
|
| 27723 |
tejbeer |
482 |
public class Order implements Serializable {
|
|
|
483 |
|
| 31860 |
tejbeer |
484 |
private static final long serialVersionUID = 1L;
|
|
|
485 |
@Id
|
|
|
486 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
487 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
488 |
private Integer id;
|
|
|
489 |
@Column(name = "warehouse_id")
|
|
|
490 |
private Integer warehouseId;
|
|
|
491 |
@Column(name = "seller_id")
|
|
|
492 |
private Integer sellerId;
|
|
|
493 |
@Column(name = "warehouse_address_id")
|
|
|
494 |
private Integer warehouseAddressId;
|
|
|
495 |
@Column(name = "logistics_provider_id")
|
|
|
496 |
private Integer logisticsProviderId;
|
|
|
497 |
@Column(name = "airwaybill_no", length = 50)
|
|
|
498 |
private String airwayBillNumber;
|
|
|
499 |
@Column(name = "tracking_id", length = 50)
|
|
|
500 |
private String trackingId;
|
|
|
501 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
502 |
@Column(name = "expected_delivery_time")
|
|
|
503 |
private LocalDateTime expectedDeliveryTime;
|
|
|
504 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
505 |
@Column(name = "promised_delivery_time")
|
|
|
506 |
private LocalDateTime promisedDeliveryTime;
|
|
|
507 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
508 |
@Column(name = "expected_shipping_time")
|
|
|
509 |
private LocalDateTime expectedShippingTime;
|
|
|
510 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
511 |
@Column(name = "promised_shipping_time")
|
|
|
512 |
private LocalDateTime promisedShippingTime;
|
|
|
513 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
514 |
@Column(name = "partner_grn_timestamp")
|
|
|
515 |
private LocalDateTime partnerGrnTimestamp;
|
|
|
516 |
@Transient
|
|
|
517 |
private List<String> returnedImeis;
|
|
|
518 |
@Column(name = "customer_id")
|
|
|
519 |
private Integer retailerId;
|
|
|
520 |
@Column(name = "customer_name", length = 50)
|
|
|
521 |
private String retailerName;
|
|
|
522 |
@Column(name = "customer_mobilenumber", length = 20)
|
|
|
523 |
private String retailerMobileNumber;
|
|
|
524 |
@Column(name = "customer_pincode", length = 10)
|
|
|
525 |
private String retailerPinCode;
|
|
|
526 |
@Column(name = "customer_address1", length = 100)
|
|
|
527 |
private String retailerAddress1;
|
|
|
528 |
@Column(name = "customer_address2", length = 100)
|
|
|
529 |
private String retailerAddress2;
|
|
|
530 |
@Column(name = "customer_city", length = 100)
|
|
|
531 |
private String retailerCity;
|
|
|
532 |
@Column(name = "customer_state", length = 100)
|
|
|
533 |
private String retailerState;
|
|
|
534 |
@Column(name = "customer_email", length = 50)
|
|
|
535 |
private String retailerEmailId;
|
|
|
536 |
@Column(name = "status")
|
|
|
537 |
@Enumerated(EnumType.ORDINAL)
|
|
|
538 |
private OrderStatus status;
|
|
|
539 |
@Column(name = "statusDescription", length = 50)
|
|
|
540 |
private String statusDescription;
|
|
|
541 |
@Column(name = "total_amount")
|
|
|
542 |
private Float totalAmount;
|
|
|
543 |
@Column(name = "gvAmount")
|
|
|
544 |
private Float gvAmount;
|
|
|
545 |
@Column(name = "total_weight")
|
|
|
546 |
private Float totalWeight;
|
|
|
547 |
@Column(name = "invoice_number", length = 30)
|
|
|
548 |
private String invoiceNumber;
|
|
|
549 |
@Column(name = "billed_by", length = 30)
|
|
|
550 |
private String billedBy;
|
|
|
551 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
552 |
@Column(name = "created_timestamp")
|
|
|
553 |
private LocalDateTime createTimestamp;
|
|
|
554 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
555 |
@Column(name = "accepted_timestamp")
|
|
|
556 |
private LocalDateTime acceptedTimestamp;
|
|
|
557 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
558 |
@Column(name = "billing_timestamp")
|
|
|
559 |
private LocalDateTime billingTimestamp;
|
|
|
560 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
561 |
@Column(name = "shipping_timestamp")
|
|
|
562 |
private LocalDateTime shippingTimestamp;
|
|
|
563 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
564 |
@Column(name = "pickup_timestamp")
|
|
|
565 |
private LocalDateTime pickupTimestamp;
|
|
|
566 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
567 |
@Column(name = "delivery_timestamp")
|
|
|
568 |
private LocalDateTime deliveryTimestamp;
|
|
|
569 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
570 |
@Column(name = "outofstock_timestamp")
|
|
|
571 |
private LocalDateTime outOfStockTimestamp;
|
|
|
572 |
@Column(name = "transaction_id")
|
|
|
573 |
private Integer transactionId;
|
|
|
574 |
@Column(name = "receiver", length = 50)
|
|
|
575 |
private String receiver;
|
|
|
576 |
@Column(name = "batchNo")
|
|
|
577 |
private Integer batchNumber;
|
|
|
578 |
@Column(name = "serialNo")
|
|
|
579 |
private Integer serialNumber;
|
|
|
580 |
@Column(name = "doaFlag", columnDefinition = "tinyInteger(1) default 0")
|
|
|
581 |
private Boolean doaFlag;
|
|
|
582 |
@Column(name = "pickupRequestNo")
|
|
|
583 |
private Integer pickupRequestNumber;
|
| 27723 |
tejbeer |
584 |
|
| 33052 |
amit.gupta |
585 |
@Column(name = "jacket_number", length = 10)
|
| 34754 |
ranu |
586 |
private Long jacketNumber;
|
| 33052 |
amit.gupta |
587 |
|
|
|
588 |
public Boolean getDoaFlag() {
|
|
|
589 |
return doaFlag;
|
|
|
590 |
}
|
|
|
591 |
|
| 34754 |
ranu |
592 |
public Long getJacketNumber() {
|
| 33052 |
amit.gupta |
593 |
return jacketNumber;
|
|
|
594 |
}
|
|
|
595 |
|
| 34754 |
ranu |
596 |
public void setJacketNumber(Long jacketNumber) {
|
| 33052 |
amit.gupta |
597 |
this.jacketNumber = jacketNumber;
|
|
|
598 |
}
|
|
|
599 |
|
|
|
600 |
public Boolean getCod() {
|
|
|
601 |
return cod;
|
|
|
602 |
}
|
|
|
603 |
|
|
|
604 |
public Boolean getVendorPaid() {
|
|
|
605 |
return vendorPaid;
|
|
|
606 |
}
|
|
|
607 |
|
|
|
608 |
public Boolean getOtg() {
|
|
|
609 |
return otg;
|
|
|
610 |
}
|
|
|
611 |
|
|
|
612 |
public Boolean getIrnGenerated() {
|
|
|
613 |
return irnGenerated;
|
|
|
614 |
}
|
|
|
615 |
|
|
|
616 |
public void setIrnGenerated(Boolean irnGenerated) {
|
|
|
617 |
this.irnGenerated = irnGenerated;
|
|
|
618 |
}
|
|
|
619 |
|
| 31860 |
tejbeer |
620 |
@Column(name = "new_order_id")
|
|
|
621 |
private Integer newOrderId;
|
|
|
622 |
@Column(name = "doa_auth_timestamp")
|
|
|
623 |
private LocalDateTime doaAuthTimestamp;
|
|
|
624 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
625 |
@Column(name = "doa_pickup_timestamp")
|
|
|
626 |
private LocalDateTime doaPickupTimestamp;
|
|
|
627 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
628 |
@Column(name = "received_return_timestamp")
|
|
|
629 |
private LocalDateTime receiverReturnTimestamp;
|
|
|
630 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
631 |
@Column(name = "reship_timestamp")
|
|
|
632 |
private LocalDateTime reShipTimestamp;
|
|
|
633 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
634 |
@Column(name = "refund_timestamp")
|
|
|
635 |
private LocalDateTime refundTimestamp;
|
|
|
636 |
@Column(name = "purchase_order_id")
|
|
|
637 |
private Integer purchaseOrderId;
|
|
|
638 |
@Column(name = "cod", columnDefinition = "tinyInteger(1) default 0")
|
|
|
639 |
private Boolean cod;
|
|
|
640 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
641 |
@Column(name = "verification_timestamp")
|
|
|
642 |
private LocalDateTime verificationTimestamp;
|
|
|
643 |
@Column(name = "refunded_by", length = 30)
|
|
|
644 |
private String refundBy;
|
|
|
645 |
@Column(name = "refund_reason", length = 256)
|
|
|
646 |
private String refundReason;
|
|
|
647 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
648 |
@Column(name = "cod_reconciliation_timestamp")
|
|
|
649 |
private LocalDateTime codReconciliationTimestamp;
|
|
|
650 |
private Integer previousStatus;
|
|
|
651 |
@Column(name = "vendorId")
|
|
|
652 |
private Integer vendorId;
|
|
|
653 |
@Column(name = "delayReasonText", length = 250)
|
|
|
654 |
private String delayReasonText;
|
|
|
655 |
@Column(name = "doa_logistics_provider_id")
|
|
|
656 |
private Integer doaLogisticsProviderId;
|
| 27723 |
tejbeer |
657 |
|
| 31860 |
tejbeer |
658 |
/*
|
|
|
659 |
* @Column(name = "delay_reason") private DelayReason delayReason;
|
|
|
660 |
*/
|
|
|
661 |
@Column(name = "vendor_paid", columnDefinition = "tinyInteger(1) default 0")
|
|
|
662 |
private Boolean vendorPaid;
|
|
|
663 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
664 |
@Column(name = "local_connected_timestamp")
|
|
|
665 |
private LocalDateTime localConnectedTimestamp;
|
|
|
666 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
667 |
@Column(name = "reached_destination_timestamp")
|
|
|
668 |
private LocalDateTime reachedDestinationTimestamp;
|
|
|
669 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
670 |
@Column(name = "first_dlvyatmp_timestamp")
|
|
|
671 |
private LocalDateTime firstDlvyatmpTimestamp;
|
|
|
672 |
@Column(name = "originalOrderId")
|
|
|
673 |
private Integer originalOrderId;
|
|
|
674 |
@Column(name = "fulfilmentWarehouseId")
|
|
|
675 |
private Integer fulfilmentWarehouseId;
|
|
|
676 |
@Column(name = "orderType")
|
|
|
677 |
private Integer orderType;
|
|
|
678 |
@Column(name = "pickupStoreId")
|
|
|
679 |
private Integer pickupStoreId;
|
|
|
680 |
@Column(name = "otg", columnDefinition = "tinyInteger(1) default 0")
|
|
|
681 |
private Boolean otg;
|
|
|
682 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
683 |
@Column(name = "courier_delivery_time")
|
|
|
684 |
private LocalDateTime courierDeliveryTimestamp;
|
|
|
685 |
@Column(name = "insurer")
|
|
|
686 |
private Integer insurer;
|
|
|
687 |
@Column(name = "insuranceAmount")
|
|
|
688 |
private Float insuranceAmount;
|
|
|
689 |
@Column(name = "freebieItemId")
|
|
|
690 |
private Integer freebieItemId;
|
|
|
691 |
@Column(name = "source")
|
|
|
692 |
private Integer source;
|
|
|
693 |
@Column(name = "advanceAmount")
|
|
|
694 |
private Float advanceAmount;
|
|
|
695 |
@Column(name = "storeId")
|
|
|
696 |
private Integer storeId;
|
|
|
697 |
@Column(name = "productCondition")
|
|
|
698 |
private Integer productCondition;
|
|
|
699 |
@Column(name = "dataProtectionInsurer")
|
|
|
700 |
private Integer dataProtectionInsurer;
|
|
|
701 |
@Column(name = "dataProtectionAmount")
|
|
|
702 |
private Integer dataProtectionAmount;
|
|
|
703 |
@Column(name = "taxType")
|
|
|
704 |
@Enumerated(EnumType.ORDINAL)
|
|
|
705 |
private TaxType taxType;
|
|
|
706 |
@Column(name = "logisticsTransactionId", length = 100)
|
|
|
707 |
private String logisticsTransactionId;
|
|
|
708 |
@Column(name = "shippingCost")
|
|
|
709 |
private Float shippingCost;
|
|
|
710 |
@Column(name = "codCharges")
|
|
|
711 |
private Float codCharges;
|
|
|
712 |
@Column(name = "wallet_amount")
|
|
|
713 |
private Float walletAmount;
|
|
|
714 |
@Column(name = "net_payable_amount")
|
|
|
715 |
private Float netPayableAmount;
|
|
|
716 |
@Column(name = "shippingRefund")
|
|
|
717 |
private Float shippingRefund;
|
|
|
718 |
@Column(name = "irn_generated")
|
|
|
719 |
private Boolean irnGenerated;
|
|
|
720 |
@Column(name = "shipment_hold")
|
|
|
721 |
private Boolean shipmentHold;
|
|
|
722 |
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
|
|
723 |
@JoinColumn(name = "id", insertable = false, updatable = false, nullable = false, referencedColumnName = "order_id")
|
|
|
724 |
private LineItem lineItem;
|
| 27723 |
tejbeer |
725 |
|
| 31860 |
tejbeer |
726 |
public Order() {
|
|
|
727 |
}
|
| 31539 |
amit.gupta |
728 |
|
| 31860 |
tejbeer |
729 |
public LocalDateTime getPartnerGrnTimestamp() {
|
|
|
730 |
return partnerGrnTimestamp;
|
|
|
731 |
}
|
| 31539 |
amit.gupta |
732 |
|
| 31860 |
tejbeer |
733 |
public void setPartnerGrnTimestamp(LocalDateTime partnerGrnTimestamp) {
|
|
|
734 |
this.partnerGrnTimestamp = partnerGrnTimestamp;
|
|
|
735 |
}
|
| 31539 |
amit.gupta |
736 |
|
| 31860 |
tejbeer |
737 |
public List<String> getReturnedImeis() {
|
|
|
738 |
return returnedImeis;
|
|
|
739 |
}
|
| 31539 |
amit.gupta |
740 |
|
| 31860 |
tejbeer |
741 |
public void setReturnedImeis(List<String> returnedImeis) {
|
|
|
742 |
this.returnedImeis = returnedImeis;
|
|
|
743 |
}
|
| 31539 |
amit.gupta |
744 |
|
| 31860 |
tejbeer |
745 |
public Integer getId() {
|
|
|
746 |
return id;
|
|
|
747 |
}
|
| 27723 |
tejbeer |
748 |
|
| 31860 |
tejbeer |
749 |
public void setId(Integer id) {
|
|
|
750 |
this.id = id;
|
|
|
751 |
}
|
| 27723 |
tejbeer |
752 |
|
| 31860 |
tejbeer |
753 |
public Integer getWarehouseId() {
|
|
|
754 |
return warehouseId;
|
|
|
755 |
}
|
| 27723 |
tejbeer |
756 |
|
| 31860 |
tejbeer |
757 |
public void setWarehouseId(Integer warehouseId) {
|
|
|
758 |
this.warehouseId = warehouseId;
|
|
|
759 |
}
|
| 27723 |
tejbeer |
760 |
|
| 31860 |
tejbeer |
761 |
public Integer getSellerId() {
|
|
|
762 |
return sellerId;
|
|
|
763 |
}
|
| 27723 |
tejbeer |
764 |
|
| 31860 |
tejbeer |
765 |
public void setSellerId(Integer sellerId) {
|
|
|
766 |
this.sellerId = sellerId;
|
|
|
767 |
}
|
| 27723 |
tejbeer |
768 |
|
| 31860 |
tejbeer |
769 |
public Integer getWarehouseAddressId() {
|
|
|
770 |
return warehouseAddressId;
|
|
|
771 |
}
|
| 27723 |
tejbeer |
772 |
|
| 31860 |
tejbeer |
773 |
public void setWarehouseAddressId(Integer warehouseAddressId) {
|
|
|
774 |
this.warehouseAddressId = warehouseAddressId;
|
|
|
775 |
}
|
| 27723 |
tejbeer |
776 |
|
| 31860 |
tejbeer |
777 |
public Integer getLogisticsProviderId() {
|
|
|
778 |
return logisticsProviderId;
|
|
|
779 |
}
|
| 27723 |
tejbeer |
780 |
|
| 31860 |
tejbeer |
781 |
public void setLogisticsProviderId(Integer logisticsProviderId) {
|
|
|
782 |
this.logisticsProviderId = logisticsProviderId;
|
|
|
783 |
}
|
| 27723 |
tejbeer |
784 |
|
| 31860 |
tejbeer |
785 |
public String getAirwayBillNumber() {
|
|
|
786 |
return airwayBillNumber;
|
|
|
787 |
}
|
| 27723 |
tejbeer |
788 |
|
| 31860 |
tejbeer |
789 |
public void setAirwayBillNumber(String airwayBillNumber) {
|
|
|
790 |
this.airwayBillNumber = airwayBillNumber;
|
|
|
791 |
}
|
| 27723 |
tejbeer |
792 |
|
| 31860 |
tejbeer |
793 |
public String getTrackingId() {
|
|
|
794 |
return trackingId;
|
|
|
795 |
}
|
| 27723 |
tejbeer |
796 |
|
| 31860 |
tejbeer |
797 |
public void setTrackingId(String trackingId) {
|
|
|
798 |
this.trackingId = trackingId;
|
|
|
799 |
}
|
| 27723 |
tejbeer |
800 |
|
| 31860 |
tejbeer |
801 |
public LocalDateTime getExpectedDeliveryTime() {
|
|
|
802 |
return expectedDeliveryTime;
|
|
|
803 |
}
|
| 27723 |
tejbeer |
804 |
|
| 31860 |
tejbeer |
805 |
public void setExpectedDeliveryTime(LocalDateTime expectedDeliveryTime) {
|
|
|
806 |
this.expectedDeliveryTime = expectedDeliveryTime;
|
|
|
807 |
}
|
| 27723 |
tejbeer |
808 |
|
| 31860 |
tejbeer |
809 |
public LocalDateTime getPromisedDeliveryTime() {
|
|
|
810 |
return promisedDeliveryTime;
|
|
|
811 |
}
|
| 27723 |
tejbeer |
812 |
|
| 31860 |
tejbeer |
813 |
public void setPromisedDeliveryTime(LocalDateTime promisedDeliveryTime) {
|
|
|
814 |
this.promisedDeliveryTime = promisedDeliveryTime;
|
|
|
815 |
}
|
| 27723 |
tejbeer |
816 |
|
| 31860 |
tejbeer |
817 |
public LocalDateTime getExpectedShippingTime() {
|
|
|
818 |
return expectedShippingTime;
|
|
|
819 |
}
|
| 27723 |
tejbeer |
820 |
|
| 31860 |
tejbeer |
821 |
public void setExpectedShippingTime(LocalDateTime expectedShippingTime) {
|
|
|
822 |
this.expectedShippingTime = expectedShippingTime;
|
|
|
823 |
}
|
| 27723 |
tejbeer |
824 |
|
| 31860 |
tejbeer |
825 |
public LocalDateTime getPromisedShippingTime() {
|
|
|
826 |
return promisedShippingTime;
|
|
|
827 |
}
|
| 27723 |
tejbeer |
828 |
|
| 31860 |
tejbeer |
829 |
public void setPromisedShippingTime(LocalDateTime promisedShippingTime) {
|
|
|
830 |
this.promisedShippingTime = promisedShippingTime;
|
|
|
831 |
}
|
| 27723 |
tejbeer |
832 |
|
| 31860 |
tejbeer |
833 |
public Integer getRetailerId() {
|
|
|
834 |
return retailerId;
|
|
|
835 |
}
|
| 27723 |
tejbeer |
836 |
|
| 31860 |
tejbeer |
837 |
public void setRetailerId(Integer retailerId) {
|
|
|
838 |
this.retailerId = retailerId;
|
|
|
839 |
}
|
| 27723 |
tejbeer |
840 |
|
| 31860 |
tejbeer |
841 |
public String getRetailerName() {
|
|
|
842 |
return retailerName;
|
|
|
843 |
}
|
| 27723 |
tejbeer |
844 |
|
| 31860 |
tejbeer |
845 |
public void setRetailerName(String retailerName) {
|
|
|
846 |
this.retailerName = retailerName;
|
|
|
847 |
}
|
| 27723 |
tejbeer |
848 |
|
| 31860 |
tejbeer |
849 |
public String getRetailerMobileNumber() {
|
|
|
850 |
return retailerMobileNumber;
|
|
|
851 |
}
|
| 27723 |
tejbeer |
852 |
|
| 31860 |
tejbeer |
853 |
public void setRetailerMobileNumber(String retailerMobileNumber) {
|
|
|
854 |
this.retailerMobileNumber = retailerMobileNumber;
|
|
|
855 |
}
|
| 27723 |
tejbeer |
856 |
|
| 31860 |
tejbeer |
857 |
public String getRetailerPinCode() {
|
|
|
858 |
return retailerPinCode;
|
|
|
859 |
}
|
| 27723 |
tejbeer |
860 |
|
| 31860 |
tejbeer |
861 |
public void setRetailerPinCode(String retailerPinCode) {
|
|
|
862 |
this.retailerPinCode = retailerPinCode;
|
|
|
863 |
}
|
| 27723 |
tejbeer |
864 |
|
| 31860 |
tejbeer |
865 |
public String getRetailerAddress1() {
|
|
|
866 |
return retailerAddress1;
|
|
|
867 |
}
|
| 27723 |
tejbeer |
868 |
|
| 31860 |
tejbeer |
869 |
public void setRetailerAddress1(String retailerAddress1) {
|
|
|
870 |
this.retailerAddress1 = retailerAddress1;
|
|
|
871 |
}
|
| 27723 |
tejbeer |
872 |
|
| 31860 |
tejbeer |
873 |
public String getRetailerAddress2() {
|
|
|
874 |
return retailerAddress2;
|
|
|
875 |
}
|
| 27723 |
tejbeer |
876 |
|
| 31860 |
tejbeer |
877 |
public void setRetailerAddress2(String retailerAddress2) {
|
|
|
878 |
this.retailerAddress2 = retailerAddress2;
|
|
|
879 |
}
|
| 27723 |
tejbeer |
880 |
|
| 31860 |
tejbeer |
881 |
public String getRetailerCity() {
|
|
|
882 |
return retailerCity;
|
|
|
883 |
}
|
| 27723 |
tejbeer |
884 |
|
| 31860 |
tejbeer |
885 |
public void setRetailerCity(String retailerCity) {
|
|
|
886 |
this.retailerCity = retailerCity;
|
|
|
887 |
}
|
| 27723 |
tejbeer |
888 |
|
| 31860 |
tejbeer |
889 |
public String getRetailerState() {
|
|
|
890 |
return retailerState;
|
|
|
891 |
}
|
| 27723 |
tejbeer |
892 |
|
| 31860 |
tejbeer |
893 |
public void setRetailerState(String retailerState) {
|
|
|
894 |
this.retailerState = retailerState;
|
|
|
895 |
}
|
| 27723 |
tejbeer |
896 |
|
| 31860 |
tejbeer |
897 |
public String getRetailerEmailId() {
|
|
|
898 |
return retailerEmailId;
|
|
|
899 |
}
|
| 27723 |
tejbeer |
900 |
|
| 31860 |
tejbeer |
901 |
public void setRetailerEmailId(String retailerEmailId) {
|
|
|
902 |
this.retailerEmailId = retailerEmailId;
|
|
|
903 |
}
|
| 27723 |
tejbeer |
904 |
|
| 31860 |
tejbeer |
905 |
public OrderStatus getStatus() {
|
|
|
906 |
return status;
|
|
|
907 |
}
|
| 27723 |
tejbeer |
908 |
|
| 31860 |
tejbeer |
909 |
public void setStatus(OrderStatus status) {
|
|
|
910 |
this.status = status;
|
|
|
911 |
}
|
| 27723 |
tejbeer |
912 |
|
| 31860 |
tejbeer |
913 |
public String getStatusDescription() {
|
|
|
914 |
return statusDescription;
|
|
|
915 |
}
|
| 27723 |
tejbeer |
916 |
|
| 31860 |
tejbeer |
917 |
public void setStatusDescription(String statusDescription) {
|
|
|
918 |
this.statusDescription = statusDescription;
|
|
|
919 |
}
|
| 27723 |
tejbeer |
920 |
|
| 31860 |
tejbeer |
921 |
public Float getTotalAmount() {
|
|
|
922 |
return totalAmount;
|
|
|
923 |
}
|
| 27723 |
tejbeer |
924 |
|
| 31860 |
tejbeer |
925 |
public void setTotalAmount(Float totalAmount) {
|
|
|
926 |
this.totalAmount = totalAmount;
|
|
|
927 |
}
|
| 27723 |
tejbeer |
928 |
|
| 31860 |
tejbeer |
929 |
public Float getGvAmount() {
|
|
|
930 |
return gvAmount;
|
|
|
931 |
}
|
| 27723 |
tejbeer |
932 |
|
| 31860 |
tejbeer |
933 |
public void setGvAmount(Float gvAmount) {
|
|
|
934 |
this.gvAmount = gvAmount;
|
|
|
935 |
}
|
| 27723 |
tejbeer |
936 |
|
| 31860 |
tejbeer |
937 |
public Float getTotalWeight() {
|
|
|
938 |
return totalWeight;
|
|
|
939 |
}
|
| 27723 |
tejbeer |
940 |
|
| 31860 |
tejbeer |
941 |
public void setTotalWeight(Float totalWeight) {
|
|
|
942 |
this.totalWeight = totalWeight;
|
|
|
943 |
}
|
| 27723 |
tejbeer |
944 |
|
| 31860 |
tejbeer |
945 |
public String getInvoiceNumber() {
|
|
|
946 |
return invoiceNumber;
|
|
|
947 |
}
|
| 27723 |
tejbeer |
948 |
|
| 31860 |
tejbeer |
949 |
public void setInvoiceNumber(String invoiceNumber) {
|
|
|
950 |
this.invoiceNumber = invoiceNumber;
|
|
|
951 |
}
|
| 27723 |
tejbeer |
952 |
|
| 31860 |
tejbeer |
953 |
public String getBilledBy() {
|
|
|
954 |
return billedBy;
|
|
|
955 |
}
|
| 27723 |
tejbeer |
956 |
|
| 31860 |
tejbeer |
957 |
public void setBilledBy(String billedBy) {
|
|
|
958 |
this.billedBy = billedBy;
|
|
|
959 |
}
|
| 27723 |
tejbeer |
960 |
|
| 31860 |
tejbeer |
961 |
public LocalDateTime getCreateTimestamp() {
|
|
|
962 |
return createTimestamp;
|
|
|
963 |
}
|
| 27723 |
tejbeer |
964 |
|
| 31860 |
tejbeer |
965 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
966 |
this.createTimestamp = createTimestamp;
|
|
|
967 |
}
|
| 27723 |
tejbeer |
968 |
|
| 31860 |
tejbeer |
969 |
public LocalDateTime getAcceptedTimestamp() {
|
|
|
970 |
return acceptedTimestamp;
|
|
|
971 |
}
|
| 27723 |
tejbeer |
972 |
|
| 31860 |
tejbeer |
973 |
public void setAcceptedTimestamp(LocalDateTime acceptedTimestamp) {
|
|
|
974 |
this.acceptedTimestamp = acceptedTimestamp;
|
|
|
975 |
}
|
| 27723 |
tejbeer |
976 |
|
| 31860 |
tejbeer |
977 |
public LocalDateTime getBillingTimestamp() {
|
|
|
978 |
return billingTimestamp;
|
|
|
979 |
}
|
| 27723 |
tejbeer |
980 |
|
| 31860 |
tejbeer |
981 |
public void setBillingTimestamp(LocalDateTime billingTimestamp) {
|
|
|
982 |
this.billingTimestamp = billingTimestamp;
|
|
|
983 |
}
|
| 27723 |
tejbeer |
984 |
|
| 31860 |
tejbeer |
985 |
public LocalDateTime getShippingTimestamp() {
|
|
|
986 |
return shippingTimestamp;
|
|
|
987 |
}
|
| 27723 |
tejbeer |
988 |
|
| 31860 |
tejbeer |
989 |
public void setShippingTimestamp(LocalDateTime shippingTimestamp) {
|
|
|
990 |
this.shippingTimestamp = shippingTimestamp;
|
|
|
991 |
}
|
| 27723 |
tejbeer |
992 |
|
| 31860 |
tejbeer |
993 |
public LocalDateTime getPickupTimestamp() {
|
|
|
994 |
return pickupTimestamp;
|
|
|
995 |
}
|
| 27723 |
tejbeer |
996 |
|
| 31860 |
tejbeer |
997 |
public void setPickupTimestamp(LocalDateTime pickupTimestamp) {
|
|
|
998 |
this.pickupTimestamp = pickupTimestamp;
|
|
|
999 |
}
|
| 27723 |
tejbeer |
1000 |
|
| 31860 |
tejbeer |
1001 |
public LocalDateTime getDeliveryTimestamp() {
|
|
|
1002 |
return deliveryTimestamp;
|
|
|
1003 |
}
|
| 27723 |
tejbeer |
1004 |
|
| 31860 |
tejbeer |
1005 |
public void setDeliveryTimestamp(LocalDateTime deliveryTimestamp) {
|
|
|
1006 |
this.deliveryTimestamp = deliveryTimestamp;
|
|
|
1007 |
}
|
| 27723 |
tejbeer |
1008 |
|
| 31860 |
tejbeer |
1009 |
public LocalDateTime getOutOfStockTimestamp() {
|
|
|
1010 |
return outOfStockTimestamp;
|
|
|
1011 |
}
|
| 27723 |
tejbeer |
1012 |
|
| 31860 |
tejbeer |
1013 |
public void setOutOfStockTimestamp(LocalDateTime outOfStockTimestamp) {
|
|
|
1014 |
this.outOfStockTimestamp = outOfStockTimestamp;
|
|
|
1015 |
}
|
| 27723 |
tejbeer |
1016 |
|
| 31860 |
tejbeer |
1017 |
public Integer getTransactionId() {
|
|
|
1018 |
return transactionId;
|
|
|
1019 |
}
|
| 27723 |
tejbeer |
1020 |
|
| 31860 |
tejbeer |
1021 |
public void setTransactionId(Integer transactionId) {
|
|
|
1022 |
this.transactionId = transactionId;
|
|
|
1023 |
}
|
| 27723 |
tejbeer |
1024 |
|
| 31860 |
tejbeer |
1025 |
/*
|
|
|
1026 |
* public Integer getJacketNumber() { return jacketNumber; } public void
|
|
|
1027 |
* setJacketNumber(Integer jacketNumber) { this.jacketNumber = jacketNumber; }
|
|
|
1028 |
*/
|
|
|
1029 |
public String getReceiver() {
|
|
|
1030 |
return receiver;
|
|
|
1031 |
}
|
| 27723 |
tejbeer |
1032 |
|
| 31860 |
tejbeer |
1033 |
public void setReceiver(String receiver) {
|
|
|
1034 |
this.receiver = receiver;
|
|
|
1035 |
}
|
| 27723 |
tejbeer |
1036 |
|
| 31860 |
tejbeer |
1037 |
public Integer getBatchNumber() {
|
|
|
1038 |
return batchNumber;
|
|
|
1039 |
}
|
| 27723 |
tejbeer |
1040 |
|
| 31860 |
tejbeer |
1041 |
public void setBatchNumber(Integer batchNumber) {
|
|
|
1042 |
this.batchNumber = batchNumber;
|
|
|
1043 |
}
|
| 27723 |
tejbeer |
1044 |
|
| 31860 |
tejbeer |
1045 |
public Integer getSerialNumber() {
|
|
|
1046 |
return serialNumber;
|
|
|
1047 |
}
|
| 27723 |
tejbeer |
1048 |
|
| 31860 |
tejbeer |
1049 |
public void setSerialNumber(Integer serialNumber) {
|
|
|
1050 |
this.serialNumber = serialNumber;
|
|
|
1051 |
}
|
| 27723 |
tejbeer |
1052 |
|
| 31860 |
tejbeer |
1053 |
public Boolean getShipmentHold() {
|
|
|
1054 |
return shipmentHold;
|
|
|
1055 |
}
|
| 31020 |
tejbeer |
1056 |
|
| 31860 |
tejbeer |
1057 |
public void setShipmentHold(Boolean shipmentHold) {
|
|
|
1058 |
this.shipmentHold = shipmentHold;
|
|
|
1059 |
}
|
| 31020 |
tejbeer |
1060 |
|
| 31860 |
tejbeer |
1061 |
public Boolean isDoaFlag() {
|
|
|
1062 |
return doaFlag;
|
|
|
1063 |
}
|
| 27723 |
tejbeer |
1064 |
|
| 31860 |
tejbeer |
1065 |
public void setDoaFlag(Boolean doaFlag) {
|
|
|
1066 |
this.doaFlag = doaFlag;
|
|
|
1067 |
}
|
| 27723 |
tejbeer |
1068 |
|
| 31860 |
tejbeer |
1069 |
public Integer getPickupRequestNumber() {
|
|
|
1070 |
return pickupRequestNumber;
|
|
|
1071 |
}
|
| 27723 |
tejbeer |
1072 |
|
| 31860 |
tejbeer |
1073 |
public void setPickupRequestNumber(Integer pickupRequestNumber) {
|
|
|
1074 |
this.pickupRequestNumber = pickupRequestNumber;
|
|
|
1075 |
}
|
| 27723 |
tejbeer |
1076 |
|
| 31860 |
tejbeer |
1077 |
public Integer getNewOrderId() {
|
|
|
1078 |
return newOrderId;
|
|
|
1079 |
}
|
| 27723 |
tejbeer |
1080 |
|
| 31860 |
tejbeer |
1081 |
public void setNewOrderId(Integer newOrderId) {
|
|
|
1082 |
this.newOrderId = newOrderId;
|
|
|
1083 |
}
|
| 27723 |
tejbeer |
1084 |
|
| 31860 |
tejbeer |
1085 |
public LocalDateTime getDoaAuthTimestamp() {
|
|
|
1086 |
return doaAuthTimestamp;
|
|
|
1087 |
}
|
| 27723 |
tejbeer |
1088 |
|
| 31860 |
tejbeer |
1089 |
public void setDoaAuthTimestamp(LocalDateTime doaAuthTimestamp) {
|
|
|
1090 |
this.doaAuthTimestamp = doaAuthTimestamp;
|
|
|
1091 |
}
|
| 27723 |
tejbeer |
1092 |
|
| 31860 |
tejbeer |
1093 |
public LocalDateTime getDoaPickupTimestamp() {
|
|
|
1094 |
return doaPickupTimestamp;
|
|
|
1095 |
}
|
| 27723 |
tejbeer |
1096 |
|
| 31860 |
tejbeer |
1097 |
public void setDoaPickupTimestamp(LocalDateTime doaPickupTimestamp) {
|
|
|
1098 |
this.doaPickupTimestamp = doaPickupTimestamp;
|
|
|
1099 |
}
|
| 27723 |
tejbeer |
1100 |
|
| 31860 |
tejbeer |
1101 |
public LocalDateTime getReceiverReturnTimestamp() {
|
|
|
1102 |
return receiverReturnTimestamp;
|
|
|
1103 |
}
|
| 27723 |
tejbeer |
1104 |
|
| 31860 |
tejbeer |
1105 |
public void setReceiverReturnTimestamp(LocalDateTime receiverReturnTimestamp) {
|
|
|
1106 |
this.receiverReturnTimestamp = receiverReturnTimestamp;
|
|
|
1107 |
}
|
| 27723 |
tejbeer |
1108 |
|
| 31860 |
tejbeer |
1109 |
public LocalDateTime getReShipTimestamp() {
|
|
|
1110 |
return reShipTimestamp;
|
|
|
1111 |
}
|
| 27723 |
tejbeer |
1112 |
|
| 31860 |
tejbeer |
1113 |
public void setReShipTimestamp(LocalDateTime reShipTimestamp) {
|
|
|
1114 |
this.reShipTimestamp = reShipTimestamp;
|
|
|
1115 |
}
|
| 27723 |
tejbeer |
1116 |
|
| 31860 |
tejbeer |
1117 |
public LocalDateTime getRefundTimestamp() {
|
|
|
1118 |
return refundTimestamp;
|
|
|
1119 |
}
|
| 27723 |
tejbeer |
1120 |
|
| 31860 |
tejbeer |
1121 |
public void setRefundTimestamp(LocalDateTime refundTimestamp) {
|
|
|
1122 |
this.refundTimestamp = refundTimestamp;
|
|
|
1123 |
}
|
| 27723 |
tejbeer |
1124 |
|
| 31860 |
tejbeer |
1125 |
public Integer getPurchaseOrderId() {
|
|
|
1126 |
return purchaseOrderId;
|
|
|
1127 |
}
|
| 27723 |
tejbeer |
1128 |
|
| 31860 |
tejbeer |
1129 |
public void setPurchaseOrderId(Integer purchaseOrderId) {
|
|
|
1130 |
this.purchaseOrderId = purchaseOrderId;
|
|
|
1131 |
}
|
| 27723 |
tejbeer |
1132 |
|
| 31860 |
tejbeer |
1133 |
public Boolean isCod() {
|
|
|
1134 |
return cod;
|
|
|
1135 |
}
|
| 27723 |
tejbeer |
1136 |
|
| 31860 |
tejbeer |
1137 |
public void setCod(Boolean cod) {
|
|
|
1138 |
this.cod = cod;
|
|
|
1139 |
}
|
| 27723 |
tejbeer |
1140 |
|
| 31860 |
tejbeer |
1141 |
public LocalDateTime getVerificationTimestamp() {
|
|
|
1142 |
return verificationTimestamp;
|
|
|
1143 |
}
|
| 27723 |
tejbeer |
1144 |
|
| 31860 |
tejbeer |
1145 |
public void setVerificationTimestamp(LocalDateTime verificationTimestamp) {
|
|
|
1146 |
this.verificationTimestamp = verificationTimestamp;
|
|
|
1147 |
}
|
| 27723 |
tejbeer |
1148 |
|
| 31860 |
tejbeer |
1149 |
public String getRefundBy() {
|
|
|
1150 |
return refundBy;
|
|
|
1151 |
}
|
| 27723 |
tejbeer |
1152 |
|
| 31860 |
tejbeer |
1153 |
public void setRefundBy(String refundBy) {
|
|
|
1154 |
this.refundBy = refundBy;
|
|
|
1155 |
}
|
| 27723 |
tejbeer |
1156 |
|
| 31860 |
tejbeer |
1157 |
public String getRefundReason() {
|
|
|
1158 |
return refundReason;
|
|
|
1159 |
}
|
| 27723 |
tejbeer |
1160 |
|
| 31860 |
tejbeer |
1161 |
public void setRefundReason(String refundReason) {
|
|
|
1162 |
this.refundReason = refundReason;
|
|
|
1163 |
}
|
| 27723 |
tejbeer |
1164 |
|
| 31860 |
tejbeer |
1165 |
/*
|
|
|
1166 |
* public DelayReason getDelayReason() { return delayReason; } public void
|
|
|
1167 |
* setDelayReason(DelayReason delayReason) { this.delayReason = delayReason; }
|
|
|
1168 |
*/
|
|
|
1169 |
public LocalDateTime getCodReconciliationTimestamp() {
|
|
|
1170 |
return codReconciliationTimestamp;
|
|
|
1171 |
}
|
| 27723 |
tejbeer |
1172 |
|
| 31860 |
tejbeer |
1173 |
public void setCodReconciliationTimestamp(LocalDateTime codReconciliationTimestamp) {
|
|
|
1174 |
this.codReconciliationTimestamp = codReconciliationTimestamp;
|
|
|
1175 |
}
|
| 27723 |
tejbeer |
1176 |
|
| 31860 |
tejbeer |
1177 |
public Integer getPreviousStatus() {
|
|
|
1178 |
return previousStatus;
|
|
|
1179 |
}
|
| 27723 |
tejbeer |
1180 |
|
| 31860 |
tejbeer |
1181 |
public void setPreviousStatus(Integer previousStatus) {
|
|
|
1182 |
this.previousStatus = previousStatus;
|
|
|
1183 |
}
|
| 27723 |
tejbeer |
1184 |
|
| 31860 |
tejbeer |
1185 |
public Integer getVendorId() {
|
|
|
1186 |
return vendorId;
|
|
|
1187 |
}
|
| 27723 |
tejbeer |
1188 |
|
| 31860 |
tejbeer |
1189 |
public void setVendorId(Integer vendorId) {
|
|
|
1190 |
this.vendorId = vendorId;
|
|
|
1191 |
}
|
| 27723 |
tejbeer |
1192 |
|
| 31860 |
tejbeer |
1193 |
public String getDelayReasonText() {
|
|
|
1194 |
return delayReasonText;
|
|
|
1195 |
}
|
| 27723 |
tejbeer |
1196 |
|
| 31860 |
tejbeer |
1197 |
public void setDelayReasonText(String delayReasonText) {
|
|
|
1198 |
this.delayReasonText = delayReasonText;
|
|
|
1199 |
}
|
| 27723 |
tejbeer |
1200 |
|
| 31860 |
tejbeer |
1201 |
public Integer getDoaLogisticsProviderId() {
|
|
|
1202 |
return doaLogisticsProviderId;
|
|
|
1203 |
}
|
| 27723 |
tejbeer |
1204 |
|
| 31860 |
tejbeer |
1205 |
public void setDoaLogisticsProviderId(Integer doaLogisticsProviderId) {
|
|
|
1206 |
this.doaLogisticsProviderId = doaLogisticsProviderId;
|
|
|
1207 |
}
|
| 27723 |
tejbeer |
1208 |
|
| 31860 |
tejbeer |
1209 |
public Boolean isVendorPaid() {
|
|
|
1210 |
return vendorPaid;
|
|
|
1211 |
}
|
| 27723 |
tejbeer |
1212 |
|
| 31860 |
tejbeer |
1213 |
public void setVendorPaid(Boolean vendorPaid) {
|
|
|
1214 |
this.vendorPaid = vendorPaid;
|
|
|
1215 |
}
|
| 27723 |
tejbeer |
1216 |
|
| 31860 |
tejbeer |
1217 |
public LocalDateTime getLocalConnectedTimestamp() {
|
|
|
1218 |
return localConnectedTimestamp;
|
|
|
1219 |
}
|
| 27723 |
tejbeer |
1220 |
|
| 31860 |
tejbeer |
1221 |
public void setLocalConnectedTimestamp(LocalDateTime localConnectedTimestamp) {
|
|
|
1222 |
this.localConnectedTimestamp = localConnectedTimestamp;
|
|
|
1223 |
}
|
| 27723 |
tejbeer |
1224 |
|
| 31860 |
tejbeer |
1225 |
public LocalDateTime getReachedDestinationTimestamp() {
|
|
|
1226 |
return reachedDestinationTimestamp;
|
|
|
1227 |
}
|
| 27723 |
tejbeer |
1228 |
|
| 31860 |
tejbeer |
1229 |
public void setReachedDestinationTimestamp(LocalDateTime reachedDestinationTimestamp) {
|
|
|
1230 |
this.reachedDestinationTimestamp = reachedDestinationTimestamp;
|
|
|
1231 |
}
|
| 27723 |
tejbeer |
1232 |
|
| 31860 |
tejbeer |
1233 |
public LocalDateTime getFirstDlvyatmpTimestamp() {
|
|
|
1234 |
return firstDlvyatmpTimestamp;
|
|
|
1235 |
}
|
| 27723 |
tejbeer |
1236 |
|
| 31860 |
tejbeer |
1237 |
public void setFirstDlvyatmpTimestamp(LocalDateTime firstDlvyatmpTimestamp) {
|
|
|
1238 |
this.firstDlvyatmpTimestamp = firstDlvyatmpTimestamp;
|
|
|
1239 |
}
|
| 27723 |
tejbeer |
1240 |
|
| 31860 |
tejbeer |
1241 |
public Integer getOriginalOrderId() {
|
|
|
1242 |
return originalOrderId;
|
|
|
1243 |
}
|
| 27723 |
tejbeer |
1244 |
|
| 31860 |
tejbeer |
1245 |
public void setOriginalOrderId(Integer originalOrderId) {
|
|
|
1246 |
this.originalOrderId = originalOrderId;
|
|
|
1247 |
}
|
| 27723 |
tejbeer |
1248 |
|
| 31860 |
tejbeer |
1249 |
public Integer getFulfilmentWarehouseId() {
|
|
|
1250 |
return fulfilmentWarehouseId;
|
|
|
1251 |
}
|
| 27723 |
tejbeer |
1252 |
|
| 31860 |
tejbeer |
1253 |
public void setFulfilmentWarehouseId(Integer fulfilmentWarehouseId) {
|
|
|
1254 |
this.fulfilmentWarehouseId = fulfilmentWarehouseId;
|
|
|
1255 |
}
|
| 27723 |
tejbeer |
1256 |
|
| 31860 |
tejbeer |
1257 |
public Integer getOrderType() {
|
|
|
1258 |
return orderType;
|
|
|
1259 |
}
|
| 27723 |
tejbeer |
1260 |
|
| 31860 |
tejbeer |
1261 |
public void setOrderType(Integer orderType) {
|
|
|
1262 |
this.orderType = orderType;
|
|
|
1263 |
}
|
| 27723 |
tejbeer |
1264 |
|
| 31860 |
tejbeer |
1265 |
public Integer getPickupStoreId() {
|
|
|
1266 |
return pickupStoreId;
|
|
|
1267 |
}
|
| 27723 |
tejbeer |
1268 |
|
| 31860 |
tejbeer |
1269 |
public void setPickupStoreId(Integer pickupStoreId) {
|
|
|
1270 |
this.pickupStoreId = pickupStoreId;
|
|
|
1271 |
}
|
| 27723 |
tejbeer |
1272 |
|
| 31860 |
tejbeer |
1273 |
public Boolean isOtg() {
|
|
|
1274 |
return otg;
|
|
|
1275 |
}
|
| 27723 |
tejbeer |
1276 |
|
| 31860 |
tejbeer |
1277 |
public void setOtg(Boolean otg) {
|
|
|
1278 |
this.otg = otg;
|
|
|
1279 |
}
|
| 27723 |
tejbeer |
1280 |
|
| 31860 |
tejbeer |
1281 |
public LocalDateTime getCourierDeliveryTimestamp() {
|
|
|
1282 |
return courierDeliveryTimestamp;
|
|
|
1283 |
}
|
| 27723 |
tejbeer |
1284 |
|
| 31860 |
tejbeer |
1285 |
public void setCourierDeliveryTimestamp(LocalDateTime courierDeliveryTimestamp) {
|
|
|
1286 |
this.courierDeliveryTimestamp = courierDeliveryTimestamp;
|
|
|
1287 |
}
|
| 27723 |
tejbeer |
1288 |
|
| 31860 |
tejbeer |
1289 |
public Integer getInsurer() {
|
|
|
1290 |
return insurer;
|
|
|
1291 |
}
|
| 27723 |
tejbeer |
1292 |
|
| 31860 |
tejbeer |
1293 |
public void setInsurer(Integer insurer) {
|
|
|
1294 |
this.insurer = insurer;
|
|
|
1295 |
}
|
| 27723 |
tejbeer |
1296 |
|
| 31860 |
tejbeer |
1297 |
public Float getInsuranceAmount() {
|
|
|
1298 |
return insuranceAmount;
|
|
|
1299 |
}
|
| 27723 |
tejbeer |
1300 |
|
| 31860 |
tejbeer |
1301 |
public void setInsuranceAmount(Float insuranceAmount) {
|
|
|
1302 |
this.insuranceAmount = insuranceAmount;
|
|
|
1303 |
}
|
| 27723 |
tejbeer |
1304 |
|
| 31860 |
tejbeer |
1305 |
public Integer getFreebieItemId() {
|
|
|
1306 |
return freebieItemId;
|
|
|
1307 |
}
|
| 27723 |
tejbeer |
1308 |
|
| 31860 |
tejbeer |
1309 |
public void setFreebieItemId(Integer freebieItemId) {
|
|
|
1310 |
this.freebieItemId = freebieItemId;
|
|
|
1311 |
}
|
| 27723 |
tejbeer |
1312 |
|
| 31860 |
tejbeer |
1313 |
public Integer getSource() {
|
|
|
1314 |
return source;
|
|
|
1315 |
}
|
| 27723 |
tejbeer |
1316 |
|
| 31860 |
tejbeer |
1317 |
public void setSource(Integer source) {
|
|
|
1318 |
this.source = source;
|
|
|
1319 |
}
|
| 27723 |
tejbeer |
1320 |
|
| 31860 |
tejbeer |
1321 |
public Float getAdvanceAmount() {
|
|
|
1322 |
return advanceAmount;
|
|
|
1323 |
}
|
| 27723 |
tejbeer |
1324 |
|
| 31860 |
tejbeer |
1325 |
public void setAdvanceAmount(Float advanceAmount) {
|
|
|
1326 |
this.advanceAmount = advanceAmount;
|
|
|
1327 |
}
|
| 27723 |
tejbeer |
1328 |
|
| 31860 |
tejbeer |
1329 |
public Integer getStoreId() {
|
|
|
1330 |
return storeId;
|
|
|
1331 |
}
|
| 27723 |
tejbeer |
1332 |
|
| 31860 |
tejbeer |
1333 |
public void setStoreId(Integer storeId) {
|
|
|
1334 |
this.storeId = storeId;
|
|
|
1335 |
}
|
| 27723 |
tejbeer |
1336 |
|
| 31860 |
tejbeer |
1337 |
public Integer getProductCondition() {
|
|
|
1338 |
return productCondition;
|
|
|
1339 |
}
|
| 27723 |
tejbeer |
1340 |
|
| 31860 |
tejbeer |
1341 |
public void setProductCondition(Integer productCondition) {
|
|
|
1342 |
this.productCondition = productCondition;
|
|
|
1343 |
}
|
| 27723 |
tejbeer |
1344 |
|
| 31860 |
tejbeer |
1345 |
public Integer getDataProtectionInsurer() {
|
|
|
1346 |
return dataProtectionInsurer;
|
|
|
1347 |
}
|
| 27723 |
tejbeer |
1348 |
|
| 31860 |
tejbeer |
1349 |
public void setDataProtectionInsurer(Integer dataProtectionInsurer) {
|
|
|
1350 |
this.dataProtectionInsurer = dataProtectionInsurer;
|
|
|
1351 |
}
|
| 27723 |
tejbeer |
1352 |
|
| 31860 |
tejbeer |
1353 |
public Integer getDataProtectionAmount() {
|
|
|
1354 |
return dataProtectionAmount;
|
|
|
1355 |
}
|
| 27723 |
tejbeer |
1356 |
|
| 31860 |
tejbeer |
1357 |
public void setDataProtectionAmount(Integer dataProtectionAmount) {
|
|
|
1358 |
this.dataProtectionAmount = dataProtectionAmount;
|
|
|
1359 |
}
|
| 27723 |
tejbeer |
1360 |
|
| 31860 |
tejbeer |
1361 |
public TaxType getTaxType() {
|
|
|
1362 |
return taxType;
|
|
|
1363 |
}
|
| 27723 |
tejbeer |
1364 |
|
| 31860 |
tejbeer |
1365 |
public void setTaxType(TaxType taxType) {
|
|
|
1366 |
this.taxType = taxType;
|
|
|
1367 |
}
|
| 27723 |
tejbeer |
1368 |
|
| 31860 |
tejbeer |
1369 |
public String getLogisticsTransactionId() {
|
|
|
1370 |
return logisticsTransactionId;
|
|
|
1371 |
}
|
| 27723 |
tejbeer |
1372 |
|
| 31860 |
tejbeer |
1373 |
public void setLogisticsTransactionId(String logisticsTransactionId) {
|
|
|
1374 |
this.logisticsTransactionId = logisticsTransactionId;
|
|
|
1375 |
}
|
| 27723 |
tejbeer |
1376 |
|
| 31860 |
tejbeer |
1377 |
public Float getShippingCost() {
|
|
|
1378 |
return shippingCost;
|
|
|
1379 |
}
|
| 27723 |
tejbeer |
1380 |
|
| 31860 |
tejbeer |
1381 |
public void setShippingCost(Float shippingCost) {
|
|
|
1382 |
this.shippingCost = shippingCost;
|
|
|
1383 |
}
|
| 27723 |
tejbeer |
1384 |
|
| 31860 |
tejbeer |
1385 |
public Float getCodCharges() {
|
|
|
1386 |
return codCharges;
|
|
|
1387 |
}
|
| 27723 |
tejbeer |
1388 |
|
| 31860 |
tejbeer |
1389 |
public void setCodCharges(Float codCharges) {
|
|
|
1390 |
this.codCharges = codCharges;
|
|
|
1391 |
}
|
| 27723 |
tejbeer |
1392 |
|
| 31860 |
tejbeer |
1393 |
public Float getWalletAmount() {
|
|
|
1394 |
return walletAmount;
|
|
|
1395 |
}
|
| 27723 |
tejbeer |
1396 |
|
| 31860 |
tejbeer |
1397 |
public void setWalletAmount(Float walletAmount) {
|
|
|
1398 |
this.walletAmount = walletAmount;
|
|
|
1399 |
}
|
| 27723 |
tejbeer |
1400 |
|
| 31860 |
tejbeer |
1401 |
public Float getNetPayableAmount() {
|
|
|
1402 |
return netPayableAmount;
|
|
|
1403 |
}
|
| 27723 |
tejbeer |
1404 |
|
| 31860 |
tejbeer |
1405 |
public void setNetPayableAmount(Float netPayableAmount) {
|
|
|
1406 |
this.netPayableAmount = netPayableAmount;
|
|
|
1407 |
}
|
| 27723 |
tejbeer |
1408 |
|
| 31860 |
tejbeer |
1409 |
public Float getShippingRefund() {
|
|
|
1410 |
return shippingRefund;
|
|
|
1411 |
}
|
| 27723 |
tejbeer |
1412 |
|
| 31860 |
tejbeer |
1413 |
public void setShippingRefund(Float shippingRefund) {
|
|
|
1414 |
this.shippingRefund = shippingRefund;
|
|
|
1415 |
}
|
| 27723 |
tejbeer |
1416 |
|
| 31860 |
tejbeer |
1417 |
public LineItem getLineItem() {
|
|
|
1418 |
return lineItem;
|
|
|
1419 |
}
|
| 27723 |
tejbeer |
1420 |
|
| 31860 |
tejbeer |
1421 |
public void setLineItem(LineItem lineItem) {
|
|
|
1422 |
this.lineItem = lineItem;
|
|
|
1423 |
}
|
| 27723 |
tejbeer |
1424 |
|
| 31860 |
tejbeer |
1425 |
public String getFormattedDate() {
|
|
|
1426 |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
|
|
|
1427 |
return this.createTimestamp.format(formatter);
|
|
|
1428 |
}
|
| 27723 |
tejbeer |
1429 |
|
| 31860 |
tejbeer |
1430 |
@Override
|
|
|
1431 |
public int hashCode() {
|
|
|
1432 |
final int prime = 31;
|
|
|
1433 |
int result = 1;
|
|
|
1434 |
result = prime * result + ((id == null) ? 0 : id.hashCode());
|
|
|
1435 |
return result;
|
|
|
1436 |
}
|
| 27723 |
tejbeer |
1437 |
|
| 31860 |
tejbeer |
1438 |
@Override
|
|
|
1439 |
public boolean equals(Object obj) {
|
|
|
1440 |
if (this == obj)
|
|
|
1441 |
return true;
|
|
|
1442 |
if (obj == null)
|
|
|
1443 |
return false;
|
|
|
1444 |
if (getClass() != obj.getClass())
|
|
|
1445 |
return false;
|
|
|
1446 |
Order other = (Order) obj;
|
|
|
1447 |
if (id == null) {
|
|
|
1448 |
if (other.id != null)
|
|
|
1449 |
return false;
|
|
|
1450 |
} else if (!id.equals(other.id))
|
|
|
1451 |
return false;
|
|
|
1452 |
return true;
|
|
|
1453 |
}
|
| 27723 |
tejbeer |
1454 |
|
| 31860 |
tejbeer |
1455 |
public Boolean isIrnGenerated() {
|
|
|
1456 |
return irnGenerated;
|
|
|
1457 |
}
|
| 30289 |
amit.gupta |
1458 |
|
| 31860 |
tejbeer |
1459 |
public void setIrnGenerated(boolean irnGenerated) {
|
|
|
1460 |
this.irnGenerated = irnGenerated;
|
|
|
1461 |
}
|
| 30289 |
amit.gupta |
1462 |
|
| 31860 |
tejbeer |
1463 |
@Override
|
|
|
1464 |
public String toString() {
|
|
|
1465 |
return "Order [id=" + id + "]";
|
|
|
1466 |
}
|
| 27723 |
tejbeer |
1467 |
|
| 21545 |
ashik.ali |
1468 |
}
|