| Line 10... |
Line 10... |
| 10 |
import java.util.HashMap;
|
10 |
import java.util.HashMap;
|
| 11 |
import java.util.HashSet;
|
11 |
import java.util.HashSet;
|
| 12 |
import java.util.List;
|
12 |
import java.util.List;
|
| 13 |
import java.util.Map;
|
13 |
import java.util.Map;
|
| 14 |
import java.util.Set;
|
14 |
import java.util.Set;
|
| - |
|
15 |
import java.util.stream.Collectors;
|
| 15 |
|
16 |
|
| 16 |
import javax.servlet.http.HttpServletRequest;
|
17 |
import javax.servlet.http.HttpServletRequest;
|
| 17 |
import javax.transaction.Transactional;
|
18 |
import javax.transaction.Transactional;
|
| 18 |
|
19 |
|
| 19 |
import org.apache.logging.log4j.LogManager;
|
20 |
import org.apache.logging.log4j.LogManager;
|
| Line 45... |
Line 46... |
| 45 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
46 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| 46 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
47 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 47 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
48 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| 48 |
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
|
49 |
import com.spice.profitmandi.dao.entity.fofo.SchemeItem;
|
| 49 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
50 |
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
|
| - |
|
51 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 50 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
52 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
| 51 |
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
|
53 |
import com.spice.profitmandi.dao.model.CreateSchemeRequest;
|
| 52 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
54 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 53 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
55 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
56 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
| Line 353... |
Line 355... |
| 353 |
model.addAttribute("schemes", schemes);
|
355 |
model.addAttribute("schemes", schemes);
|
| 354 |
if (schemes.size() == 0) {
|
356 |
if (schemes.size() == 0) {
|
| 355 |
return "schemes";
|
357 |
return "schemes";
|
| 356 |
}
|
358 |
}
|
| 357 |
//For 7720(HR) remove investment
|
359 |
//For 7720(HR) remove investment
|
| 358 |
/*if(fofoStoreRepository.getWarehousePartnerMap().get(7720).stream().filter(x->x.getId()==loginDetails.getFofoId()).count() > 0) {
|
360 |
if(fofoStoreRepository.getWarehousePartnerMap().get(7720).stream().filter(x->x.getId()==loginDetails.getFofoId()).count() > 0) {
|
| 359 |
schemes = schemes.stream().filter(x->!x.getType().equals(SchemeType.INVESTMENT)).collect(Collectors.toList());
|
361 |
schemes = schemes.stream().filter(x->!x.getType().equals(SchemeType.INVESTMENT)).collect(Collectors.toList());
|
| 360 |
}*/
|
362 |
}
|
| 361 |
for (Scheme scheme : schemes) {
|
363 |
for (Scheme scheme : schemes) {
|
| 362 |
if (scheme.getAmountType().equals(AmountType.PERCENTAGE)) {
|
364 |
if (scheme.getAmountType().equals(AmountType.PERCENTAGE)) {
|
| 363 |
if (tagListing != null) {
|
365 |
if (tagListing != null) {
|
| 364 |
float taxRate = stateGstRateRepository.getIgstTaxRate(Arrays.asList(searchItem))
|
366 |
float taxRate = stateGstRateRepository.getIgstTaxRate(Arrays.asList(searchItem))
|
| 365 |
.get(searchItem);
|
367 |
.get(searchItem);
|