| 21714 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
| 21596 |
ashik.ali |
2 |
|
| 30641 |
amit.gupta |
3 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
|
|
4 |
|
|
|
5 |
import javax.persistence.*;
|
| 21596 |
ashik.ali |
6 |
import java.io.Serializable;
|
| 25726 |
amit.gupta |
7 |
import java.time.LocalDate;
|
| 21596 |
ashik.ali |
8 |
import java.time.LocalDateTime;
|
| 22243 |
ashik.ali |
9 |
import java.time.format.DateTimeFormatter;
|
| 21596 |
ashik.ali |
10 |
|
|
|
11 |
@Entity
|
| 27579 |
tejbeer |
12 |
@Table(name = "fofo.fofo_order", schema = "fofo")
|
| 21596 |
ashik.ali |
13 |
|
| 27579 |
tejbeer |
14 |
@NamedQueries({
|
|
|
15 |
|
|
|
16 |
@NamedQuery(name = "FofoOrder.SelectItemWiseTertiary", query = "select new com.spice.profitmandi.dao.model.ItemWiseTertiaryModel(foi.brand,"
|
| 27586 |
tejbeer |
17 |
+ "foi.modelName, foi.modelNumber, foi.color, foi.quantity, foi.mop)"
|
| 27579 |
tejbeer |
18 |
+ " from FofoOrder fo join FofoOrderItem foi on fo.id = foi.orderId where fo.cancelledTimestamp is null and fo.fofoId = :fofoId"
|
|
|
19 |
+ " and fo.createTimestamp between :startDate and :endDate"),
|
|
|
20 |
|
| 30641 |
amit.gupta |
21 |
@NamedQuery(name = "FofoOrder.selectOrderByModelsAndSaleBetween", query = "select fo from FofoOrder fo join FofoOrderItem foi on fo.id = foi.orderId"
|
|
|
22 |
+ " join Item i on i.id=foi.itemId where fo.cancelledTimestamp is null and i.catalogItemId in :catalogItemIds"
|
|
|
23 |
+ " and fo.createTimestamp between :startDate and :endDate"),
|
|
|
24 |
|
| 27723 |
tejbeer |
25 |
@NamedQuery(name = "FofoOrder.selectGroupByBrandPartnerTertiary", query = "select new com.spice.profitmandi.dao.model.BrandWiseTertiaryModel(foi.brand, "
|
|
|
26 |
+ "sum(case when foi.createTimestamp >= :today then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
| 27728 |
tejbeer |
27 |
+ "sum(case when foi.createTimestamp >= :threedays and foi.createTimestamp < :endDate then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
| 27723 |
tejbeer |
28 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
29 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
| 27748 |
tejbeer |
30 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmsEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
| 27723 |
tejbeer |
31 |
+ "sum(case when foi.createTimestamp >= :today then foi.quantity else 0 end),"
|
| 27728 |
tejbeer |
32 |
+ "sum(case when foi.createTimestamp >= :threedays and foi.createTimestamp < :endDate then foi.quantity else 0 end),"
|
| 27723 |
tejbeer |
33 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
| 27748 |
tejbeer |
34 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end),"
|
|
|
35 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmsEndDate then foi.quantity else 0 end)"
|
|
|
36 |
+ " )"
|
|
|
37 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id join Item i on i.id = foi.itemId "
|
|
|
38 |
+ " where fo.cancelledTimestamp is null and fs.active = true "
|
| 27723 |
tejbeer |
39 |
+ " and foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId"
|
| 27748 |
tejbeer |
40 |
+ " group by foi.brand "),
|
| 27723 |
tejbeer |
41 |
|
| 27738 |
tejbeer |
42 |
@NamedQuery(name = "FofoOrder.selectItemPartnerTertiaryByBrand", query = "select new com.spice.profitmandi.dao.model.BrandItemWiseTertiaryModel(foi.brand, i.modelName,"
|
|
|
43 |
+ " i.modelNumber, i.color, foi.quantity*foi.mop, foi.quantity)"
|
|
|
44 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id join "
|
| 27748 |
tejbeer |
45 |
+ " Item i on i.id = foi.itemId where fo.cancelledTimestamp is null and fs.active = true "
|
|
|
46 |
+ " and foi.createTimestamp >= :startDate and foi.createTimestamp < :endDate and fs.warehouseId in :warehouseId and foi.brand in :brand order by foi.itemId desc"),
|
| 27738 |
tejbeer |
47 |
|
|
|
48 |
@NamedQuery(name = "FofoOrder.selectTodayItemPartnerTertiaryByBrand", query = "select new com.spice.profitmandi.dao.model.BrandItemWiseTertiaryModel(foi.brand, i.modelName,"
|
|
|
49 |
+ " i.modelNumber, i.color, foi.quantity*foi.mop, foi.quantity)"
|
|
|
50 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id join "
|
| 27748 |
tejbeer |
51 |
+ " Item i on i.id = foi.itemId where fo.cancelledTimestamp is null and fs.active = true "
|
|
|
52 |
+ " and foi.createTimestamp >= :startDate and fs.warehouseId in :warehouseId and foi.brand in :brand order by foi.itemId desc"),
|
| 27738 |
tejbeer |
53 |
|
| 28008 |
tejbeer |
54 |
@NamedQuery(name = "FofoOrder.selectValueOfActivatedImeis", query = "select new com.spice.profitmandi.common.model.ActivatedImeisWithSellingPrice("
|
|
|
55 |
+ " fo.fofoId, foi.brand, sum(CAST(foi.mop AS int) * foi.quantity)) "
|
|
|
56 |
+ " from FofoOrder fo join FofoOrderItem foi on fo.id = foi.orderId join FofoLineItem fli on foi.id = fli.fofoOrderItemId join ActivatedImei ai on "
|
|
|
57 |
+ " fli.serialNumber = ai.serialNumber where fo.createTimestamp between :startDate and :endDate and fo.fofoId = :fofoId and fo.cancelledTimestamp is null group by foi.brand"),
|
| 28020 |
tejbeer |
58 |
|
| 28004 |
tejbeer |
59 |
@NamedQuery(name = "FofoOrder.selectPartnersSaleByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
|
| 28020 |
tejbeer |
60 |
+ " fs.warehouseId, fs.id,sum(case when foi.quantity is null then 0 else foi.quantity end))"
|
| 28004 |
tejbeer |
61 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId "
|
|
|
62 |
+ " join FofoOrderItem foi on foi.orderId = fo.id join TagListing tl on tl.itemId = foi.itemId "
|
|
|
63 |
+ " join Item i on i.id = tl.itemId"
|
| 28020 |
tejbeer |
64 |
+ " where fs.active = 1 and fs.internal = 0 and fo.cancelledTimestamp is null and fo.createTimestamp > :startDate and i.catalogItemId in :catalogItemId and i.categoryId=10006 group by fs.id"),
|
| 27884 |
tejbeer |
65 |
|
| 28004 |
tejbeer |
66 |
@NamedQuery(name = "FofoOrder.selectPartnersSaleByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
| 28020 |
tejbeer |
67 |
+ " fs.warehouseId, fs.id,sum(case when foi.quantity is null then 0 else foi.quantity end),i.brand,i.modelName,i.modelNumber,i.catalogItemId)"
|
| 28004 |
tejbeer |
68 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId "
|
|
|
69 |
+ " join FofoOrderItem foi on foi.orderId = fo.id join TagListing tl on tl.itemId = foi.itemId "
|
|
|
70 |
+ " join Item i on i.id = tl.itemId"
|
|
|
71 |
+ " where fs.active = 1 and fs.internal = 0 and fo.cancelledTimestamp is null "
|
|
|
72 |
+ " and fo.createTimestamp > :startDate and tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by fs.id,i.catalogItemId,i.brand,i.modelName,i.modelNumber"),
|
|
|
73 |
|
| 28032 |
tejbeer |
74 |
@NamedQuery(name = "FofoOrder.selectPartnersSaleItemByCatalogIdFofoId", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
|
|
|
75 |
+ " fs.warehouseId, fs.id,sum(foi.quantity),i.brand,i.modelName,i.modelNumber,i.catalogItemId)"
|
|
|
76 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId "
|
|
|
77 |
+ " join FofoOrderItem foi on foi.orderId = fo.id join TagListing tl on tl.itemId = foi.itemId "
|
|
|
78 |
+ " join Item i on i.id = tl.itemId"
|
|
|
79 |
+ " where fs.active = 1 and fs.internal = 0 and fo.cancelledTimestamp is null and fo.createTimestamp > :startDate and i.catalogItemId in :catalogItemId and i.categoryId=10006 and fs.id = :fofoId group by i.catalogItemId, i.brand,i.modelName,i.modelNumber"),
|
|
|
80 |
|
| 28474 |
tejbeer |
81 |
@NamedQuery(name = "FofoOrder.selectSaleByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
|
|
|
82 |
+ " fs.warehouseId, fs.id,i.catalogItemId, sum(case when foi.quantity is null then 0 else foi.quantity end))"
|
|
|
83 |
+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId "
|
|
|
84 |
+ " join FofoOrderItem foi on foi.orderId = fo.id join TagListing tl on tl.itemId = foi.itemId "
|
|
|
85 |
+ " join Item i on i.id = tl.itemId"
|
| 28477 |
tejbeer |
86 |
+ " where fs.active = 1 and fs.internal = 0 and fo.cancelledTimestamp is null and fo.createTimestamp > :startDate and i.catalogItemId in :catalogItemId and fs.warehouseId in :warehouseId and i.categoryId=10006 group by i.catalogItemId, fs.id"),
|
| 28474 |
tejbeer |
87 |
|
| 31008 |
amit.gupta |
88 |
|
| 30160 |
manish |
89 |
@NamedQuery(name = "FofoOrder.selectFocoSaleReport", query = "select new com.spice.profitmandi.dao.model.FocoSaleReportModel(fs.code, ua.name,ua.city, ua.state, w.displayName, foi.itemId,"
|
|
|
90 |
+ " foi.brand, foi.modelName, foi.modelNumber, foi.color, foi.quantity, cast(foi.dp As int), cast(foi.sellingPrice As int), cast(foi.mop As int), fli.serialNumber, foi.createTimestamp, ca.name, ca.phoneNumber,"
|
|
|
91 |
+ " ca.city, ca.pinCode, fo.invoiceNumber, p.purchaseReference, fo.customerGstNumber, fo.cancelledTimestamp, p.completeTimestamp, hd.hygieneRating,hd.rating, hd.status, hd.remark,"
|
|
|
92 |
+ " hd.createdTimestamp, hd.disposedTimestamp, hd.nextTimestamp, ai.activationTimestamp, ai.createTimestamp, c.label)"
|
|
|
93 |
+ " from FofoStore fs join Warehouse w on w.id=fs.warehouseId join com.spice.profitmandi.dao.entity.user.User u on u.id=fs.id join Address ua on u.addressId = ua.id join FofoOrder fo on fo.fofoId=fs.id left join FofoOrderItem foi"
|
|
|
94 |
+ " on foi.orderId=fo.id join Item i on i.id=foi.itemId join Category c on c.id=i.categoryId left join CustomerAddress ca on ca.id=fo.customerAddressId left join FofoLineItem fli on fli.fofoOrderItemId=foi.id"
|
|
|
95 |
+ " left join InventoryItem ii on ii.id=fli.inventoryItemId left join Purchase p on ii.purchaseId=p.id left join HygieneData hd on hd.orderId=fo.id left join ActivatedImei ai on ai.serialNumber=fli.serialNumber"
|
|
|
96 |
+ " where 1=1 and (foi.createTimestamp between :startDate and :endDate or foi.createTimestamp is null) and fs.code= :code and fs.id=:fofoId group by fo.id "),
|
|
|
97 |
|
| 31008 |
amit.gupta |
98 |
@NamedQuery(name = "FofoOrder.selectFocoSaleReportByBrand", query = "select new com.spice.profitmandi.dao.model.FocoSaleReportModel(fs.code, ua.name,ua.city, ua.state, w.displayName, foi.itemId,"
|
|
|
99 |
+ " foi.brand, foi.modelName, foi.modelNumber, foi.color, foi.quantity, cast(foi.dp As int), cast(foi.sellingPrice As int), cast(foi.mop As int), fli.serialNumber, foi.createTimestamp, ca.name, ca.phoneNumber,"
|
|
|
100 |
+ " ca.city, ca.pinCode, fo.invoiceNumber, p.purchaseReference, fo.customerGstNumber, fo.cancelledTimestamp, p.completeTimestamp, hd.hygieneRating,hd.rating, hd.status, hd.remark,"
|
|
|
101 |
+ " hd.createdTimestamp, hd.disposedTimestamp, hd.nextTimestamp, ai.activationTimestamp, ai.createTimestamp, c.label)"
|
|
|
102 |
+ " from FofoStore fs join Warehouse w on w.id=fs.warehouseId join com.spice.profitmandi.dao.entity.user.User u on u.id=fs.id join Address ua on u.addressId = ua.id join FofoOrder fo on fo.fofoId=fs.id left join FofoOrderItem foi"
|
|
|
103 |
+ " on foi.orderId=fo.id join Item i on i.id=foi.itemId join Category c on c.id=i.categoryId left join CustomerAddress ca on ca.id=fo.customerAddressId left join FofoLineItem fli on fli.fofoOrderItemId=foi.id"
|
|
|
104 |
+ " left join InventoryItem ii on ii.id=fli.inventoryItemId left join Purchase p on ii.purchaseId=p.id left join HygieneData hd on hd.orderId=fo.id left join ActivatedImei ai on ai.serialNumber=fli.serialNumber"
|
|
|
105 |
+ " where (foi.createTimestamp between :startDate and :endDate or foi.createTimestamp is null) and fs.id=:fofoId and i.brand=:brand group by fo.id "),
|
|
|
106 |
|
|
|
107 |
@NamedQuery(name = "FofoOrder.selectWalletSummaryReport", query = "select new com.spice.profitmandi.dao.model.WalletSummaryReportModel(uwh.id, fs.code, ua.name, "
|
| 30160 |
manish |
108 |
+ " u.emailId, ua.phoneNumber, uwh.amount, uwh.refundableAmount, uwh.reference, uwh.referenceType, uwh.timestamp, uwh.businessTimestamp, uwh.description)"
|
|
|
109 |
+ " from FofoStore fs join com.spice.profitmandi.dao.entity.user.User u on u.id=fs.id join"
|
|
|
110 |
+ " Address ua on u.addressId=ua.id join UserWallet uw on uw.userId=fs.id join UserWalletHistory uwh on uwh.walletId=uw.id "
|
|
|
111 |
+ " where 1=1 and uwh.timestamp between :startDate and :endDate and fs.id=:fofoId group by uwh.timestamp"),
|
|
|
112 |
|
| 31008 |
amit.gupta |
113 |
|
|
|
114 |
@NamedQuery(name = "FofoOrder.selectPendingIndentReport", query = "select new com.spice.profitmandi.dao.model.PendingIndentReportModel(o.transactionId , o.id, o.createTimestamp,"
|
| 30160 |
manish |
115 |
+ " l.itemId, l.brand, l.modelName, l.modelNumber, l.color, l.quantity, l.unitPrice, o.walletAmount,case o.status when 3 then 'In Process' when 4 then 'Accepted' "
|
| 31423 |
amit.gupta |
116 |
+ " when 7 then 'Billed' when 9 then 'Shipped' when 12 then 'Delivered' when 13 then 'Cancellation in process' when 15 then 'Cancelled,amount refunded to wallet' "
|
|
|
117 |
+ " when 31 then 'Returned to Origin, refunded' when 34 then 'Low inventory cancellation, refunded' "
|
|
|
118 |
+ " else o.statusDescription end as Description, o.invoiceNumber, o.billingTimestamp ) from Order o join LineItem l on l.orderId=o.id "
|
|
|
119 |
+ " where o.partnerGrnTimestamp is null and o.retailerId= :fofoId and o.status != 1 and o.createTimestamp between :startDate and :endDate group by o.status,o.createTimestamp "),
|
| 30160 |
manish |
120 |
|
| 31423 |
amit.gupta |
121 |
@NamedQuery(name = "FofoOrder.selectSchemePayoutReport", query = "select new com.spice.profitmandi.dao.model.SchemePayoutReportModel(i.id, i.brand, i.modelName, i.modelNumber,"
|
|
|
122 |
+ " i.color,ii.unitPrice-ii.priceDropAmount,foi.dp, s.id, s.name, s.type, s.amountType, s.amount,p.purchaseReference, fo.invoiceNumber,(case when sio.rolledBackTimestamp is null "
|
|
|
123 |
+ " then sio.amount when sio.rolledBackTimestamp is not null then 0 end),sio.status, sio.statusDescription, sio.createTimestamp, sio.rolledBackTimestamp, ii.serialNumber ) from "
|
|
|
124 |
+ " SchemeInOut sio join InventoryItem ii on sio.inventoryItemId=ii.id join com.spice.profitmandi.dao.entity.catalog.Item i on i.id=ii.itemId join FofoStore fs on fs.id=ii.fofoId "
|
|
|
125 |
+ " join com.spice.profitmandi.dao.entity.user.User u on u.id = fs.id join Address ua on u.addressId = ua.id join Scheme s on sio.schemeId=s.id join Purchase p on p.id=ii.purchaseId"
|
|
|
126 |
+ " left join FofoLineItem fli on fli.inventoryItemId=ii.id left join FofoOrderItem foi on foi.id=fli.fofoOrderItemId left join FofoOrder fo on fo.id=foi.orderId where " +
|
|
|
127 |
" foi.createTimestamp between :startDate and :endDate " +
|
| 31426 |
amit.gupta |
128 |
" or ii.createTimestamp between :startDate and :endDate " +
|
| 31425 |
amit.gupta |
129 |
"and ii.fofoId= :fofoId "),
|
| 31423 |
amit.gupta |
130 |
|
|
|
131 |
@NamedQuery(name = "FofoOrder.selectInvoiceSchemeOutSummaryReport", query = "select new com.spice.profitmandi.dao.model.FocoSchemeOutReportModel(fo.invoiceNumber, foi.quantity, foi.brand,"
|
|
|
132 |
+ " foi.modelName, foi.modelNumber, foi.color, sum(cast(sio.amount As float)) ) FROM FofoOrderItem foi join FofoOrder fo on fo.id=foi.orderId join FofoLineItem fli on "
|
|
|
133 |
+ " fli.fofoOrderItemId=foi.id join SchemeInOut sio on sio.inventoryItemId=fli.inventoryItemId join Scheme s on s.id=sio.schemeId where s.type ='IN' and fo.fofoId= :fofoId and"
|
|
|
134 |
+ " fo.createTimestamp between :startDate and :endDate and sio.rolledBackTimestamp is null group by fo.id, foi.id "),
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
@NamedQuery(name = "FofoOrder.selectPartnerBillingSummaryReport", query = "select new com.spice.profitmandi.dao.model.PartnerBillingSummaryModel(o.id, o.createTimestamp, o.billingTimestamp,"
|
|
|
138 |
+ " o.deliveryTimestamp, o.partnerGrnTimestamp, o.transactionId, case when o.logisticsTransactionId is null then 'NA' else o.logisticsTransactionId end,o.airwayBillNumber, "
|
|
|
139 |
+ " os.statusSubGroup, os.statusName, o.retailerId, o.retailerName, i.id, i.brand, i.modelName, i.modelNumber, i.color, l.unitPrice, l.quantity, l.totalPrice, o.invoiceNumber,"
|
| 30178 |
manish |
140 |
+ " l.igstRate, l.cgstRate, l.sgstRate ) From Order o join LineItem l on l.orderId = o.id join Item i on l.itemId = i.id join Category c on i.categoryId = c.id join OrderStatus os on os.status=o.status"
|
|
|
141 |
+ " join FofoStore fs on fs.id=o.retailerId where 1=1 and o.billingTimestamp between :startDate and :endDate and o.retailerId = :fofoId "),
|
|
|
142 |
|
| 27579 |
tejbeer |
143 |
})
|
|
|
144 |
public class FofoOrder implements Serializable {
|
|
|
145 |
|
| 21596 |
ashik.ali |
146 |
private static final long serialVersionUID = 1L;
|
|
|
147 |
|
|
|
148 |
@Id
|
|
|
149 |
@Column(name = "id")
|
|
|
150 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
151 |
private int id;
|
| 27579 |
tejbeer |
152 |
|
| 21596 |
ashik.ali |
153 |
@Column(name = "fofo_id")
|
|
|
154 |
private int fofoId;
|
| 27579 |
tejbeer |
155 |
|
| 21596 |
ashik.ali |
156 |
@Column(name = "customer_id")
|
|
|
157 |
private int customerId;
|
| 27579 |
tejbeer |
158 |
|
| 21710 |
ashik.ali |
159 |
@Column(name = "customer_address_id")
|
|
|
160 |
private int customerAddressId;
|
| 27579 |
tejbeer |
161 |
|
| 23369 |
ashik.ali |
162 |
@Column(name = "customer_gst_number")
|
|
|
163 |
private String customerGstNumber;
|
| 27579 |
tejbeer |
164 |
|
| 21596 |
ashik.ali |
165 |
@Column(name = "total_amount")
|
|
|
166 |
private float totalAmount;
|
| 27579 |
tejbeer |
167 |
|
| 21609 |
ashik.ali |
168 |
@Column(name = "invoice_number", length = 50)
|
| 21596 |
ashik.ali |
169 |
private String invoiceNumber;
|
| 27579 |
tejbeer |
170 |
|
| 22859 |
ashik.ali |
171 |
@Column(name = "cashback")
|
|
|
172 |
private float cashback;
|
| 27579 |
tejbeer |
173 |
|
| 22009 |
ashik.ali |
174 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
| 21596 |
ashik.ali |
175 |
@Column(name = "create_timestamp")
|
| 27579 |
tejbeer |
176 |
private LocalDateTime createTimestamp = LocalDateTime.now();
|
|
|
177 |
|
| 24264 |
amit.gupta |
178 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
179 |
@Column(name = "cancelled_timestamp")
|
| 27579 |
tejbeer |
180 |
private LocalDateTime cancelledTimestamp;
|
|
|
181 |
|
|
|
182 |
// @Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
183 |
// @Column(name = "billing_timestamp")
|
| 25083 |
amit.gupta |
184 |
@Transient
|
| 27579 |
tejbeer |
185 |
private LocalDateTime billingTimestamp;
|
|
|
186 |
|
| 26817 |
amit.gupta |
187 |
@Transient
|
| 25083 |
amit.gupta |
188 |
private FofoOrderItem orderItem;
|
| 27579 |
tejbeer |
189 |
|
| 25726 |
amit.gupta |
190 |
@Transient
|
|
|
191 |
private LocalDate dateOfBirth;
|
| 27579 |
tejbeer |
192 |
|
| 25726 |
amit.gupta |
193 |
public LocalDate getDateOfBirth() {
|
|
|
194 |
return dateOfBirth;
|
|
|
195 |
}
|
| 27579 |
tejbeer |
196 |
|
| 25726 |
amit.gupta |
197 |
public void setDateOfBirth(LocalDate dateOfBirth) {
|
|
|
198 |
this.dateOfBirth = dateOfBirth;
|
|
|
199 |
}
|
| 27579 |
tejbeer |
200 |
|
| 25083 |
amit.gupta |
201 |
public FofoOrderItem getOrderItem() {
|
|
|
202 |
return orderItem;
|
|
|
203 |
}
|
| 27579 |
tejbeer |
204 |
|
| 25083 |
amit.gupta |
205 |
public void setOrderItem(FofoOrderItem orderItem) {
|
|
|
206 |
this.orderItem = orderItem;
|
|
|
207 |
}
|
| 27579 |
tejbeer |
208 |
|
| 24264 |
amit.gupta |
209 |
public LocalDateTime getCancelledTimestamp() {
|
|
|
210 |
return cancelledTimestamp;
|
|
|
211 |
}
|
| 27579 |
tejbeer |
212 |
|
| 24264 |
amit.gupta |
213 |
public void setCancelledTimestamp(LocalDateTime cancelledTimestamp) {
|
|
|
214 |
this.cancelledTimestamp = cancelledTimestamp;
|
|
|
215 |
}
|
| 27579 |
tejbeer |
216 |
|
| 21984 |
kshitij.so |
217 |
public int getId() {
|
|
|
218 |
return id;
|
|
|
219 |
}
|
| 27579 |
tejbeer |
220 |
|
| 21984 |
kshitij.so |
221 |
public void setId(int id) {
|
|
|
222 |
this.id = id;
|
|
|
223 |
}
|
| 27579 |
tejbeer |
224 |
|
| 21984 |
kshitij.so |
225 |
public int getFofoId() {
|
|
|
226 |
return fofoId;
|
|
|
227 |
}
|
| 27579 |
tejbeer |
228 |
|
| 21984 |
kshitij.so |
229 |
public void setFofoId(int fofoId) {
|
|
|
230 |
this.fofoId = fofoId;
|
|
|
231 |
}
|
| 27579 |
tejbeer |
232 |
|
| 21984 |
kshitij.so |
233 |
public int getCustomerId() {
|
|
|
234 |
return customerId;
|
|
|
235 |
}
|
| 27579 |
tejbeer |
236 |
|
| 21984 |
kshitij.so |
237 |
public void setCustomerId(int customerId) {
|
|
|
238 |
this.customerId = customerId;
|
|
|
239 |
}
|
| 27579 |
tejbeer |
240 |
|
| 21984 |
kshitij.so |
241 |
public int getCustomerAddressId() {
|
|
|
242 |
return customerAddressId;
|
|
|
243 |
}
|
| 27579 |
tejbeer |
244 |
|
| 21984 |
kshitij.so |
245 |
public void setCustomerAddressId(int customerAddressId) {
|
|
|
246 |
this.customerAddressId = customerAddressId;
|
|
|
247 |
}
|
| 27579 |
tejbeer |
248 |
|
| 23369 |
ashik.ali |
249 |
public String getCustomerGstNumber() {
|
|
|
250 |
return customerGstNumber;
|
|
|
251 |
}
|
| 27579 |
tejbeer |
252 |
|
| 23369 |
ashik.ali |
253 |
public void setCustomerGstNumber(String customerGstNumber) {
|
|
|
254 |
this.customerGstNumber = customerGstNumber;
|
|
|
255 |
}
|
| 27579 |
tejbeer |
256 |
|
| 21984 |
kshitij.so |
257 |
public float getTotalAmount() {
|
|
|
258 |
return totalAmount;
|
|
|
259 |
}
|
| 27579 |
tejbeer |
260 |
|
| 21984 |
kshitij.so |
261 |
public void setTotalAmount(float totalAmount) {
|
|
|
262 |
this.totalAmount = totalAmount;
|
|
|
263 |
}
|
| 27579 |
tejbeer |
264 |
|
| 21984 |
kshitij.so |
265 |
public String getInvoiceNumber() {
|
|
|
266 |
return invoiceNumber;
|
|
|
267 |
}
|
| 27579 |
tejbeer |
268 |
|
| 21984 |
kshitij.so |
269 |
public void setInvoiceNumber(String invoiceNumber) {
|
|
|
270 |
this.invoiceNumber = invoiceNumber;
|
|
|
271 |
}
|
| 27579 |
tejbeer |
272 |
|
| 22859 |
ashik.ali |
273 |
public float getCashback() {
|
|
|
274 |
return cashback;
|
|
|
275 |
}
|
| 27579 |
tejbeer |
276 |
|
| 22859 |
ashik.ali |
277 |
public void setCashback(float cashback) {
|
|
|
278 |
this.cashback = cashback;
|
|
|
279 |
}
|
| 27579 |
tejbeer |
280 |
|
| 21984 |
kshitij.so |
281 |
public LocalDateTime getCreateTimestamp() {
|
|
|
282 |
return createTimestamp;
|
|
|
283 |
}
|
| 27579 |
tejbeer |
284 |
|
| 21984 |
kshitij.so |
285 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
286 |
this.createTimestamp = createTimestamp;
|
|
|
287 |
}
|
| 27579 |
tejbeer |
288 |
|
|
|
289 |
public String getFormattedDate() {
|
|
|
290 |
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
|
| 22243 |
ashik.ali |
291 |
return this.createTimestamp.format(formatter);
|
| 27579 |
tejbeer |
292 |
}
|
|
|
293 |
|
| 21924 |
ashik.ali |
294 |
@Override
|
| 22009 |
ashik.ali |
295 |
public int hashCode() {
|
|
|
296 |
final int prime = 31;
|
|
|
297 |
int result = 1;
|
| 26817 |
amit.gupta |
298 |
result = prime * result + ((billingTimestamp == null) ? 0 : billingTimestamp.hashCode());
|
|
|
299 |
result = prime * result + ((cancelledTimestamp == null) ? 0 : cancelledTimestamp.hashCode());
|
|
|
300 |
result = prime * result + Float.floatToIntBits(cashback);
|
|
|
301 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
|
|
302 |
result = prime * result + customerAddressId;
|
|
|
303 |
result = prime * result + ((customerGstNumber == null) ? 0 : customerGstNumber.hashCode());
|
|
|
304 |
result = prime * result + customerId;
|
|
|
305 |
result = prime * result + ((dateOfBirth == null) ? 0 : dateOfBirth.hashCode());
|
|
|
306 |
result = prime * result + fofoId;
|
| 22009 |
ashik.ali |
307 |
result = prime * result + id;
|
| 26817 |
amit.gupta |
308 |
result = prime * result + ((invoiceNumber == null) ? 0 : invoiceNumber.hashCode());
|
|
|
309 |
result = prime * result + ((orderItem == null) ? 0 : orderItem.hashCode());
|
|
|
310 |
result = prime * result + Float.floatToIntBits(totalAmount);
|
| 22009 |
ashik.ali |
311 |
return result;
|
|
|
312 |
}
|
| 27579 |
tejbeer |
313 |
|
| 22009 |
ashik.ali |
314 |
@Override
|
|
|
315 |
public boolean equals(Object obj) {
|
|
|
316 |
if (this == obj)
|
|
|
317 |
return true;
|
|
|
318 |
if (obj == null)
|
|
|
319 |
return false;
|
|
|
320 |
if (getClass() != obj.getClass())
|
|
|
321 |
return false;
|
|
|
322 |
FofoOrder other = (FofoOrder) obj;
|
| 26817 |
amit.gupta |
323 |
if (billingTimestamp == null) {
|
|
|
324 |
if (other.billingTimestamp != null)
|
|
|
325 |
return false;
|
|
|
326 |
} else if (!billingTimestamp.equals(other.billingTimestamp))
|
|
|
327 |
return false;
|
|
|
328 |
if (cancelledTimestamp == null) {
|
|
|
329 |
if (other.cancelledTimestamp != null)
|
|
|
330 |
return false;
|
|
|
331 |
} else if (!cancelledTimestamp.equals(other.cancelledTimestamp))
|
|
|
332 |
return false;
|
|
|
333 |
if (Float.floatToIntBits(cashback) != Float.floatToIntBits(other.cashback))
|
|
|
334 |
return false;
|
|
|
335 |
if (createTimestamp == null) {
|
|
|
336 |
if (other.createTimestamp != null)
|
|
|
337 |
return false;
|
|
|
338 |
} else if (!createTimestamp.equals(other.createTimestamp))
|
|
|
339 |
return false;
|
|
|
340 |
if (customerAddressId != other.customerAddressId)
|
|
|
341 |
return false;
|
|
|
342 |
if (customerGstNumber == null) {
|
|
|
343 |
if (other.customerGstNumber != null)
|
|
|
344 |
return false;
|
|
|
345 |
} else if (!customerGstNumber.equals(other.customerGstNumber))
|
|
|
346 |
return false;
|
|
|
347 |
if (customerId != other.customerId)
|
|
|
348 |
return false;
|
|
|
349 |
if (dateOfBirth == null) {
|
|
|
350 |
if (other.dateOfBirth != null)
|
|
|
351 |
return false;
|
|
|
352 |
} else if (!dateOfBirth.equals(other.dateOfBirth))
|
|
|
353 |
return false;
|
|
|
354 |
if (fofoId != other.fofoId)
|
|
|
355 |
return false;
|
| 22009 |
ashik.ali |
356 |
if (id != other.id)
|
|
|
357 |
return false;
|
| 26817 |
amit.gupta |
358 |
if (invoiceNumber == null) {
|
|
|
359 |
if (other.invoiceNumber != null)
|
|
|
360 |
return false;
|
|
|
361 |
} else if (!invoiceNumber.equals(other.invoiceNumber))
|
|
|
362 |
return false;
|
|
|
363 |
if (orderItem == null) {
|
|
|
364 |
if (other.orderItem != null)
|
|
|
365 |
return false;
|
|
|
366 |
} else if (!orderItem.equals(other.orderItem))
|
|
|
367 |
return false;
|
|
|
368 |
if (Float.floatToIntBits(totalAmount) != Float.floatToIntBits(other.totalAmount))
|
|
|
369 |
return false;
|
| 22009 |
ashik.ali |
370 |
return true;
|
|
|
371 |
}
|
| 27586 |
tejbeer |
372 |
|
| 22009 |
ashik.ali |
373 |
@Override
|
| 21602 |
ashik.ali |
374 |
public String toString() {
|
| 21710 |
ashik.ali |
375 |
return "FofoOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", customerAddressId="
|
| 23369 |
ashik.ali |
376 |
+ customerAddressId + ", customerGstNumber=" + customerGstNumber + ", totalAmount=" + totalAmount
|
|
|
377 |
+ ", invoiceNumber=" + invoiceNumber + ", cashback=" + cashback + ", createTimestamp=" + createTimestamp
|
| 26817 |
amit.gupta |
378 |
+ ", cancelledTimestamp=" + cancelledTimestamp + ", billingTimestamp=" + billingTimestamp
|
|
|
379 |
+ ", orderItem=" + orderItem + ", dateOfBirth=" + dateOfBirth + "]";
|
| 21602 |
ashik.ali |
380 |
}
|
| 27586 |
tejbeer |
381 |
|
| 21596 |
ashik.ali |
382 |
}
|