Subversion Repositories SmartDukaan

Rev

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

Rev 33116 Rev 33126
Line 376... Line 376...
376
			walletSummartList = fofoOrderRepository.selectWalletSummaryReport(
376
			walletSummartList = fofoOrderRepository.selectWalletSummaryReport(
377
					fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
377
					fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
378
		}
378
		}
379
		LOGGER.info("walletSummartList {}", fofoId);
379
		LOGGER.info("walletSummartList {}", fofoId);
380
		DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
380
		DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
381
		String partnerName = null;
381
		String partnerDetail = null;
382
 
382
 
383
		for (WalletSummaryReportModel walletSummary : walletSummartList) {
383
		for (WalletSummaryReportModel walletSummary : walletSummartList) {
384
			partnerName = walletSummary.getName();
384
			partnerDetail = walletSummary.getName() + "(" + walletSummary.getCode() + "-" + walletSummary.getPhone() + ")" + "-" + walletSummary.getEmail();
385
 
385
 
386
			rows.add(Arrays.asList(
386
			rows.add(Arrays.asList(
387
					walletSummary.getId(),
387
					walletSummary.getId(),
388
					walletSummary.getCode(),
388
					//walletSummary.getCode(),
389
					walletSummary.getName(),
389
					//walletSummary.getName(),
390
					walletSummary.getEmail(),
390
					//walletSummary.getEmail(),
391
					walletSummary.getPhone(),
391
					//walletSummary.getPhone(),
392
					walletSummary.getAmount(),
392
					walletSummary.getAmount(),
393
					walletSummary.getRefundableAmount(),
393
					walletSummary.getRefundableAmount(),
394
					walletSummary.getReference(),
394
					walletSummary.getReference(),
395
					walletSummary.getReferenceType(),
395
					walletSummary.getReferenceType(),
396
					FormattingUtils.format(walletSummary.getBusinessTimestamp()),
396
					FormattingUtils.format(walletSummary.getBusinessTimestamp()),
Line 398... Line 398...
398
			));
398
			));
399
 
399
 
400
		}
400
		}
401
 
401
 
402
		org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil
402
		org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil
403
				.getCSVByteStream(Arrays.asList("Id", "Code", "Name", "Email", "Phone", "Amount", "Refundable_amount",
403
				.getCSVByteStream(Arrays.asList("Id",
-
 
404
//						"Code",
-
 
405
//						"Name",
-
 
406
//						"Email",
-
 
407
//						"Phone",
-
 
408
						"Amount", "Refundable_amount",
404
						"Reference", "Reference_type", "Business_timestamp", "Description"), rows);
409
						"Reference", "Reference_type", "Business_timestamp", "Description"), rows);
405
		ResponseEntity<?> responseEntity = orderService.downloadReportInCsv(baos, rows, partnerName + " Wallet Statement Report");
410
		ResponseEntity<?> responseEntity = orderService.downloadReportInCsv(baos, rows, partnerDetail + " Wallet Statement Report");
406
 
411
 
407
		return responseEntity;
412
		return responseEntity;
408
 
413
 
409
	}
414
	}
410
 
415