Subversion Repositories SmartDukaan

Rev

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