Subversion Repositories SmartDukaan

Rev

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

Rev 26544 Rev 26546
Line 1117... Line 1117...
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 districtShortName = 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
			String stateShortName = store.getCode().replaceAll("\\d+", "").substring(0,2);
1123
			DistrictMaster districtMaster = null;
1123
			DistrictMaster districtMaster = null;
1124
			LOGGER.info("Store shortname is {}", districtShortName);
1124
			LOGGER.info("Store shortname is {}", districtShortName);
1125
			districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName(districtShortName, stateShortName);
1125
			districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName(districtShortName, stateShortName);
1126
			if (districtMaster == null) {
1126
			if (districtMaster == null) {
1127
				districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName("FB", "HR");
1127
				districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName("FB", "HR");