Subversion Repositories SmartDukaan

Rev

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

Rev 24989 Rev 25028
Line 942... Line 942...
942
				new String[] { "amit.gupta@shop2020.in", "neeraj.gupta@smartdukaan.com" }, null,
942
				new String[] { "amit.gupta@shop2020.in", "neeraj.gupta@smartdukaan.com" }, 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();
948
 
948
 
949
	}
949
	}
950
 
950
 
951
	public void dryRunOutSchemeReco() throws Exception {
951
	public void dryRunOutSchemeReco() throws Exception {
952
		List<UserWalletHistory> userWalletHistory = new ArrayList<>();
952
		List<UserWalletHistory> userWalletHistory = new ArrayList<>();
953
		List<SchemeInOut> rolledbackSios = new ArrayList<>();
953
		List<SchemeInOut> rolledbackSios = new ArrayList<>();
954
		Map<Integer, Integer> userWalletMap = userWalletRepository.selectAll().stream()
954
		Map<Integer, Integer> userWalletMap = userWalletRepository.selectAll().stream()
955
				.collect(Collectors.toMap(UserWallet::getUserId, UserWallet::getId));
955
				.collect(Collectors.toMap(UserWallet::getUserId, UserWallet::getId));
956
		Map<Integer, SchemeType> schemeTypeMap = schemeRepository.selectAll().stream()
956
		Map<Integer, SchemeType> schemeTypeMap = schemeRepository.selectAll().stream()
957
				.collect(Collectors.toMap(Scheme::getId, Scheme::getType));
957
				.collect(Collectors.toMap(Scheme::getId, Scheme::getType));
958
		LocalDateTime startDate = LocalDate.of(2018, 9, 1).atStartOfDay();
958
		LocalDateTime startDate = LocalDate.of(2019, 5, 1).atStartOfDay();
959
		LocalDateTime endDate = LocalDate.now().atStartOfDay();
959
		LocalDateTime endDate = LocalDate.now().atStartOfDay();
960
		List<FofoOrder> allOrders = fofoOrderRepository.selectBetweenSaleDate(startDate, endDate);
960
		List<FofoOrder> allOrders = fofoOrderRepository.selectBetweenSaleDate(startDate, endDate);
961
		// Collections.reverse(allOrders);
961
		// Collections.reverse(allOrders);
962
		// List<FofoOrder> allOrders =
962
		// List<FofoOrder> allOrders =
963
		// List<FofoOrder> allOrders =
963
		// List<FofoOrder> allOrders =
Line 1049... Line 1049...
1049
						.map(x -> Arrays.asList(x.getSchemeId(), x.getSchemeType(), x.getStoreCode(),
1049
						.map(x -> Arrays.asList(x.getSchemeId(), x.getSchemeType(), x.getStoreCode(),
1050
								x.getSerialNumber(), x.getAmount(), x.getCreateTimestamp(), x.getRolledBackTimestamp()))
1050
								x.getSerialNumber(), x.getAmount(), x.getCreateTimestamp(), x.getRolledBackTimestamp()))
1051
						.collect(Collectors.toList()));
1051
						.collect(Collectors.toList()));
1052
 
1052
 
1053
		Utils.sendMailWithAttachments(googleMailSender,
1053
		Utils.sendMailWithAttachments(googleMailSender,
1054
				new String[] { "amit.gupta@shop2020.in", "neeraj.gupta@smartdukaan.com" }, null,
1054
				new String[] { "amit.gupta@shop2020.in"}, null,
1055
				"Partner Excess Amount Scheme Out", "PFA",
1055
				"Partner Excess Amount Scheme Out", "PFA",
1056
				new Attachment[] { new Attachment("WalletSummary.csv", new ByteArrayResource(baos.toByteArray())),
1056
				new Attachment[] { new Attachment("WalletSummary.csv", new ByteArrayResource(baos.toByteArray())),
1057
						new Attachment("SchemeOutRolledback.csv", new ByteArrayResource(baosOuts.toByteArray())) });
1057
						new Attachment("SchemeOutRolledback.csv", new ByteArrayResource(baosOuts.toByteArray())) });
1058
 
1058
 
1059
		// throw new Exception();
1059
		throw new Exception();
1060
	}
1060
	}
1061
 
1061
 
1062
	public void dryRunSchemeOutReco1() throws Exception {
1062
	public void dryRunSchemeOutReco1() throws Exception {
1063
		List<Integer> references = Arrays.asList(6744, 7347, 8320, 8891, 9124, 9217, 9263, 9379);
1063
		List<Integer> references = Arrays.asList(6744, 7347, 8320, 8891, 9124, 9217, 9263, 9379);
1064
		List<UserWalletHistory> userWalletHistory = new ArrayList<>();
1064
		List<UserWalletHistory> userWalletHistory = new ArrayList<>();