Subversion Repositories SmartDukaan

Rev

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

Rev 27738 Rev 27739
Line 1290... Line 1290...
1290
		Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
1290
		Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
1291
		if (warehouseIds.contains(0)) {
1291
		if (warehouseIds.contains(0)) {
1292
			warehouseIds.addAll(warehouseMap.keySet());
1292
			warehouseIds.addAll(warehouseMap.keySet());
1293
		}
1293
		}
1294
 
1294
 
-
 
1295
		long poTodayValue = 0;
-
 
1296
		long poThreedaysValue = 0;
-
 
1297
		long poSevendaysValue = 0;
-
 
1298
		long poTodayQty = 0;
-
 
1299
		long poThreedaysQty = 0;
-
 
1300
		long poSevendaysQty = 0;
-
 
1301
 
1295
		List<OpenPoModel> openPO = warehousePurchaseOrderRepository.selectOpenPol(warehouseIds);
1302
		List<OpenPoModel> openPO = warehousePurchaseOrderRepository.selectOpenPol(warehouseIds);
-
 
1303
		for (OpenPoModel po : openPO) {
-
 
1304
			poTodayValue += po.getTodayValue();
-
 
1305
			poThreedaysValue += po.getThreedaysValue();
-
 
1306
			poSevendaysValue += po.getSevendaysValue();
-
 
1307
			poTodayQty += po.getTodayQty();
-
 
1308
			poThreedaysQty += po.getThreedaysQty();
-
 
1309
			poSevendaysQty += po.getSevendaysQty();
-
 
1310
		}
-
 
1311
		OpenPoModel poModel = new OpenPoModel();
-
 
1312
		poModel.setBrand("Total Values");
-
 
1313
		poModel.setTodayValue(poTodayValue);
-
 
1314
		poModel.setThreedaysValue(poThreedaysValue);
-
 
1315
		poModel.setSevendaysValue(poSevendaysValue);
-
 
1316
		poModel.setSevendaysQty(poSevendaysQty);
-
 
1317
		poModel.setThreedaysQty(poThreedaysQty);
-
 
1318
		poModel.setTodayQty(poTodayQty);
-
 
1319
 
-
 
1320
		openPO.add(poModel);
-
 
1321
 
-
 
1322
		long purtodayValue = 0;
-
 
1323
		long purthreedaysValue = 0;
-
 
1324
		long purfifteendaysValue = 0;
-
 
1325
		long purmtd = 0;
-
 
1326
		long purtodayQty = 0;
-
 
1327
		long purthreedaysQty = 0;
-
 
1328
		long purfifteendaysQty = 0;
-
 
1329
		long purmtdQty = 0;
-
 
1330
 
1296
		List<OurPurchaseModel> purchase = warehouseScanRepository.selectOurPurchase(warehouseIds);
1331
		List<OurPurchaseModel> purchase = warehouseScanRepository.selectOurPurchase(warehouseIds);
-
 
1332
 
-
 
1333
		for (OurPurchaseModel pm : purchase) {
-
 
1334
			purtodayValue += pm.getTodayValue();
-
 
1335
			purthreedaysValue += pm.getThreedaysValue();
-
 
1336
			purfifteendaysValue += pm.getFifteendaysValue();
-
 
1337
			purmtd += pm.getMtd();
-
 
1338
			purtodayQty += pm.getTodayQty();
-
 
1339
			poThreedaysQty += pm.getThreedaysQty();
-
 
1340
			purfifteendaysQty += pm.getFifteendaysQty();
-
 
1341
			purmtdQty += pm.getMtdQty();
-
 
1342
		}
-
 
1343
		OurPurchaseModel omp = new OurPurchaseModel();
-
 
1344
		omp.setBrand("Total Values");
-
 
1345
		omp.setTodayValue(purtodayValue);
-
 
1346
		omp.setThreedaysValue(purthreedaysValue);
-
 
1347
		omp.setFifteendaysValue(purfifteendaysValue);
-
 
1348
		omp.setMtd(purmtd);
-
 
1349
		omp.setTodayQty(purtodayQty);
-
 
1350
		omp.setThreedaysQty(purthreedaysQty);
-
 
1351
		omp.setFifteendaysQty(purfifteendaysQty);
-
 
1352
		omp.setMtdQty(purmtdQty);
-
 
1353
		purchase.add(omp);
1297
		List<BrandWiseTertiaryModel> tertiary = fofoOrderRepository.selectGroupByBrandPartnerTertiary(warehouseIds);
1354
		List<BrandWiseTertiaryModel> tertiary = fofoOrderRepository.selectGroupByBrandPartnerTertiary(warehouseIds);
-
 
1355
		long tertodayValue = 0;
-
 
1356
		long terthreedaysValue = 0;
-
 
1357
		long termtd = 0;
-
 
1358
		long terlmtd = 0;
-
 
1359
		long tertodayQty = 0;
-
 
1360
		long terthreedaysQty = 0;
-
 
1361
		long termtdQty = 0;
-
 
1362
		long terlmtdQty = 0;
-
 
1363
		for (BrandWiseTertiaryModel btm : tertiary) {
-
 
1364
			tertodayValue += btm.getTodayValue();
-
 
1365
			terthreedaysValue += btm.getThreedaysValue();
-
 
1366
			termtd += btm.getMtd();
-
 
1367
			terlmtd += btm.getLmtd();
-
 
1368
			tertodayQty += btm.getTodayQty();
-
 
1369
			terthreedaysQty += btm.getThreedaysQty();
-
 
1370
			termtdQty += btm.getMtdQty();
-
 
1371
			terlmtdQty += btm.getLmtdQty();
-
 
1372
		}
-
 
1373
		BrandWiseTertiaryModel bwt = new BrandWiseTertiaryModel();
-
 
1374
		bwt.setBrand("Total Values");
-
 
1375
		bwt.setTodayValue(tertodayValue);
-
 
1376
		bwt.setThreedaysValue(terthreedaysValue);
-
 
1377
		bwt.setMtd(termtd);
-
 
1378
		bwt.setLmtd(terlmtd);
-
 
1379
		bwt.setTodayQty(tertodayQty);
-
 
1380
		bwt.setThreedaysQty(terthreedaysQty);
-
 
1381
		bwt.setMtdQty(termtdQty);
-
 
1382
		bwt.setLmtdQty(terlmtdQty);
-
 
1383
		tertiary.add(bwt);
1298
		List<SecondaryOrderBillingModel> billing = orderRepository.selectAllBilledOrderGroupByBrand(warehouseIds);
1384
		List<SecondaryOrderBillingModel> billing = orderRepository.selectAllBilledOrderGroupByBrand(warehouseIds);
-
 
1385
		long sectodayValue = 0;
-
 
1386
		long secthreedaysValue = 0;
-
 
1387
		long secmtd = 0;
-
 
1388
		long seclmtd = 0;
-
 
1389
		long sectodayQty = 0;
-
 
1390
		long secthreedaysQty = 0;
-
 
1391
		long secmtdQty = 0;
-
 
1392
		long seclmtdQty = 0;
-
 
1393
		for (SecondaryOrderBillingModel sbm : billing) {
-
 
1394
			sectodayValue += sbm.getTodayValue();
-
 
1395
			secthreedaysValue += sbm.getThreedaysValue();
-
 
1396
			secmtd += sbm.getMtd();
-
 
1397
			seclmtd += sbm.getLmtd();
-
 
1398
			sectodayQty += sbm.getTodayQty();
-
 
1399
			secthreedaysQty += sbm.getThreedaysQty();
-
 
1400
			secmtdQty += sbm.getMtdQty();
-
 
1401
			seclmtdQty += sbm.getLmtdQty();
-
 
1402
		}
-
 
1403
 
-
 
1404
		SecondaryOrderBillingModel som = new SecondaryOrderBillingModel();
-
 
1405
		som.setBrand("Total Values");
-
 
1406
		som.setTodayValue(sectodayValue);
-
 
1407
		som.setThreedaysValue(secthreedaysValue);
-
 
1408
		som.setMtd(secmtd);
-
 
1409
		som.setLmtd(seclmtd);
-
 
1410
		som.setTodayQty(sectodayQty);
-
 
1411
		som.setThreedaysQty(secthreedaysQty);
-
 
1412
		som.setMtdQty(secmtdQty);
-
 
1413
		som.setLmtdQty(seclmtdQty);
-
 
1414
		billing.add(som);
1299
		LOGGER.info("openPO" + openPO);
1415
		LOGGER.info("openPO" + openPO);
1300
		LOGGER.info("purchase" + purchase);
1416
		LOGGER.info("purchase" + purchase);
1301
		LOGGER.info("tertiary" + tertiary);
1417
		LOGGER.info("tertiary" + tertiary);
1302
		LOGGER.info("billing" + billing);
1418
		LOGGER.info("billing" + billing);
1303
 
1419