| Line 110... |
Line 110... |
| 110 |
import com.spice.profitmandi.dao.repository.catalog.FocusedModelRepository;
|
110 |
import com.spice.profitmandi.dao.repository.catalog.FocusedModelRepository;
|
| 111 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
111 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 112 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
112 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
| 113 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
113 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
| 114 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
114 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| - |
|
115 |
import com.spice.profitmandi.dao.repository.cs.PartnerRegionRepository;
|
| 115 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
116 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
| - |
|
117 |
import com.spice.profitmandi.dao.repository.cs.RegionRepository;
|
| 116 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
118 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
| 117 |
import com.spice.profitmandi.dao.repository.dtr.DailyRechargeRepository;
|
119 |
import com.spice.profitmandi.dao.repository.dtr.DailyRechargeRepository;
|
| 118 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
120 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 119 |
import com.spice.profitmandi.dao.repository.dtr.FranchiseeActivityRepository;
|
121 |
import com.spice.profitmandi.dao.repository.dtr.FranchiseeActivityRepository;
|
| 120 |
import com.spice.profitmandi.dao.repository.dtr.FranchiseeVisitRepository;
|
122 |
import com.spice.profitmandi.dao.repository.dtr.FranchiseeVisitRepository;
|
| Line 178... |
Line 180... |
| 178 |
|
180 |
|
| 179 |
@Value("${oxigen.recharge.enquiry.url}")
|
181 |
@Value("${oxigen.recharge.enquiry.url}")
|
| 180 |
private String oxigenRechargeEnquiryUrl;
|
182 |
private String oxigenRechargeEnquiryUrl;
|
| 181 |
|
183 |
|
| 182 |
@Autowired
|
184 |
@Autowired
|
| - |
|
185 |
private RegionRepository regionRepository;
|
| - |
|
186 |
|
| - |
|
187 |
@Autowired
|
| - |
|
188 |
private PartnerRegionRepository partnerRegionRepository;
|
| - |
|
189 |
|
| - |
|
190 |
@Autowired
|
| 183 |
private PartnerTypeChangeService partnerTypeChangeService;
|
191 |
private PartnerTypeChangeService partnerTypeChangeService;
|
| 184 |
|
192 |
|
| 185 |
@Autowired
|
193 |
@Autowired
|
| 186 |
private ActivatedImeiRepository activatedImeiRepository;
|
194 |
private ActivatedImeiRepository activatedImeiRepository;
|
| 187 |
|
195 |
|
| Line 1992... |
Line 2000... |
| 1992 |
}
|
2000 |
}
|
| 1993 |
|
2001 |
|
| 1994 |
List<String> brands = mongoClient.getMongoBrands(fofoId, null, 3).stream().map(x -> (String) x.get("name"))
|
2002 |
List<String> brands = mongoClient.getMongoBrands(fofoId, null, 3).stream().map(x -> (String) x.get("name"))
|
| 1995 |
.collect(Collectors.toList());
|
2003 |
.collect(Collectors.toList());
|
| 1996 |
|
2004 |
|
| 1997 |
PartnerTypeChange ptc = partnerTypeChangeRepository.selectPartnerType(fofoId, LocalDate.now());
|
2005 |
List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId())
|
| 1998 |
|
- |
|
| - |
|
2006 |
.collect(Collectors.toList());
|
| 1999 |
List<Integer> focusedModelCatalogId = focusedModelRepository.selectAllByPartnerType(ptc.getPartnerType())
|
2007 |
List<Integer> focusedModelCatalogId = focusedModelRepository.selectAllByRegionIds(regionIds).stream()
|
| 2000 |
.stream().map(x -> x.getCatalogId()).collect(Collectors.toList());
|
2008 |
.map(x -> x.getCatalogId()).collect(Collectors.toList());
|
| 2001 |
Map<String, Object> equalsMap = new HashMap<>();
|
2009 |
Map<String, Object> equalsMap = new HashMap<>();
|
| 2002 |
equalsMap.put("categoryId", 10006);
|
2010 |
equalsMap.put("categoryId", 10006);
|
| 2003 |
equalsMap.put("brand", brands);
|
2011 |
equalsMap.put("brand", brands);
|
| 2004 |
|
2012 |
|
| 2005 |
Map<String, List<?>> notEqualsMap = new HashMap<>();
|
2013 |
Map<String, List<?>> notEqualsMap = new HashMap<>();
|
| Line 2013... |
Line 2021... |
| 2013 |
.selectItems(FocusedModel.class, "catalogItemId", "catalogId", equalsMap, notEqualsMap,
|
2021 |
.selectItems(FocusedModel.class, "catalogItemId", "catalogId", equalsMap, notEqualsMap,
|
| 2014 |
equalsJoinMap, notEqualsJoinMap, "minimumQty")
|
2022 |
equalsJoinMap, notEqualsJoinMap, "minimumQty")
|
| 2015 |
.stream().map(x -> x.getCatalogId()).collect(Collectors.toList());
|
2023 |
.stream().map(x -> x.getCatalogId()).collect(Collectors.toList());
|
| 2016 |
|
2024 |
|
| 2017 |
Map<Integer, Integer> focusedCatalogIdAndQtyMap = focusedModelRepository
|
2025 |
Map<Integer, Integer> focusedCatalogIdAndQtyMap = focusedModelRepository
|
| 2018 |
.selectByCatalogIdsAndPartnerType(catalogIds, ptc.getPartnerType()).stream()
|
2026 |
.selectByCatalogIdsAndRegionIds(catalogIds, regionIds).stream()
|
| 2019 |
.collect(Collectors.toMap(x -> x.getCatalogId(), x -> x.getMinimumQty()));
|
2027 |
.collect(Collectors.toMap(x -> x.getCatalogId(), x -> x.getMinimumQty()));
|
| 2020 |
|
2028 |
|
| 2021 |
/*
|
2029 |
/*
|
| 2022 |
* Map<Integer, Integer> focusedCatalogIdAndQtyMap =
|
2030 |
* Map<Integer, Integer> focusedCatalogIdAndQtyMap =
|
| 2023 |
* focusedModelRepository.selectAll().stream() .collect(Collectors.toMap(x ->
|
2031 |
* focusedModelRepository.selectAll().stream() .collect(Collectors.toMap(x ->
|