Subversion Repositories SmartDukaan

Rev

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

Rev 23903 Rev 23942
Line 754... Line 754...
754
		}
754
		}
755
		return customRetailersMap;
755
		return customRetailersMap;
756
	}
756
	}
757
	
757
	
758
	@Override
758
	@Override
-
 
759
	public  CustomRetailer getFofoRetailer(int fofoId) throws ProfitMandiBusinessException {
-
 
760
		com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(fofoId);
-
 
761
		Address address = null;
-
 
762
		try {
-
 
763
			address = addressRepository.selectById(saholicUser.getAddressId());
-
 
764
		} catch (ProfitMandiBusinessException e1) {
-
 
765
			// TODO Auto-generated catch block
-
 
766
			e1.printStackTrace();
-
 
767
		}
-
 
768
		Map<Integer, CustomRetailer> customRetailersMap = new HashMap<>();
-
 
769
			CustomRetailer customRetailer = new CustomRetailer();
-
 
770
			customRetailer.setEmail(saholicUser.getEmailId());
-
 
771
			customRetailer.setBusinessName(address.getName());
-
 
772
			customRetailer.setMobileNumber(address.getPhoneNumber());
-
 
773
			try {
-
 
774
				customRetailer.setCartId(saholicUser.getActiveCartId());
-
 
775
				PrivateDealUser pdu = privateDealUserRepository.selectById(address.getRetaierId());
-
 
776
				Counter counter = counterRepository.selectById(pdu.getCounterId());
-
 
777
				customRetailer.setGstNumber(counter.getGstin());
-
 
778
			} catch(Exception e) {
-
 
779
				customRetailer.setGstNumber(null);
-
 
780
			}
-
 
781
			CustomAddress address1 = new CustomAddress();
-
 
782
			address1.setCity(address.getCity());
-
 
783
			address1.setState(address.getState());
-
 
784
			address1.setLine1(address.getLine1());
-
 
785
			address1.setLine2(address.getLine2());
-
 
786
			address1.setPinCode(address.getPinCode());
-
 
787
			address1.setName(address.getName());
-
 
788
			customRetailer.setAddress(address1);
-
 
789
			customRetailer.setPartnerId(address.getRetaierId());
-
 
790
			customRetailersMap.put(address.getRetaierId(), customRetailer);
-
 
791
		return customRetailer;
-
 
792
		
-
 
793
	}
-
 
794
	
-
 
795
	@Override
759
	public Map<Integer, String> getAllFofoRetailerIdEmailIdMap() {
796
	public Map<Integer, String> getAllFofoRetailerIdEmailIdMap() {
760
		Role roleFofo = null;
797
		Role roleFofo = null;
761
		try {
798
		try {
762
			roleFofo = roleRepository.selectByName(RoleType.FOFO.toString());
799
			roleFofo = roleRepository.selectByName(RoleType.FOFO.toString());
763
		} catch (ProfitMandiBusinessException e) {
800
		} catch (ProfitMandiBusinessException e) {