| Line 1116... |
Line 1116... |
| 1116 |
Map<Integer, com.spice.profitmandi.dao.entity.user.User> userMap = userUserRepository
|
1116 |
Map<Integer, com.spice.profitmandi.dao.entity.user.User> userMap = userUserRepository
|
| 1117 |
.selectByIds(stores.stream().map(x -> x.getId()).collect(Collectors.toList())).stream()
|
1117 |
.selectByIds(stores.stream().map(x -> x.getId()).collect(Collectors.toList())).stream()
|
| 1118 |
.collect(Collectors.toMap(x -> x.getId(), x -> x));
|
1118 |
.collect(Collectors.toMap(x -> x.getId(), x -> x));
|
| 1119 |
for (FofoStore store : stores) {
|
1119 |
for (FofoStore store : stores) {
|
| 1120 |
LOGGER.info("Store is {}", store);
|
1120 |
LOGGER.info("Store is {}", store);
|
| 1121 |
String shortName = store.getCode().replaceAll("\\d+", "").substring(2);
|
1121 |
String districtShortName = store.getCode().replaceAll("\\d+", "").substring(2);
|
| - |
|
1122 |
String stateShortName = store.getCode().replaceAll("\\d+", "").substring(0,1);
|
| 1122 |
DistrictMaster districtMaster = null;
|
1123 |
DistrictMaster districtMaster = null;
|
| 1123 |
LOGGER.info("Store shortname is {}", shortName);
|
1124 |
LOGGER.info("Store shortname is {}", districtShortName);
|
| 1124 |
districtMaster = districtMasterRepository.selectByShortName(shortName);
|
1125 |
districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName(districtShortName, stateShortName);
|
| 1125 |
if (districtMaster == null) {
|
1126 |
if (districtMaster == null) {
|
| 1126 |
districtMaster = districtMasterRepository.selectByShortName("FB");
|
1127 |
districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName("FB", "HR");
|
| 1127 |
}
|
1128 |
}
|
| 1128 |
LOGGER.info("Store id - {}", store.getId());
|
1129 |
LOGGER.info("Store id - {}", store.getId());
|
| 1129 |
com.spice.profitmandi.dao.entity.user.User user = userMap.get(store.getId());
|
1130 |
com.spice.profitmandi.dao.entity.user.User user = userMap.get(store.getId());
|
| 1130 |
String storeName = user.getName();
|
1131 |
String storeName = user.getName();
|
| 1131 |
String urlString = districtMaster.getStateShortName() + "/"
|
1132 |
String urlString = districtMaster.getStateShortName() + "/"
|