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