Subversion Repositories SmartDukaan

Rev

Rev 37077 | Details | Compare with Previous | Last modification | View Log | RSS feed

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