Subversion Repositories SmartDukaan

Rev

Rev 28166 | Rev 28709 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
 
28451 tejbeer 121
		@NamedQuery(name = "FofoStore.selectGroupByBrandLms", query = "select new com.spice.profitmandi.dao.model.BrandWiseModel(foi.brand, DATE_FORMAT(fo.createTimestamp, '%m-%Y'),sum(cast(foi.mop*foi.quantity As int)))"
122
				+ " 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 "
123
				+ " and foi.createTimestamp >= :lmsStartDate and i.categoryId = :categoryId and fs.id in :fofoId and fs.warehouseId in :warehouseId"
124
				+ " group by foi.brand,DATE_FORMAT(fo.createTimestamp, '%m-%Y')"), })
27599 tejbeer 125
 
27556 tejbeer 126
public class FofoStore implements Serializable {
127
 
22418 ashik.ali 128
	private static final long serialVersionUID = 1L;
27556 tejbeer 129
 
22418 ashik.ali 130
	public FofoStore() {
131
	}
27556 tejbeer 132
 
22418 ashik.ali 133
	@Id
27556 tejbeer 134
	@Column(name = "id", unique = true, updatable = false)
22418 ashik.ali 135
	private int id;
27556 tejbeer 136
 
137
	@Column(name = "code", unique = true)
22418 ashik.ali 138
	private String code;
27556 tejbeer 139
 
23847 ashik.ali 140
	@Column(name = "latitude")
141
	private String latitude;
27556 tejbeer 142
 
23847 ashik.ali 143
	@Column(name = "longitude")
144
	private String longitude;
27556 tejbeer 145
 
146
	@Column(name = "counter_size")
23786 amit.gupta 147
	@Enumerated(EnumType.STRING)
148
	private CounterSize counterSize = CounterSize.TEN_LAC;
27556 tejbeer 149
 
150
	@Column(name = "warehouse_id")
25069 amit.gupta 151
	private int warehouseId;
27556 tejbeer 152
 
153
	@Column(name = "minimum_investment")
23884 amit.gupta 154
	private float minimumInvestment;
27556 tejbeer 155
 
156
	@Column(name = "grace_date")
24349 amit.gupta 157
	private LocalDate graceDate;
27556 tejbeer 158
 
159
	@Column(name = "investment_ok")
25276 amit.gupta 160
	private boolean investmentOk;
27556 tejbeer 161
 
27903 tejbeer 162
	@Column
163
	private boolean active = true;
164
 
165
	@Transient
166
	private Address userAddress;
167
 
168
	@Column(name = "internal")
169
	private boolean internal;
170
 
28166 tejbeer 171
	@Column(name = "bags_last_credited")
172
	private LocalDateTime bagsLastCredited;
173
 
174
	public LocalDateTime getBagsLastCredited() {
175
		return bagsLastCredited;
176
	}
177
 
178
	public void setBagsLastCredited(LocalDateTime bagsLastCredited) {
179
		this.bagsLastCredited = bagsLastCredited;
180
	}
181
 
27903 tejbeer 182
	public boolean isInternal() {
183
		return internal;
184
	}
185
 
186
	public void setInternal(boolean internal) {
187
		this.internal = internal;
188
	}
189
 
190
	public int getWarehouseId() {
191
		return warehouseId;
192
	}
193
 
194
	public void setWarehouseId(int warehouseId) {
195
		this.warehouseId = warehouseId;
196
	}
197
 
25276 amit.gupta 198
	public boolean isInvestmentOk() {
199
		return investmentOk;
200
	}
27556 tejbeer 201
 
25276 amit.gupta 202
	public void setInvestmentOk(boolean investmentOk) {
203
		this.investmentOk = investmentOk;
204
	}
205
 
27556 tejbeer 206
	@Column(name = "grace_count")
24349 amit.gupta 207
	private int graceCount;
24843 govind 208
 
24349 amit.gupta 209
	public int getGraceCount() {
210
		return graceCount;
211
	}
27556 tejbeer 212
 
24843 govind 213
	public boolean isActive() {
214
		return active;
215
	}
27556 tejbeer 216
 
24843 govind 217
	public void setActive(boolean active) {
218
		this.active = active;
219
	}
27556 tejbeer 220
 
24349 amit.gupta 221
	public void setGraceCount(int graceCount) {
222
		this.graceCount = graceCount;
223
	}
27556 tejbeer 224
 
24349 amit.gupta 225
	public LocalDate getGraceDate() {
226
		return graceDate;
227
	}
27556 tejbeer 228
 
24349 amit.gupta 229
	public void setGraceDate(LocalDate graceDate) {
230
		this.graceDate = graceDate;
231
	}
27556 tejbeer 232
 
23884 amit.gupta 233
	public float getMinimumInvestment() {
234
		return minimumInvestment;
235
	}
27556 tejbeer 236
 
23884 amit.gupta 237
	public void setMinimumInvestment(float minimumInvestment) {
238
		this.minimumInvestment = minimumInvestment;
239
	}
240
 
27556 tejbeer 241
	/*
242
	 * public int getCreditCycle() { return creditCycle; } public void
243
	 * setCreditCycle(int creditCycle) { this.creditCycle = creditCycle; }
244
	 */
23786 amit.gupta 245
	public CounterSize getCounterSize() {
23716 amit.gupta 246
		return counterSize;
247
	}
27556 tejbeer 248
 
23786 amit.gupta 249
	public void setCounterSize(CounterSize counterSize) {
23716 amit.gupta 250
		this.counterSize = counterSize;
251
	}
27556 tejbeer 252
 
22418 ashik.ali 253
	public int getId() {
254
		return id;
255
	}
27556 tejbeer 256
 
22418 ashik.ali 257
	public void setId(int id) {
258
		this.id = id;
259
	}
27556 tejbeer 260
 
261
	public String getCode() {
22418 ashik.ali 262
		return code;
263
	}
27556 tejbeer 264
 
265
	public void setCode(String code) {
22418 ashik.ali 266
		this.code = code;
267
	}
27556 tejbeer 268
 
269
	public String getLatitude() {
23847 ashik.ali 270
		return latitude;
271
	}
27556 tejbeer 272
 
273
	public void setLatitude(String latitude) {
23847 ashik.ali 274
		this.latitude = latitude;
275
	}
27556 tejbeer 276
 
277
	public String getLongitude() {
23847 ashik.ali 278
		return longitude;
279
	}
27556 tejbeer 280
 
281
	public void setLongitude(String longitude) {
23847 ashik.ali 282
		this.longitude = longitude;
283
	}
27556 tejbeer 284
 
23786 amit.gupta 285
	public Address getUserAddress() {
286
		return userAddress;
287
	}
27556 tejbeer 288
 
23786 amit.gupta 289
	public void setUserAddress(Address userAddress) {
290
		this.userAddress = userAddress;
291
	}
27556 tejbeer 292
 
22418 ashik.ali 293
	@Override
294
	public int hashCode() {
295
		final int prime = 31;
296
		int result = 1;
25276 amit.gupta 297
		result = prime * result + (active ? 1231 : 1237);
24349 amit.gupta 298
		result = prime * result + ((code == null) ? 0 : code.hashCode());
299
		result = prime * result + ((counterSize == null) ? 0 : counterSize.hashCode());
300
		result = prime * result + graceCount;
301
		result = prime * result + ((graceDate == null) ? 0 : graceDate.hashCode());
22418 ashik.ali 302
		result = prime * result + id;
27903 tejbeer 303
		result = prime * result + (internal ? 1231 : 1237);
25276 amit.gupta 304
		result = prime * result + (investmentOk ? 1231 : 1237);
24349 amit.gupta 305
		result = prime * result + ((latitude == null) ? 0 : latitude.hashCode());
306
		result = prime * result + ((longitude == null) ? 0 : longitude.hashCode());
307
		result = prime * result + Float.floatToIntBits(minimumInvestment);
308
		result = prime * result + ((userAddress == null) ? 0 : userAddress.hashCode());
25276 amit.gupta 309
		result = prime * result + warehouseId;
22418 ashik.ali 310
		return result;
311
	}
27556 tejbeer 312
 
22418 ashik.ali 313
	@Override
314
	public boolean equals(Object obj) {
315
		if (this == obj)
316
			return true;
317
		if (obj == null)
318
			return false;
319
		if (getClass() != obj.getClass())
320
			return false;
321
		FofoStore other = (FofoStore) obj;
25276 amit.gupta 322
		if (active != other.active)
323
			return false;
24349 amit.gupta 324
		if (code == null) {
325
			if (other.code != null)
326
				return false;
327
		} else if (!code.equals(other.code))
328
			return false;
329
		if (counterSize != other.counterSize)
330
			return false;
331
		if (graceCount != other.graceCount)
332
			return false;
333
		if (graceDate == null) {
334
			if (other.graceDate != null)
335
				return false;
336
		} else if (!graceDate.equals(other.graceDate))
337
			return false;
22418 ashik.ali 338
		if (id != other.id)
339
			return false;
27903 tejbeer 340
		if (internal != other.internal)
341
			return false;
25276 amit.gupta 342
		if (investmentOk != other.investmentOk)
343
			return false;
24349 amit.gupta 344
		if (latitude == null) {
345
			if (other.latitude != null)
346
				return false;
347
		} else if (!latitude.equals(other.latitude))
348
			return false;
349
		if (longitude == null) {
350
			if (other.longitude != null)
351
				return false;
352
		} else if (!longitude.equals(other.longitude))
353
			return false;
354
		if (Float.floatToIntBits(minimumInvestment) != Float.floatToIntBits(other.minimumInvestment))
355
			return false;
356
		if (userAddress == null) {
357
			if (other.userAddress != null)
358
				return false;
359
		} else if (!userAddress.equals(other.userAddress))
360
			return false;
25276 amit.gupta 361
		if (warehouseId != other.warehouseId)
362
			return false;
22418 ashik.ali 363
		return true;
364
	}
27556 tejbeer 365
 
22418 ashik.ali 366
	@Override
367
	public String toString() {
23884 amit.gupta 368
		return "FofoStore [id=" + id + ", code=" + code + ", latitude=" + latitude + ", longitude=" + longitude
25069 amit.gupta 369
				+ ", counterSize=" + counterSize + ", warehouseId=" + warehouseId + ", minimumInvestment="
27903 tejbeer 370
				+ minimumInvestment + ", graceDate=" + graceDate + ", investmentOk=" + investmentOk + ", active="
371
				+ active + ", userAddress=" + userAddress + ", internal=" + internal + ", graceCount=" + graceCount
372
				+ "]";
22418 ashik.ali 373
	}
27556 tejbeer 374
 
22418 ashik.ali 375
}