Subversion Repositories SmartDukaan

Rev

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

Rev 30003 Rev 30044
Line 812... Line 812...
812
 
812
 
813
	private class SaleRoles {
813
	private class SaleRoles {
814
 
814
 
815
		private List<String> l1;
815
		private List<String> l1;
816
		private List<String> l2;
816
		private List<String> l2;
-
 
817
		private List<String> l3;
-
 
818
		private List<String> l4;
817
 
819
 
818
		public SaleRoles() {
820
		public SaleRoles() {
819
			l1 = new ArrayList<>();
821
			l1 = new ArrayList<>();
820
			l2 = new ArrayList<>();
822
			l2 = new ArrayList<>();
-
 
823
			l3 = new ArrayList<>();
-
 
824
			l4 = new ArrayList<>();
821
		}
825
		}
822
 
826
 
823
		public List<String> getL1() {
827
		public List<String> getL1() {
824
			return l1;
828
			return l1;
825
		}
829
		}
826
 
830
 
827
		public List<String> getL2() {
831
		public List<String> getL2() {
828
			return l2;
832
			return l2;
829
		}
833
		}
830
 
834
 
-
 
835
		public List<String> getL3() {
-
 
836
			return l3;
-
 
837
		}
-
 
838
 
-
 
839
		public List<String> getL4() {
-
 
840
			return l4;
-
 
841
		}
-
 
842
 
-
 
843
		@Override
-
 
844
		public String toString() {
-
 
845
			return "SaleRoles [l1=" + l1 + ", l2=" + l2 + ", l3=" + l3 + ", l4=" + l4 + "]";
-
 
846
		}
-
 
847
 
831
	}
848
	}
832
 
849
 
833
	@Override
850
	@Override
834
	@Cacheable(value = "partnerSaleHeader", cacheManager = "oneDayCacheManager")
851
	@Cacheable(value = "partnerSaleHeader", cacheManager = "oneDayCacheManager")
835
	public Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() {
852
	public Map<Integer, FofoReportingModel> getPartnerIdSalesHeaders() {
Line 857... Line 874...
857
				if (position.getEscalationType().equals(EscalationType.L1)) {
874
				if (position.getEscalationType().equals(EscalationType.L1)) {
858
					saleRoles.getL1().add(name);
875
					saleRoles.getL1().add(name);
859
				} else if (position.getEscalationType().equals(EscalationType.L2)) {
876
				} else if (position.getEscalationType().equals(EscalationType.L2)) {
860
					saleRoles.getL2().add(name);
877
					saleRoles.getL2().add(name);
861
				}
878
				}
-
 
879
 
862
			}
880
			}
863
		}
881
		}
864
 
882
 
865
		Set<CustomRetailer> allCrList = new HashSet<>();
883
		Set<CustomRetailer> allCrList = new HashSet<>();
866
		for (List<CustomRetailer> cr : positionIdRetailerMap.values()) {
884
		for (List<CustomRetailer> cr : positionIdRetailerMap.values()) {
Line 883... Line 901...
883
			// fofoStore.getCode().replaceAll("[a-zA-Z]", "");
901
			// fofoStore.getCode().replaceAll("[a-zA-Z]", "");
884
			String businessName = cr.getBusinessName();
902
			String businessName = cr.getBusinessName();
885
			try {
903
			try {
886
				String stateManager = StringUtils.join(partnerEmailSalesMap.get(cr.getEmail()).getL2(), ", ");
904
				String stateManager = StringUtils.join(partnerEmailSalesMap.get(cr.getEmail()).getL2(), ", ");
887
				String territoryManager = StringUtils.join(partnerEmailSalesMap.get(cr.getEmail()).getL1(), ", ");
905
				String territoryManager = StringUtils.join(partnerEmailSalesMap.get(cr.getEmail()).getL1(), ", ");
-
 
906
 
-
 
907
				if (StringUtils.isEmpty(territoryManager)) {
-
 
908
					territoryManager = StringUtils.join(partnerEmailSalesMap.get(cr.getEmail()).getL2(), ", ");
-
 
909
				}
-
 
910
 
888
				FofoReportingModel reportingModel = new FofoReportingModel();
911
				FofoReportingModel reportingModel = new FofoReportingModel();
889
				reportingModel.setBusinessName(businessName);
912
				reportingModel.setBusinessName(businessName);
890
				reportingModel.setCode(code);
913
				reportingModel.setCode(code);
891
				reportingModel.setFofoId(fofoStore.getId());
914
				reportingModel.setFofoId(fofoStore.getId());
892
				reportingModel.setRegionalManager(stateManager);
915
				reportingModel.setRegionalManager(stateManager);