Subversion Repositories SmartDukaan

Rev

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

Rev 25846 Rev 25854
Line 133... Line 133...
133
import com.spice.profitmandi.dao.repository.transaction.PriceDropRepository;
133
import com.spice.profitmandi.dao.repository.transaction.PriceDropRepository;
134
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
134
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
135
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
135
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
136
import com.spice.profitmandi.dao.repository.user.AddressRepository;
136
import com.spice.profitmandi.dao.repository.user.AddressRepository;
137
import com.spice.profitmandi.dao.repository.user.UserRepository;
137
import com.spice.profitmandi.dao.repository.user.UserRepository;
-
 
138
import com.spice.profitmandi.service.NotificationService;
138
import com.spice.profitmandi.service.PartnerInvestmentService;
139
import com.spice.profitmandi.service.PartnerInvestmentService;
139
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
140
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
140
import com.spice.profitmandi.service.inventory.InventoryService;
141
import com.spice.profitmandi.service.inventory.InventoryService;
141
import com.spice.profitmandi.service.order.OrderService;
142
import com.spice.profitmandi.service.order.OrderService;
142
import com.spice.profitmandi.service.pricing.PriceDropService;
143
import com.spice.profitmandi.service.pricing.PriceDropService;
Line 241... Line 242...
241
	@Autowired
242
	@Autowired
242
	private PositionRepository positionRepository;
243
	private PositionRepository positionRepository;
243
 
244
 
244
	@Autowired
245
	@Autowired
245
	private FofoOrderItemRepository fofoOrderItemRepository;
246
	private FofoOrderItemRepository fofoOrderItemRepository;
-
 
247
	
-
 
248
	@Autowired
-
 
249
	private NotificationService notificationService;
246
 
250
 
247
	@Autowired
251
	@Autowired
248
	private PartnerDailyInvestmentRepository partnerDailyInvestmentRepository;
252
	private PartnerDailyInvestmentRepository partnerDailyInvestmentRepository;
249
 
253
 
250
	@Autowired
254
	@Autowired
Line 1318... Line 1322...
1318
					"Smartphones Rs.%.0f, Insurance Rs.%.0f, Total Rs.%.0f till %s.", sale, now.format(timeFormatter)));
1322
					"Smartphones Rs.%.0f, Insurance Rs.%.0f, Total Rs.%.0f till %s.", sale, now.format(timeFormatter)));
1319
			sendNotificationModel.setType("url");
1323
			sendNotificationModel.setType("url");
1320
			sendNotificationModel.setUrl("http://app.profitmandi.com/pages/home/notifications");
1324
			sendNotificationModel.setUrl("http://app.profitmandi.com/pages/home/notifications");
1321
			sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
1325
			sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
1322
			sendNotificationModel.setMessageType(MessageType.notification);
1326
			sendNotificationModel.setMessageType(MessageType.notification);
-
 
1327
			notificationService.sendNotification(sendNotificationModel);
1323
			salesByFofoIdMap.put(fofoId, sale);
1328
			salesByFofoIdMap.put(fofoId, sale);
1324
			LOGGER.info(sale);
1329
			LOGGER.info(sale);
1325
		}
1330
		}
1326
		Map<Integer, Float> parternPolicyAmountMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now,
1331
		Map<Integer, Float> parternPolicyAmountMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now,
1327
				null);
1332
				null);
1328
		Map<Integer, Float> parternPolicyQtyMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now, null);
1333
		Map<Integer, Long> parternPolicyQtyMap = insurancePolicyRepository.selectQtyGroupByRetailerId(now, null);
-
 
1334
		Map<Integer, Long> parternOrderQtyMap = insurancePolicyRepository.selectQtyGroupByRetailerId(now, null);
1329
		String saleReport = this.getDailySalesReportByPartnerId(salesByFofoIdMap, dailyTarget);
1335
		String saleReport = this.getDailySalesReportByPartnerId(salesByFofoIdMap, dailyTarget);
1330
		LOGGER.info(saleReport);
1336
		LOGGER.info(saleReport);
1331
		String cc[] = { "tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "prakash.rai@smartdukaan.com",
1337
		String cc[] = { "tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "prakash.rai@smartdukaan.com",
1332
				"chaitnaya.vats@smartdukaan.com" };
1338
				"chaitnaya.vats@smartdukaan.com" };
1333
 
1339
 
Line 1482... Line 1488...
1482
	public void testToffee() throws Exception {
1488
	public void testToffee() throws Exception {
1483
		LOGGER.info("Insurance Sum Summary --- {}",
1489
		LOGGER.info("Insurance Sum Summary --- {}",
1484
				insurancePolicyRepository.selectAmountSumGroupByRetailerId(LocalDateTime.MIN, LocalDateTime.MAX));
1490
				insurancePolicyRepository.selectAmountSumGroupByRetailerId(LocalDateTime.MIN, LocalDateTime.MAX));
1485
		LOGGER.info("Insurance Qty Summary --- {}",
1491
		LOGGER.info("Insurance Qty Summary --- {}",
1486
				insurancePolicyRepository.selectQtyGroupByRetailerId(LocalDateTime.MIN, LocalDateTime.MAX));
1492
				insurancePolicyRepository.selectQtyGroupByRetailerId(LocalDateTime.MIN, LocalDateTime.MAX));
-
 
1493
		LOGGER.info("SmartPhone Amount Summary --- {}",
-
 
1494
				fofoOrderItemRepository.selectQtyGroupByRetailer(LocalDateTime.MIN, LocalDateTime.MAX, 0, true));
-
 
1495
		LOGGER.info("Smartphone Qty Summary --- {}",
-
 
1496
				fofoOrderItemRepository.selectQtyGroupByRetailer(LocalDateTime.MIN, LocalDateTime.MAX, 0, true));
1487
		// LOGGER.info("{}", toffeeService.getAuthToken());
1497
		// LOGGER.info("{}", toffeeService.getAuthToken());
1488
		/*
1498
		/*
1489
		 * LOGGER.info("{}", toffeeService.getProducts()); // LOGGER.info("{}",
1499
		 * LOGGER.info("{}", toffeeService.getProducts()); // LOGGER.info("{}",
1490
		 * toffeeService.getPincodes("36103000PR")); PremiumCalculationRequestModel pcrm
1500
		 * toffeeService.getPincodes("36103000PR")); PremiumCalculationRequestModel pcrm
1491
		 * = new PremiumCalculationRequestModel(); pcrm.setProductDetails("36103000PR");
1501
		 * = new PremiumCalculationRequestModel(); pcrm.setProductDetails("36103000PR");