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