Subversion Repositories SmartDukaan

Rev

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

Rev 24356 Rev 24365
Line 119... Line 119...
119
			LOGGER.error("FofoStore Code not found of fofoId {}", loginDetails.getFofoId());
119
			LOGGER.error("FofoStore Code not found of fofoId {}", loginDetails.getFofoId());
120
		}
120
		}
121
 
121
 
122
		float sale = 0;
122
		float sale = 0;
123
		if (roleManager.isAdmin(loginDetails.getRoleIds())) {
123
		if (roleManager.isAdmin(loginDetails.getRoleIds())) {
124
			model.addAttribute("showAlert", false);
-
 
125
			model.addAttribute("sale", sale);
124
			model.addAttribute("sale", sale);
126
			List<NotificationData> notificationData = null;
125
			List<NotificationData> notificationData = null;
127
			long size = 0;
126
			long size = 0;
128
 
127
 
129
			notificationData = notificationPanelRepository.selectAllNotificationData(offset, limit);
128
			notificationData = notificationPanelRepository.selectAllNotificationData(offset, limit);
Line 197... Line 196...
197
				model.addAttribute("notificationData", notificationData);
196
				model.addAttribute("notificationData", notificationData);
198
				model.addAttribute("size", size);
197
				model.addAttribute("size", size);
199
				LOGGER.info("sizeOriginal {}", size);
198
				LOGGER.info("sizeOriginal {}", size);
200
 
199
 
201
			}
200
			}
202
			boolean isInvestmentOK = partnerInvestmentService.isInvestmentOk(loginDetails.getFofoId(), 10, 30);
-
 
203
			if(!isInvestmentOK) {
-
 
204
				model.addAttribute("showAlert", true);
-
 
205
			}
-
 
206
		}
201
		}
-
 
202
		boolean isInvestmentOK = partnerInvestmentService.isInvestmentOk(loginDetails.getFofoId(), 10, 30);
207
		LocalDate endDate = LocalDate.now().minusDays(1);
203
		LocalDate endDate = LocalDate.now().minusDays(1);
208
		LocalDate weekStartDate = endDate.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
204
		LocalDate weekStartDate = endDate.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY));
209
		LocalDate startDate = weekStartDate.minusWeeks(2);
205
		LocalDate startDate = weekStartDate.minusWeeks(2);
210
		List<PartnerDailyInvestment> partnerInvestments = new ArrayList<>();
206
		List<PartnerDailyInvestment> partnerInvestments = new ArrayList<>();
211
		PartnerDailyInvestment pdi = partnerInvestmentService.getInvestment(loginDetails.getFofoId(), 0);
207
		PartnerDailyInvestment pdi = partnerInvestmentService.getInvestment(loginDetails.getFofoId(), 0);
212
		partnerInvestments.add(pdi);
208
		partnerInvestments.add(pdi);
213
		partnerInvestments.addAll(partnerDailyInvestmentRepository.selectAll(loginDetails.getFofoId(), startDate, endDate));
209
		partnerInvestments.addAll(partnerDailyInvestmentRepository.selectAll(loginDetails.getFofoId(), startDate, endDate));
214
 
210
 
215
		model.addAttribute("partnerInvestment", pdi);
211
		model.addAttribute("partnerInvestment", pdi);
-
 
212
		model.addAttribute("isInvestmentOK", isInvestmentOK || roleManager.isAdmin(loginDetails.getRoleIds()));
216
		model.addAttribute("investmentChart", this.getInvestmentChartData(partnerInvestments));
213
		model.addAttribute("investmentChart", this.getInvestmentChartData(partnerInvestments));
217
		model.addAttribute("fofoStore", fofoStore);
214
		model.addAttribute("fofoStore", fofoStore);
218
		model.addAttribute("fofoStore", fofoStore);
215
		model.addAttribute("fofoStore", fofoStore);
219
		model.addAttribute("walletAmount");
216
		model.addAttribute("walletAmount");
220
		model.addAttribute("appContextPath", request.getContextPath());
217
		model.addAttribute("appContextPath", request.getContextPath());