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