Subversion Repositories SmartDukaan

Rev

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

Rev 25028 Rev 25032
Line 847... Line 847...
847
		List<SchemeInOut> rolledbackSios = new ArrayList<>();
847
		List<SchemeInOut> rolledbackSios = new ArrayList<>();
848
		Map<Integer, SchemeType> schemeTypeMap = schemeRepository.selectAll().stream()
848
		Map<Integer, SchemeType> schemeTypeMap = schemeRepository.selectAll().stream()
849
				.collect(Collectors.toMap(Scheme::getId, Scheme::getType));
849
				.collect(Collectors.toMap(Scheme::getId, Scheme::getType));
850
		Set<String> serialNumbersConsidered = new HashSet<>();
850
		Set<String> serialNumbersConsidered = new HashSet<>();
851
 
851
 
852
		LocalDateTime startDate = LocalDate.of(2018, 9, 1).atStartOfDay();
852
		LocalDateTime startDate = LocalDate.of(2019, 5, 1).atStartOfDay();
853
		LocalDateTime endDate = LocalDate.now().atStartOfDay();
853
		LocalDateTime endDate = LocalDate.now().atStartOfDay();
854
		List<Purchase> purchases = purchaseRepository.selectAllBetweenPurchaseDate(startDate, endDate);
854
		List<Purchase> purchases = purchaseRepository.selectAllBetweenPurchaseDate(startDate, endDate);
855
 
855
 
856
		Map<Integer, String> storeNameMap = fofoStoreRepository.getStoresMap();
856
		Map<Integer, String> storeNameMap = fofoStoreRepository.getStoresMap();
857
		purchases.stream().forEach(purchase -> {
857
		purchases.stream().forEach(purchase -> {
Line 937... Line 937...
937
						.map(x -> Arrays.asList(x.getSchemeId(), x.getSchemeType(), x.getReference(), x.getStoreCode(),
937
						.map(x -> Arrays.asList(x.getSchemeId(), x.getSchemeType(), x.getReference(), x.getStoreCode(),
938
								x.getSerialNumber(), x.getAmount(), x.getCreateTimestamp(), x.getRolledBackTimestamp()))
938
								x.getSerialNumber(), x.getAmount(), x.getCreateTimestamp(), x.getRolledBackTimestamp()))
939
						.collect(Collectors.toList()));
939
						.collect(Collectors.toList()));
940
 
940
 
941
		Utils.sendMailWithAttachments(googleMailSender,
941
		Utils.sendMailWithAttachments(googleMailSender,
942
				new String[] { "amit.gupta@shop2020.in", "neeraj.gupta@smartdukaan.com" }, null,
942
				new String[] { "amit.gupta@shop2020.in"}, null,
943
				"Partner Excess Amount Scheme In", "PFA",
943
				"Partner Excess Amount Scheme In", "PFA",
944
				new Attachment[] { new Attachment("WalletSummary.csv", new ByteArrayResource(baos.toByteArray())),
944
				new Attachment[] { new Attachment("WalletSummary.csv", new ByteArrayResource(baos.toByteArray())),
945
						new Attachment("SchemeInRolledback.csv", new ByteArrayResource(baosOuts.toByteArray())) });
945
						new Attachment("SchemeInRolledback.csv", new ByteArrayResource(baosOuts.toByteArray())) });
946
 
946
 
947
		throw new Exception();
947
		throw new Exception();