Subversion Repositories SmartDukaan

Rev

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