Subversion Repositories SmartDukaan

Rev

Rev 28451 | Rev 28825 | 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;
28709 amit.gupta 173
 
174
	@Column(name = "active_timestamp")
175
	private LocalDateTime activeTimeStamp;
28166 tejbeer 176
 
177
	public LocalDateTime getBagsLastCredited() {
178
		return bagsLastCredited;
179
	}
180
 
181
	public void setBagsLastCredited(LocalDateTime bagsLastCredited) {
182
		this.bagsLastCredited = bagsLastCredited;
183
	}
184
 
27903 tejbeer 185
	public boolean isInternal() {
186
		return internal;
187
	}
188
 
189
	public void setInternal(boolean internal) {
190
		this.internal = internal;
191
	}
192
 
193
	public int getWarehouseId() {
194
		return warehouseId;
195
	}
196
 
197
	public void setWarehouseId(int warehouseId) {
198
		this.warehouseId = warehouseId;
199
	}
200
 
25276 amit.gupta 201
	public boolean isInvestmentOk() {
202
		return investmentOk;
203
	}
27556 tejbeer 204
 
25276 amit.gupta 205
	public void setInvestmentOk(boolean investmentOk) {
206
		this.investmentOk = investmentOk;
207
	}
208
 
27556 tejbeer 209
	@Column(name = "grace_count")
24349 amit.gupta 210
	private int graceCount;
24843 govind 211
 
24349 amit.gupta 212
	public int getGraceCount() {
213
		return graceCount;
214
	}
27556 tejbeer 215
 
24843 govind 216
	public boolean isActive() {
217
		return active;
218
	}
27556 tejbeer 219
 
24843 govind 220
	public void setActive(boolean active) {
221
		this.active = active;
222
	}
27556 tejbeer 223
 
24349 amit.gupta 224
	public void setGraceCount(int graceCount) {
225
		this.graceCount = graceCount;
226
	}
27556 tejbeer 227
 
24349 amit.gupta 228
	public LocalDate getGraceDate() {
229
		return graceDate;
230
	}
27556 tejbeer 231
 
24349 amit.gupta 232
	public void setGraceDate(LocalDate graceDate) {
233
		this.graceDate = graceDate;
234
	}
27556 tejbeer 235
 
23884 amit.gupta 236
	public float getMinimumInvestment() {
237
		return minimumInvestment;
238
	}
27556 tejbeer 239
 
23884 amit.gupta 240
	public void setMinimumInvestment(float minimumInvestment) {
241
		this.minimumInvestment = minimumInvestment;
242
	}
243
 
27556 tejbeer 244
	/*
245
	 * public int getCreditCycle() { return creditCycle; } public void
246
	 * setCreditCycle(int creditCycle) { this.creditCycle = creditCycle; }
247
	 */
23786 amit.gupta 248
	public CounterSize getCounterSize() {
23716 amit.gupta 249
		return counterSize;
250
	}
27556 tejbeer 251
 
23786 amit.gupta 252
	public void setCounterSize(CounterSize counterSize) {
23716 amit.gupta 253
		this.counterSize = counterSize;
254
	}
27556 tejbeer 255
 
22418 ashik.ali 256
	public int getId() {
257
		return id;
258
	}
27556 tejbeer 259
 
22418 ashik.ali 260
	public void setId(int id) {
261
		this.id = id;
262
	}
27556 tejbeer 263
 
264
	public String getCode() {
22418 ashik.ali 265
		return code;
266
	}
27556 tejbeer 267
 
268
	public void setCode(String code) {
22418 ashik.ali 269
		this.code = code;
270
	}
27556 tejbeer 271
 
272
	public String getLatitude() {
23847 ashik.ali 273
		return latitude;
274
	}
27556 tejbeer 275
 
276
	public void setLatitude(String latitude) {
23847 ashik.ali 277
		this.latitude = latitude;
278
	}
27556 tejbeer 279
 
280
	public String getLongitude() {
23847 ashik.ali 281
		return longitude;
282
	}
27556 tejbeer 283
 
284
	public void setLongitude(String longitude) {
23847 ashik.ali 285
		this.longitude = longitude;
286
	}
27556 tejbeer 287
 
23786 amit.gupta 288
	public Address getUserAddress() {
289
		return userAddress;
290
	}
27556 tejbeer 291
 
23786 amit.gupta 292
	public void setUserAddress(Address userAddress) {
293
		this.userAddress = userAddress;
294
	}
28709 amit.gupta 295
 
296
 
27556 tejbeer 297
 
28709 amit.gupta 298
	public LocalDateTime getActiveTimeStamp() {
299
		return activeTimeStamp;
300
	}
301
 
302
	public void setActiveTimeStamp(LocalDateTime activeTimeStamp) {
303
		this.activeTimeStamp = activeTimeStamp;
304
	}
305
 
22418 ashik.ali 306
	@Override
307
	public int hashCode() {
308
		final int prime = 31;
309
		int result = 1;
25276 amit.gupta 310
		result = prime * result + (active ? 1231 : 1237);
24349 amit.gupta 311
		result = prime * result + ((code == null) ? 0 : code.hashCode());
312
		result = prime * result + ((counterSize == null) ? 0 : counterSize.hashCode());
313
		result = prime * result + graceCount;
314
		result = prime * result + ((graceDate == null) ? 0 : graceDate.hashCode());
22418 ashik.ali 315
		result = prime * result + id;
27903 tejbeer 316
		result = prime * result + (internal ? 1231 : 1237);
25276 amit.gupta 317
		result = prime * result + (investmentOk ? 1231 : 1237);
24349 amit.gupta 318
		result = prime * result + ((latitude == null) ? 0 : latitude.hashCode());
319
		result = prime * result + ((longitude == null) ? 0 : longitude.hashCode());
320
		result = prime * result + Float.floatToIntBits(minimumInvestment);
321
		result = prime * result + ((userAddress == null) ? 0 : userAddress.hashCode());
25276 amit.gupta 322
		result = prime * result + warehouseId;
22418 ashik.ali 323
		return result;
324
	}
27556 tejbeer 325
 
22418 ashik.ali 326
	@Override
327
	public boolean equals(Object obj) {
328
		if (this == obj)
329
			return true;
330
		if (obj == null)
331
			return false;
332
		if (getClass() != obj.getClass())
333
			return false;
334
		FofoStore other = (FofoStore) obj;
25276 amit.gupta 335
		if (active != other.active)
336
			return false;
24349 amit.gupta 337
		if (code == null) {
338
			if (other.code != null)
339
				return false;
340
		} else if (!code.equals(other.code))
341
			return false;
342
		if (counterSize != other.counterSize)
343
			return false;
344
		if (graceCount != other.graceCount)
345
			return false;
346
		if (graceDate == null) {
347
			if (other.graceDate != null)
348
				return false;
349
		} else if (!graceDate.equals(other.graceDate))
350
			return false;
22418 ashik.ali 351
		if (id != other.id)
352
			return false;
27903 tejbeer 353
		if (internal != other.internal)
354
			return false;
25276 amit.gupta 355
		if (investmentOk != other.investmentOk)
356
			return false;
24349 amit.gupta 357
		if (latitude == null) {
358
			if (other.latitude != null)
359
				return false;
360
		} else if (!latitude.equals(other.latitude))
361
			return false;
362
		if (longitude == null) {
363
			if (other.longitude != null)
364
				return false;
365
		} else if (!longitude.equals(other.longitude))
366
			return false;
367
		if (Float.floatToIntBits(minimumInvestment) != Float.floatToIntBits(other.minimumInvestment))
368
			return false;
369
		if (userAddress == null) {
370
			if (other.userAddress != null)
371
				return false;
372
		} else if (!userAddress.equals(other.userAddress))
373
			return false;
25276 amit.gupta 374
		if (warehouseId != other.warehouseId)
375
			return false;
22418 ashik.ali 376
		return true;
377
	}
27556 tejbeer 378
 
22418 ashik.ali 379
	@Override
380
	public String toString() {
23884 amit.gupta 381
		return "FofoStore [id=" + id + ", code=" + code + ", latitude=" + latitude + ", longitude=" + longitude
25069 amit.gupta 382
				+ ", counterSize=" + counterSize + ", warehouseId=" + warehouseId + ", minimumInvestment="
27903 tejbeer 383
				+ minimumInvestment + ", graceDate=" + graceDate + ", investmentOk=" + investmentOk + ", active="
28709 amit.gupta 384
				+ active + ", userAddress=" + userAddress + ", internal=" + internal + ", bagsLastCredited="
385
				+ bagsLastCredited + ", activeTimeStamp=" + activeTimeStamp + ", graceCount=" + graceCount + "]";
22418 ashik.ali 386
	}
27556 tejbeer 387
 
28709 amit.gupta 388
 
389
 
22418 ashik.ali 390
}