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