Subversion Repositories SmartDukaan

Rev

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

Rev 28346 Rev 28825
Line 819... Line 819...
819
 
819
 
820
		if (fofoStore != null) {
820
		if (fofoStore != null) {
821
			fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
821
			fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
822
			fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
822
			fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
823
			fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
823
			fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
-
 
824
			fofoStore.setFofoType(updateRetailerRequest.getFofoType());
824
			fofoStoreRepository.persist(fofoStore);
825
			fofoStoreRepository.persist(fofoStore);
825
 
826
 
826
		} else {
827
		} else {
827
			int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(retailerId);
828
			int retailerAddressId = retailerRegisteredAddressRepository.selectAddressIdByRetailerId(retailerId);
828
			Address retailerAddress = addressRepository.selectById(retailerAddressId);
829
			Address retailerAddress = addressRepository.selectById(retailerAddressId);
Line 847... Line 848...
847
			int latestCodeCounter = Integer.parseInt(latestStoreCode.replaceAll("[A-Z]", ""));
848
			int latestCodeCounter = Integer.parseInt(latestStoreCode.replaceAll("[A-Z]", ""));
848
			String fofoStoreCode = StringUtils.generateFofoStoreSequence(
849
			String fofoStoreCode = StringUtils.generateFofoStoreSequence(
849
					districtMaster.getStateShortName() + districtMaster.getShortName(), latestCodeCounter + 1);
850
					districtMaster.getStateShortName() + districtMaster.getShortName(), latestCodeCounter + 1);
850
			fofoStore.setCode(fofoStoreCode);
851
			fofoStore.setCode(fofoStoreCode);
851
			fofoStore.setBagsLastCredited(LocalDateTime.now());
852
			fofoStore.setBagsLastCredited(LocalDateTime.now());
-
 
853
			fofoStore.setFofoType(updateRetailerRequest.getFofoType());
852
			fofoStoreRepository.persist(fofoStore);
854
			fofoStoreRepository.persist(fofoStore);
853
		}
855
		}
854
 
856
 
855
		return fofoStore;
857
		return fofoStore;
856
	}
858
	}
Line 1195... Line 1197...
1195
					stateShortName);
1197
					stateShortName);
1196
			if (districtMaster == null) {
1198
			if (districtMaster == null) {
1197
				districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName("FB", "HR");
1199
				districtMaster = districtMasterRepository.selectByShortnameNameAndStateShortName("FB", "HR");
1198
			}
1200
			}
1199
			LOGGER.info("Store id - {}", store.getId());
1201
			LOGGER.info("Store id - {}", store.getId());
1200
			//com.spice.profitmandi.dao.entity.user.User user = userMap.get(store.getId());
1202
			// com.spice.profitmandi.dao.entity.user.User user = userMap.get(store.getId());
1201
			String urlString = districtMaster.getStateShortName() + "/"
1203
			String urlString = districtMaster.getStateShortName() + "/"
1202
					+ Utils.getHyphenatedString(districtMaster.getName()) + "/" + store.getCode();
1204
					+ Utils.getHyphenatedString(districtMaster.getName()) + "/" + store.getCode();
1203
			fofoRetailerUrlMap.put(store.getId(), urlString.toLowerCase());
1205
			fofoRetailerUrlMap.put(store.getId(), urlString.toLowerCase());
1204
			LOGGER.info("Store is {} end", store);
1206
			LOGGER.info("Store is {} end", store);
1205
 
1207