Subversion Repositories SmartDukaan

Rev

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

Rev 27747 Rev 27787
Line 153... Line 153...
153
	@Autowired
153
	@Autowired
154
	private CsService csService;
154
	private CsService csService;
155
 
155
 
156
	@Autowired
156
	@Autowired
157
	private Mongo mongoClient;
157
	private Mongo mongoClient;
158
	
158
 
159
	@Autowired
159
	@Autowired
160
	private PaymentOptionTransactionRepository paymentOptionTransactionRepository;
160
	private PaymentOptionTransactionRepository paymentOptionTransactionRepository;
161
 
161
 
162
	@Autowired
162
	@Autowired
163
	private SamsungIMEIActivationService samsungActivationService;
163
	private SamsungIMEIActivationService samsungActivationService;
Line 174... Line 174...
174
	@Autowired
174
	@Autowired
175
	private SellerWarehouseRepository sellerWarehouseRepository;
175
	private SellerWarehouseRepository sellerWarehouseRepository;
176
 
176
 
177
	@Autowired
177
	@Autowired
178
	private FofoOrderItemRepository fofoOrderItemRepository;
178
	private FofoOrderItemRepository fofoOrderItemRepository;
179
	
179
 
180
	@Autowired
180
	@Autowired
181
	private FofoLineItemRepository fofoLineItemRepository;
181
	private FofoLineItemRepository fofoLineItemRepository;
182
 
182
 
183
	@Autowired
183
	@Autowired
184
	private FofoOrderRepository fofoOrderRepository;
184
	private FofoOrderRepository fofoOrderRepository;
Line 280... Line 280...
280
	private static final String ACCOUNT_ID = "aZ6flHhrgPIEl18buHdPBdueEN4";
280
	private static final String ACCOUNT_ID = "aZ6flHhrgPIEl18buHdPBdueEN4";
281
	private static final String SECRET_KEY = "a7rsX5B4UNNfTTx1-IJ19qdH48BT4YvBKlQJg3n3_KKNe7WWych55g";
281
	private static final String SECRET_KEY = "a7rsX5B4UNNfTTx1-IJ19qdH48BT4YvBKlQJg3n3_KKNe7WWych55g";
282
 
282
 
283
	@Autowired
283
	@Autowired
284
	private WarehouseInventoryItemRepository warehouseInventoryItemRepository;
284
	private WarehouseInventoryItemRepository warehouseInventoryItemRepository;
285
	
285
 
286
	public void populateGrnTimestamp() {
286
	public void populateGrnTimestamp() {
287
		List<Purchase> allPurchases = purchaseRepository.selectAll();
287
		List<Purchase> allPurchases = purchaseRepository.selectAll();
288
		for (Purchase p : allPurchases) {
288
		for (Purchase p : allPurchases) {
289
			String invoiceNumber = p.getPurchaseReference();
289
			String invoiceNumber = p.getPurchaseReference();
290
			if (p.getCompleteTimestamp() == null) {
290
			if (p.getCompleteTimestamp() == null) {
Line 301... Line 301...
301
		}
301
		}
302
 
302
 
303
	}
303
	}
304
 
304
 
305
	public void fetchImeiActivation(int ym) throws Exception {
305
	public void fetchImeiActivation(int ym) throws Exception {
-
 
306
		LocalDate startDate = null;
-
 
307
		LocalDate endDate = null;
-
 
308
		if (ym == 0) {
306
		LocalDate endDate = LocalDate.now().minusMonths(ym);
309
			startDate = LocalDate.now().minusDays(30);
-
 
310
			endDate = LocalDate.now();
-
 
311
		} else {
307
		samsungActivationService.getActivationsBetweenNew(endDate.withDayOfMonth(1),
312
			startDate = LocalDate.now().minusMonths(ym);
308
				endDate.withDayOfMonth(endDate.lengthOfMonth()));
313
			endDate = startDate.plusMonths(1);
-
 
314
		}
-
 
315
		samsungActivationService.getActivationsBetweenNew(startDate, endDate);
309
	}
316
	}
310
 
317
 
311
	public void migarateLineItemsToNewTable() throws Exception {
318
	public void migarateLineItemsToNewTable() throws Exception {
312
		LOGGER.info("Before Migrated LineItems Successfully");
319
		LOGGER.info("Before Migrated LineItems Successfully");
313
		int lineItemImeiId = 0;
320
		int lineItemImeiId = 0;
Line 349... Line 356...
349
	}
356
	}
350
 
357
 
351
	public void cancelOrder(List<String> invoiceNumbers) throws Exception {
358
	public void cancelOrder(List<String> invoiceNumbers) throws Exception {
352
		orderService.cancelOrder(invoiceNumbers);
359
		orderService.cancelOrder(invoiceNumbers);
353
	}
360
	}
354
	
361
 
-
 
362
	@Autowired
355
	@Autowired HdfcPaymentRepository hdfcPaymentRepository;
363
	HdfcPaymentRepository hdfcPaymentRepository;
-
 
364
 
356
	public void addPayment() throws Exception {
365
	public void addPayment() throws Exception {
357
		List<Integer> paymentIds = Arrays.asList(3777);
366
		List<Integer> paymentIds = Arrays.asList(3777);
358
		for (int hdfcPaymentId : paymentIds) {
367
		for (int hdfcPaymentId : paymentIds) {
359
			HdfcPayment hdfcPayment = hdfcPaymentRepository.selectById(hdfcPaymentId);
368
			HdfcPayment hdfcPayment = hdfcPaymentRepository.selectById(hdfcPaymentId);
360
			String virtualAccount = hdfcPayment.getVirtualAccount();
369
			String virtualAccount = hdfcPayment.getVirtualAccount();
Line 1160... Line 1169...
1160
		schemeService.processSchemeOut(orderId, fofoId);
1169
		schemeService.processSchemeOut(orderId, fofoId);
1161
 
1170
 
1162
	}
1171
	}
1163
 
1172
 
1164
	public void createDummyInvoices() {
1173
	public void createDummyInvoices() {
1165
		List<WarehouseInventoryItem> lavaInventoryItems = warehouseInventoryItemRepository.getSerialNumbers("Lava", LocalDate.of(2020,Month.SEPTEMBER, 1).atStartOfDay(), LocalDateTime.now()); 
1174
		List<WarehouseInventoryItem> lavaInventoryItems = warehouseInventoryItemRepository.getSerialNumbers("Lava",
-
 
1175
				LocalDate.of(2020, Month.SEPTEMBER, 1).atStartOfDay(), LocalDateTime.now());
1166
		LOGGER.info("Lava Inventory Size is {}", lavaInventoryItems.size());
1176
		LOGGER.info("Lava Inventory Size is {}", lavaInventoryItems.size());
1167
	}
1177
	}
1168
 
1178
 
-
 
1179
	/*
1169
	/*public void reverseSchemes() {
1180
	 * public void reverseSchemes() {
1170
		schemeService.reverseSchemes(Arrays.asList(75188), SchemeType, reversalReason);
1181
	 * schemeService.reverseSchemes(Arrays.asList(75188), SchemeType,
-
 
1182
	 * reversalReason); }
1171
	}*/
1183
	 */
1172
}
1184
}
1173
 
1185
 
1174
//7015845171
1186
//7015845171
1175
1187