| 22653 |
ashik.ali |
1 |
package com.spice.profitmandi.dao.entity.fofo;
|
| 22418 |
ashik.ali |
2 |
|
|
|
3 |
import java.io.Serializable;
|
| 24349 |
amit.gupta |
4 |
import java.time.LocalDate;
|
| 28166 |
tejbeer |
5 |
import java.time.LocalDateTime;
|
| 22418 |
ashik.ali |
6 |
|
|
|
7 |
import javax.persistence.Column;
|
|
|
8 |
import javax.persistence.Entity;
|
| 23786 |
amit.gupta |
9 |
import javax.persistence.EnumType;
|
|
|
10 |
import javax.persistence.Enumerated;
|
| 22418 |
ashik.ali |
11 |
import javax.persistence.Id;
|
| 27556 |
tejbeer |
12 |
import javax.persistence.NamedQueries;
|
|
|
13 |
import javax.persistence.NamedQuery;
|
| 22418 |
ashik.ali |
14 |
import javax.persistence.Table;
|
| 23786 |
amit.gupta |
15 |
import javax.persistence.Transient;
|
| 22418 |
ashik.ali |
16 |
|
| 23786 |
amit.gupta |
17 |
import com.spice.profitmandi.common.enumuration.CounterSize;
|
|
|
18 |
import com.spice.profitmandi.dao.entity.user.Address;
|
|
|
19 |
|
| 22418 |
ashik.ali |
20 |
/**
|
|
|
21 |
* This class basically contains store code details
|
|
|
22 |
*
|
|
|
23 |
* @author ashikali
|
|
|
24 |
*
|
|
|
25 |
*/
|
|
|
26 |
@Entity
|
| 27556 |
tejbeer |
27 |
@Table(name = "fofo.fofo_store", schema = "fofo")
|
|
|
28 |
|
|
|
29 |
@NamedQueries({
|
|
|
30 |
|
| 27594 |
tejbeer |
31 |
@NamedQuery(name = "FofoStore.selectGroupByBrandWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
|
|
|
32 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
33 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity else 0 end),"
|
|
|
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 concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
|
|
36 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end), "
|
|
|
37 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
|
|
|
38 |
+ " 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 where fo.cancelledTimestamp is null and fs.active = true "
|
| 27701 |
tejbeer |
39 |
+ "and foi.createTimestamp >= :lmtdStartDate and i.categoryId = :categoryId and fs.id in :fofoId"
|
|
|
40 |
+ " group by foi.brand"),
|
| 27594 |
tejbeer |
41 |
|
| 27592 |
tejbeer |
42 |
@NamedQuery(name = "FofoStore.selectGroupByWarehouseBrandWisePartnerSale", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandSaleModel("
|
|
|
43 |
+ "(case when a.city in ('Noida', 'Ghaziabad') and foi.brand = 'Vivo' then 7573 else fs.warehouseId end) AS col_0_0_,"
|
| 27574 |
tejbeer |
44 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
45 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity else 0 end),"
|
|
|
46 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
47 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
|
|
48 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end), "
|
|
|
49 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
|
| 27592 |
tejbeer |
50 |
+ " 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"
|
|
|
51 |
+ " join com.spice.profitmandi.dao.entity.user.User u on u.id = fs.id join Address a on a.id = u.addressId"
|
|
|
52 |
+ " where fo.cancelledTimestamp is null and fs.active = true"
|
| 27701 |
tejbeer |
53 |
+ " and foi.createTimestamp >= :lmtdStartDate and foi.brand = :brand and i.categoryId = :categoryId and fs.id in :fofoId"
|
| 27592 |
tejbeer |
54 |
+ " group by col_0_0_"),
|
| 27556 |
tejbeer |
55 |
|
| 27670 |
tejbeer |
56 |
@NamedQuery(name = "FofoStore.selectWarehouseBrandItemSale", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandWiseItemSaleModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
|
| 27574 |
tejbeer |
57 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
58 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity else 0 end),"
|
|
|
59 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
60 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
|
|
61 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end), "
|
|
|
62 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
|
| 27594 |
tejbeer |
63 |
+ " 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 where fo.cancelledTimestamp is null and fs.active = true"
|
| 27701 |
tejbeer |
64 |
+ " and foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and i.brand = :brand and i.categoryId = :categoryId and fs.id in :fofoId group by i.id"),
|
| 27594 |
tejbeer |
65 |
|
|
|
66 |
@NamedQuery(name = "FofoStore.selectGroupByBrandAccesoriesWarehousePartnerSale", query = "select new com.spice.profitmandi.dao.model.BrandWisePartnerSaleModel(foi.brand, "
|
|
|
67 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
68 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity else 0 end),"
|
|
|
69 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
70 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
|
|
71 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end), "
|
|
|
72 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
|
| 27592 |
tejbeer |
73 |
+ " 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 where fo.cancelledTimestamp is null and fs.active = true "
|
| 27701 |
tejbeer |
74 |
+ "and foi.createTimestamp >= :lmtdStartDate and i.categoryId != :categoryId and fs.id in :fofoId"
|
|
|
75 |
+ " group by foi.brand"),
|
| 27556 |
tejbeer |
76 |
|
| 27594 |
tejbeer |
77 |
@NamedQuery(name = "FofoStore.selectGroupByWarehouseAccesoriesBrandWisePartnerSale", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandSaleModel(fs.warehouseId,"
|
|
|
78 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
79 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity else 0 end),"
|
|
|
80 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
81 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
|
|
82 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end), "
|
|
|
83 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
|
|
|
84 |
+ " 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 where fo.cancelledTimestamp is null and fs.active = true"
|
| 27701 |
tejbeer |
85 |
+ " and foi.createTimestamp >= :lmtdStartDate and foi.brand = :brand and i.categoryId != :categoryId and fs.id in :fofoId"
|
| 27594 |
tejbeer |
86 |
+ " group by fs.warehouseId"),
|
| 27592 |
tejbeer |
87 |
|
| 27670 |
tejbeer |
88 |
@NamedQuery(name = "FofoStore.selectWarehouseAccesoriesBrandItemSale", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandWiseItemSaleModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
|
| 27591 |
tejbeer |
89 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
90 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :lms then foi.quantity else 0 end),"
|
|
|
91 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then CAST(foi.quantity*foi.mop AS int) else 0 end),"
|
|
|
92 |
+ "sum(case when concat(year(foi.createTimestamp), month(foi.createTimestamp))= :mtd then foi.quantity else 0 end), "
|
|
|
93 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then CAST(foi.quantity*foi.mop AS int) else 0 end), "
|
|
|
94 |
+ "sum(case when foi.createTimestamp between :lmtdStartDate and :lmtdEndDate then foi.quantity else 0 end))"
|
| 27556 |
tejbeer |
95 |
+ " 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 where fo.cancelledTimestamp is null and fs.active = true"
|
| 27701 |
tejbeer |
96 |
+ " and foi.createTimestamp >= :lmtdStartDate and fs.warehouseId in :warehouseId and i.brand = :brand and i.categoryId != :categoryId and fs.id in :fofoId group by i.id"),
|
| 27556 |
tejbeer |
97 |
|
| 27599 |
tejbeer |
98 |
@NamedQuery(name = "FofoStore.selectPartnerPendingIndentItem", query = "select new com.spice.profitmandi.dao.model.PartnerPendingIndentItemModel(o.retailerName,"
|
|
|
99 |
+ " li.quantity, li.totalPrice)"
|
|
|
100 |
+ " from FofoStore fs join Order o on fs.id = o.retailerId join LineItem li on li.orderId = o.id "
|
|
|
101 |
+ " where li.itemId = :itemId and fs.warehouseId = :warehouseId and o.status = 3"),
|
|
|
102 |
|
| 27670 |
tejbeer |
103 |
@NamedQuery(name = "FofoStore.selectUnbilledActivateStockGroupByBrand", query = "select new com.spice.profitmandi.dao.model.BrandWiseUnbilledActivateStockModel(i.brand,"
|
| 27676 |
tejbeer |
104 |
+ " sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
|
| 27670 |
tejbeer |
105 |
+ " sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice AS int) else 0 end))"
|
|
|
106 |
+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
|
| 27701 |
tejbeer |
107 |
+ " where fs.active = true and ii.goodQuantity >= 1 and fs.id in :fofoId group by i.brand"),
|
| 27670 |
tejbeer |
108 |
|
|
|
109 |
@NamedQuery(name = "FofoStore.selectUnbilledActivateStockGroupByWarehouse", query = "select new com.spice.profitmandi.dao.model.WarehouseWiseBrandUnbilledActivatedModel(fs.warehouseId,"
|
| 27676 |
tejbeer |
110 |
+ " sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
|
| 27670 |
tejbeer |
111 |
+ " sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice AS int) else 0 end))"
|
|
|
112 |
+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
|
| 27701 |
tejbeer |
113 |
+ " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.id in :fofoId group by fs.warehouseId"),
|
| 27670 |
tejbeer |
114 |
|
|
|
115 |
@NamedQuery(name = "FofoStore.selectWarehouseBrandItemUnbilledActivateStock", query = "select new com.spice.profitmandi.dao.model.WarehouseBrandItemUnbilledActivatedModel(fs.warehouseId,i.id, i.brand, i.modelName, i.modelNumber,i.color,"
|
| 27676 |
tejbeer |
116 |
+ " sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then 1 else 0 end),"
|
| 27670 |
tejbeer |
117 |
+ " sum(case when concat(year(ai.activationTimestamp), month(ai.activationTimestamp)) = :almtd then CAST(tl.sellingPrice AS int) else 0 end))"
|
|
|
118 |
+ " from FofoStore fs join InventoryItem ii on fs.id = ii.fofoId join ActivatedImei ai on ai.serialNumber = ii.serialNumber join Item i on i.id = ii.itemId join TagListing tl on tl.itemId = i.id"
|
| 27701 |
tejbeer |
119 |
+ " where fs.active = true and ii.goodQuantity >= 1 and i.brand = :brand and fs.warehouseId in :warehouseId and fs.id in :fofoId group by i.id"),
|
| 27670 |
tejbeer |
120 |
|
| 27556 |
tejbeer |
121 |
})
|
| 27599 |
tejbeer |
122 |
|
| 27556 |
tejbeer |
123 |
public class FofoStore implements Serializable {
|
|
|
124 |
|
| 22418 |
ashik.ali |
125 |
private static final long serialVersionUID = 1L;
|
| 27556 |
tejbeer |
126 |
|
| 22418 |
ashik.ali |
127 |
public FofoStore() {
|
|
|
128 |
}
|
| 27556 |
tejbeer |
129 |
|
| 22418 |
ashik.ali |
130 |
@Id
|
| 27556 |
tejbeer |
131 |
@Column(name = "id", unique = true, updatable = false)
|
| 22418 |
ashik.ali |
132 |
private int id;
|
| 27556 |
tejbeer |
133 |
|
|
|
134 |
@Column(name = "code", unique = true)
|
| 22418 |
ashik.ali |
135 |
private String code;
|
| 27556 |
tejbeer |
136 |
|
| 23847 |
ashik.ali |
137 |
@Column(name = "latitude")
|
|
|
138 |
private String latitude;
|
| 27556 |
tejbeer |
139 |
|
| 23847 |
ashik.ali |
140 |
@Column(name = "longitude")
|
|
|
141 |
private String longitude;
|
| 27556 |
tejbeer |
142 |
|
|
|
143 |
@Column(name = "counter_size")
|
| 23786 |
amit.gupta |
144 |
@Enumerated(EnumType.STRING)
|
|
|
145 |
private CounterSize counterSize = CounterSize.TEN_LAC;
|
| 27556 |
tejbeer |
146 |
|
|
|
147 |
@Column(name = "warehouse_id")
|
| 25069 |
amit.gupta |
148 |
private int warehouseId;
|
| 27556 |
tejbeer |
149 |
|
|
|
150 |
@Column(name = "minimum_investment")
|
| 23884 |
amit.gupta |
151 |
private float minimumInvestment;
|
| 27556 |
tejbeer |
152 |
|
|
|
153 |
@Column(name = "grace_date")
|
| 24349 |
amit.gupta |
154 |
private LocalDate graceDate;
|
| 27556 |
tejbeer |
155 |
|
|
|
156 |
@Column(name = "investment_ok")
|
| 25276 |
amit.gupta |
157 |
private boolean investmentOk;
|
| 27556 |
tejbeer |
158 |
|
| 27903 |
tejbeer |
159 |
@Column
|
|
|
160 |
private boolean active = true;
|
|
|
161 |
|
|
|
162 |
@Transient
|
|
|
163 |
private Address userAddress;
|
|
|
164 |
|
|
|
165 |
@Column(name = "internal")
|
|
|
166 |
private boolean internal;
|
|
|
167 |
|
| 28166 |
tejbeer |
168 |
@Column(name = "bags_last_credited")
|
|
|
169 |
private LocalDateTime bagsLastCredited;
|
|
|
170 |
|
|
|
171 |
public LocalDateTime getBagsLastCredited() {
|
|
|
172 |
return bagsLastCredited;
|
|
|
173 |
}
|
|
|
174 |
|
|
|
175 |
public void setBagsLastCredited(LocalDateTime bagsLastCredited) {
|
|
|
176 |
this.bagsLastCredited = bagsLastCredited;
|
|
|
177 |
}
|
|
|
178 |
|
| 27903 |
tejbeer |
179 |
public boolean isInternal() {
|
|
|
180 |
return internal;
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
public void setInternal(boolean internal) {
|
|
|
184 |
this.internal = internal;
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
public int getWarehouseId() {
|
|
|
188 |
return warehouseId;
|
|
|
189 |
}
|
|
|
190 |
|
|
|
191 |
public void setWarehouseId(int warehouseId) {
|
|
|
192 |
this.warehouseId = warehouseId;
|
|
|
193 |
}
|
|
|
194 |
|
| 25276 |
amit.gupta |
195 |
public boolean isInvestmentOk() {
|
|
|
196 |
return investmentOk;
|
|
|
197 |
}
|
| 27556 |
tejbeer |
198 |
|
| 25276 |
amit.gupta |
199 |
public void setInvestmentOk(boolean investmentOk) {
|
|
|
200 |
this.investmentOk = investmentOk;
|
|
|
201 |
}
|
|
|
202 |
|
| 27556 |
tejbeer |
203 |
@Column(name = "grace_count")
|
| 24349 |
amit.gupta |
204 |
private int graceCount;
|
| 24843 |
govind |
205 |
|
| 24349 |
amit.gupta |
206 |
public int getGraceCount() {
|
|
|
207 |
return graceCount;
|
|
|
208 |
}
|
| 27556 |
tejbeer |
209 |
|
| 24843 |
govind |
210 |
public boolean isActive() {
|
|
|
211 |
return active;
|
|
|
212 |
}
|
| 27556 |
tejbeer |
213 |
|
| 24843 |
govind |
214 |
public void setActive(boolean active) {
|
|
|
215 |
this.active = active;
|
|
|
216 |
}
|
| 27556 |
tejbeer |
217 |
|
| 24349 |
amit.gupta |
218 |
public void setGraceCount(int graceCount) {
|
|
|
219 |
this.graceCount = graceCount;
|
|
|
220 |
}
|
| 27556 |
tejbeer |
221 |
|
| 24349 |
amit.gupta |
222 |
public LocalDate getGraceDate() {
|
|
|
223 |
return graceDate;
|
|
|
224 |
}
|
| 27556 |
tejbeer |
225 |
|
| 24349 |
amit.gupta |
226 |
public void setGraceDate(LocalDate graceDate) {
|
|
|
227 |
this.graceDate = graceDate;
|
|
|
228 |
}
|
| 27556 |
tejbeer |
229 |
|
| 23884 |
amit.gupta |
230 |
public float getMinimumInvestment() {
|
|
|
231 |
return minimumInvestment;
|
|
|
232 |
}
|
| 27556 |
tejbeer |
233 |
|
| 23884 |
amit.gupta |
234 |
public void setMinimumInvestment(float minimumInvestment) {
|
|
|
235 |
this.minimumInvestment = minimumInvestment;
|
|
|
236 |
}
|
|
|
237 |
|
| 27556 |
tejbeer |
238 |
/*
|
|
|
239 |
* public int getCreditCycle() { return creditCycle; } public void
|
|
|
240 |
* setCreditCycle(int creditCycle) { this.creditCycle = creditCycle; }
|
|
|
241 |
*/
|
| 23786 |
amit.gupta |
242 |
public CounterSize getCounterSize() {
|
| 23716 |
amit.gupta |
243 |
return counterSize;
|
|
|
244 |
}
|
| 27556 |
tejbeer |
245 |
|
| 23786 |
amit.gupta |
246 |
public void setCounterSize(CounterSize counterSize) {
|
| 23716 |
amit.gupta |
247 |
this.counterSize = counterSize;
|
|
|
248 |
}
|
| 27556 |
tejbeer |
249 |
|
| 22418 |
ashik.ali |
250 |
public int getId() {
|
|
|
251 |
return id;
|
|
|
252 |
}
|
| 27556 |
tejbeer |
253 |
|
| 22418 |
ashik.ali |
254 |
public void setId(int id) {
|
|
|
255 |
this.id = id;
|
|
|
256 |
}
|
| 27556 |
tejbeer |
257 |
|
|
|
258 |
public String getCode() {
|
| 22418 |
ashik.ali |
259 |
return code;
|
|
|
260 |
}
|
| 27556 |
tejbeer |
261 |
|
|
|
262 |
public void setCode(String code) {
|
| 22418 |
ashik.ali |
263 |
this.code = code;
|
|
|
264 |
}
|
| 27556 |
tejbeer |
265 |
|
|
|
266 |
public String getLatitude() {
|
| 23847 |
ashik.ali |
267 |
return latitude;
|
|
|
268 |
}
|
| 27556 |
tejbeer |
269 |
|
|
|
270 |
public void setLatitude(String latitude) {
|
| 23847 |
ashik.ali |
271 |
this.latitude = latitude;
|
|
|
272 |
}
|
| 27556 |
tejbeer |
273 |
|
|
|
274 |
public String getLongitude() {
|
| 23847 |
ashik.ali |
275 |
return longitude;
|
|
|
276 |
}
|
| 27556 |
tejbeer |
277 |
|
|
|
278 |
public void setLongitude(String longitude) {
|
| 23847 |
ashik.ali |
279 |
this.longitude = longitude;
|
|
|
280 |
}
|
| 27556 |
tejbeer |
281 |
|
| 23786 |
amit.gupta |
282 |
public Address getUserAddress() {
|
|
|
283 |
return userAddress;
|
|
|
284 |
}
|
| 27556 |
tejbeer |
285 |
|
| 23786 |
amit.gupta |
286 |
public void setUserAddress(Address userAddress) {
|
|
|
287 |
this.userAddress = userAddress;
|
|
|
288 |
}
|
| 27556 |
tejbeer |
289 |
|
| 22418 |
ashik.ali |
290 |
@Override
|
|
|
291 |
public int hashCode() {
|
|
|
292 |
final int prime = 31;
|
|
|
293 |
int result = 1;
|
| 25276 |
amit.gupta |
294 |
result = prime * result + (active ? 1231 : 1237);
|
| 24349 |
amit.gupta |
295 |
result = prime * result + ((code == null) ? 0 : code.hashCode());
|
|
|
296 |
result = prime * result + ((counterSize == null) ? 0 : counterSize.hashCode());
|
|
|
297 |
result = prime * result + graceCount;
|
|
|
298 |
result = prime * result + ((graceDate == null) ? 0 : graceDate.hashCode());
|
| 22418 |
ashik.ali |
299 |
result = prime * result + id;
|
| 27903 |
tejbeer |
300 |
result = prime * result + (internal ? 1231 : 1237);
|
| 25276 |
amit.gupta |
301 |
result = prime * result + (investmentOk ? 1231 : 1237);
|
| 24349 |
amit.gupta |
302 |
result = prime * result + ((latitude == null) ? 0 : latitude.hashCode());
|
|
|
303 |
result = prime * result + ((longitude == null) ? 0 : longitude.hashCode());
|
|
|
304 |
result = prime * result + Float.floatToIntBits(minimumInvestment);
|
|
|
305 |
result = prime * result + ((userAddress == null) ? 0 : userAddress.hashCode());
|
| 25276 |
amit.gupta |
306 |
result = prime * result + warehouseId;
|
| 22418 |
ashik.ali |
307 |
return result;
|
|
|
308 |
}
|
| 27556 |
tejbeer |
309 |
|
| 22418 |
ashik.ali |
310 |
@Override
|
|
|
311 |
public boolean equals(Object obj) {
|
|
|
312 |
if (this == obj)
|
|
|
313 |
return true;
|
|
|
314 |
if (obj == null)
|
|
|
315 |
return false;
|
|
|
316 |
if (getClass() != obj.getClass())
|
|
|
317 |
return false;
|
|
|
318 |
FofoStore other = (FofoStore) obj;
|
| 25276 |
amit.gupta |
319 |
if (active != other.active)
|
|
|
320 |
return false;
|
| 24349 |
amit.gupta |
321 |
if (code == null) {
|
|
|
322 |
if (other.code != null)
|
|
|
323 |
return false;
|
|
|
324 |
} else if (!code.equals(other.code))
|
|
|
325 |
return false;
|
|
|
326 |
if (counterSize != other.counterSize)
|
|
|
327 |
return false;
|
|
|
328 |
if (graceCount != other.graceCount)
|
|
|
329 |
return false;
|
|
|
330 |
if (graceDate == null) {
|
|
|
331 |
if (other.graceDate != null)
|
|
|
332 |
return false;
|
|
|
333 |
} else if (!graceDate.equals(other.graceDate))
|
|
|
334 |
return false;
|
| 22418 |
ashik.ali |
335 |
if (id != other.id)
|
|
|
336 |
return false;
|
| 27903 |
tejbeer |
337 |
if (internal != other.internal)
|
|
|
338 |
return false;
|
| 25276 |
amit.gupta |
339 |
if (investmentOk != other.investmentOk)
|
|
|
340 |
return false;
|
| 24349 |
amit.gupta |
341 |
if (latitude == null) {
|
|
|
342 |
if (other.latitude != null)
|
|
|
343 |
return false;
|
|
|
344 |
} else if (!latitude.equals(other.latitude))
|
|
|
345 |
return false;
|
|
|
346 |
if (longitude == null) {
|
|
|
347 |
if (other.longitude != null)
|
|
|
348 |
return false;
|
|
|
349 |
} else if (!longitude.equals(other.longitude))
|
|
|
350 |
return false;
|
|
|
351 |
if (Float.floatToIntBits(minimumInvestment) != Float.floatToIntBits(other.minimumInvestment))
|
|
|
352 |
return false;
|
|
|
353 |
if (userAddress == null) {
|
|
|
354 |
if (other.userAddress != null)
|
|
|
355 |
return false;
|
|
|
356 |
} else if (!userAddress.equals(other.userAddress))
|
|
|
357 |
return false;
|
| 25276 |
amit.gupta |
358 |
if (warehouseId != other.warehouseId)
|
|
|
359 |
return false;
|
| 22418 |
ashik.ali |
360 |
return true;
|
|
|
361 |
}
|
| 27556 |
tejbeer |
362 |
|
| 22418 |
ashik.ali |
363 |
@Override
|
|
|
364 |
public String toString() {
|
| 23884 |
amit.gupta |
365 |
return "FofoStore [id=" + id + ", code=" + code + ", latitude=" + latitude + ", longitude=" + longitude
|
| 25069 |
amit.gupta |
366 |
+ ", counterSize=" + counterSize + ", warehouseId=" + warehouseId + ", minimumInvestment="
|
| 27903 |
tejbeer |
367 |
+ minimumInvestment + ", graceDate=" + graceDate + ", investmentOk=" + investmentOk + ", active="
|
|
|
368 |
+ active + ", userAddress=" + userAddress + ", internal=" + internal + ", graceCount=" + graceCount
|
|
|
369 |
+ "]";
|
| 22418 |
ashik.ali |
370 |
}
|
| 27556 |
tejbeer |
371 |
|
| 22418 |
ashik.ali |
372 |
}
|