Subversion Repositories SmartDukaan

Rev

Rev 26538 | Rev 26540 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26538 Rev 26539
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(0,2);
1121
			String shortName = store.getCode().replaceAll("\\d+", "").substring(2);
-
 
1122
			DistrictMaster districtMaster = null;
-
 
1123
			try {
1122
			DistrictMaster districtMaster = districtMasterRepository.selectByShortName(shortName);
1124
				districtMaster = districtMasterRepository.selectByShortName(shortName);
-
 
1125
			} catch (Exception e) {
-
 
1126
				districtMaster = districtMasterRepository.selectByShortName("DL");
-
 
1127
			}
1123
			com.spice.profitmandi.dao.entity.user.User user = userMap.get(store.getId());
1128
			com.spice.profitmandi.dao.entity.user.User user = userMap.get(store.getId());
1124
			String storeName = user.getName();
1129
			String storeName = user.getName();
1125
			String urlString = districtMaster.getStateShortName() + "/"
1130
			String urlString = districtMaster.getStateShortName() + "/"
1126
					+ Utils.getHyphenatedString(districtMaster.getName()) + "/"
1131
					+ Utils.getHyphenatedString(districtMaster.getName()) + "/"
1127
					+ Utils.getHyphenatedString(store.getCode() + " " + storeName);
1132
					+ Utils.getHyphenatedString(store.getCode() + " " + storeName);