Subversion Repositories SmartDukaan

Rev

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

Rev 30323 Rev 30426
Line 709... Line 709...
709
	public String DemoListbyFofoId(HttpServletRequest request,
709
	public String DemoListbyFofoId(HttpServletRequest request,
710
			@RequestParam(required = false, defaultValue = "0") int fofoId, Model model) throws Exception {
710
			@RequestParam(required = false, defaultValue = "0") int fofoId, Model model) throws Exception {
711
 
711
 
712
		List<Integer> fofoIds = fofoStoreRepository.selectAll().stream().map(x -> x.getId())
712
		List<Integer> fofoIds = fofoStoreRepository.selectAll().stream().map(x -> x.getId())
713
				.collect(Collectors.toList());
713
				.collect(Collectors.toList());
-
 
714
 
714
		Map<Integer, CustomRetailer> customRetailersMap = retailerService.getFofoRetailers(fofoIds);
715
		Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
-
 
716
		Map<Integer, CustomRetailer> customRetailersMap = fofoIds.stream().map(x -> customRetailerMap.get(x))
-
 
717
				.filter(x -> x != null).collect(Collectors.toList()).stream()
-
 
718
				.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
715
		String customRetailers = JSONObject.valueToString(customRetailersMap.values());
719
		String customRetailers = JSONObject.valueToString(customRetailersMap.values());
716
		List<String> serailNumberList = liveDemoBillingRespository.selectAllSerialNumber();
720
		List<String> serailNumberList = liveDemoBillingRespository.selectAllSerialNumber();
717
		LOGGER.info("serailNumberList" + serailNumberList);
721
		LOGGER.info("serailNumberList" + serailNumberList);
718
		List<InventoryItem> inventoryItem = null;
722
		List<InventoryItem> inventoryItem = null;
719
		List<InventoryItem> inventoryItem1 = new ArrayList<>();
723
		List<InventoryItem> inventoryItem1 = new ArrayList<>();
Line 1064... Line 1068...
1064
				}
1068
				}
1065
 
1069
 
1066
				List<NotifyColorChange> notifyColorChanges = notifyColorChangeRepository.selectByNotifyId(notifyIds);
1070
				List<NotifyColorChange> notifyColorChanges = notifyColorChangeRepository.selectByNotifyId(notifyIds);
1067
				Map<Integer, NotifyColorChange> notifyIdNotifyColorMap = this
1071
				Map<Integer, NotifyColorChange> notifyIdNotifyColorMap = this
1068
						.notifyOrdersToNotifyId(notifyColorChanges);
1072
						.notifyOrdersToNotifyId(notifyColorChanges);
1069
				Map<Integer, CustomRetailer> fofoIdsAndRetailerName = retailerService.getFofoRetailers(fofoIds);
1073
				Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
-
 
1074
				Map<Integer, CustomRetailer> fofoIdsAndRetailerName = fofoIds.stream()
-
 
1075
						.map(x -> customRetailerMap.get(x)).filter(x -> x != null).collect(Collectors.toList()).stream()
-
 
1076
						.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
1070
				Map<Integer, String> itemdescription = inventoryService.getItemIdDescriptionMap(oldItemIds);
1077
				Map<Integer, String> itemdescription = inventoryService.getItemIdDescriptionMap(oldItemIds);
1071
 
1078
 
1072
				model.addAttribute("notifyOrders", notifyOrders);
1079
				model.addAttribute("notifyOrders", notifyOrders);
1073
				model.addAttribute("notifyIdNotifyColorMap", notifyIdNotifyColorMap);
1080
				model.addAttribute("notifyIdNotifyColorMap", notifyIdNotifyColorMap);
1074
				model.addAttribute("itemdescription", itemdescription);
1081
				model.addAttribute("itemdescription", itemdescription);
Line 1170... Line 1177...
1170
			for (NotifyCancel nc : notifyCancels) {
1177
			for (NotifyCancel nc : notifyCancels) {
1171
				retailerIds.add(nc.getFofoId());
1178
				retailerIds.add(nc.getFofoId());
1172
				itemIds.add(nc.getItemId());
1179
				itemIds.add(nc.getItemId());
1173
			}
1180
			}
1174
 
1181
 
1175
			Map<Integer, CustomRetailer> fofoIdsAndRetailerName = retailerService.getFofoRetailers(retailerIds);
1182
			Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
1176
 
1183
 
-
 
1184
			Map<Integer, CustomRetailer> fofoIdsAndRetailerName = retailerIds.stream()
-
 
1185
					.map(x -> customRetailerMap.get(x)).filter(x -> x != null).collect(Collectors.toList()).stream()
-
 
1186
					.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
1177
			Map<Integer, String> itemdescription = inventoryService.getItemIdDescriptionMap(itemIds);
1187
			Map<Integer, String> itemdescription = inventoryService.getItemIdDescriptionMap(itemIds);
1178
			model.addAttribute("notifyCancels", notifyCancels);
1188
			model.addAttribute("notifyCancels", notifyCancels);
1179
			model.addAttribute("itemdescription", itemdescription);
1189
			model.addAttribute("itemdescription", itemdescription);
1180
			model.addAttribute("fofoIdsAndRetailerName", fofoIdsAndRetailerName);
1190
			model.addAttribute("fofoIdsAndRetailerName", fofoIdsAndRetailerName);
1181
		} else {
1191
		} else {