Subversion Repositories SmartDukaan

Rev

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

Rev 26961 Rev 26968
Line 458... Line 458...
458
		final InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
458
		final InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
459
		final InputStreamResource inputStreamResource = new InputStreamResource(inputStream);
459
		final InputStreamResource inputStreamResource = new InputStreamResource(inputStream);
460
		return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
460
		return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
461
	}
461
	}
462
	
462
	
463
	@RequestMapping(value = "/aging-report", method = RequestMethod.POST)
463
	@RequestMapping(value = "/aging-report", method = RequestMethod.GET)
464
	public ResponseEntity<?> downloadInventoryItemAgingByInterval(HttpServletRequest request) throws ProfitMandiBusinessException {
464
	public ResponseEntity<?> downloadInventoryItemAgingByInterval(HttpServletRequest request) throws ProfitMandiBusinessException {
465
		
465
		
466
		List<Integer> intervals = Arrays.asList(5,15,30,45);
466
		List<Integer> intervals = Arrays.asList(5,15,30,45);
467
		List<InventoryItemAgingModel> inventoryItemAgingModels = inventoryService.getItemAgingByInterval(intervals)
467
		List<InventoryItemAgingModel> inventoryItemAgingModels = inventoryService.getItemAgingByInterval(intervals)
468
				.values().stream().flatMap(x->x.stream()).collect(Collectors.toList());
468
				.values().stream().flatMap(x->x.stream()).collect(Collectors.toList());