Subversion Repositories SmartDukaan

Rev

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

Rev 23823 Rev 23891
Line 427... Line 427...
427
        final InputStreamResource inputStreamResource=new InputStreamResource(inputStream);
427
        final InputStreamResource inputStreamResource=new InputStreamResource(inputStream);
428
        return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
428
        return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
429
	}
429
	}
430
	
430
	
431
	@RequestMapping(value = "/saleHistory")
431
	@RequestMapping(value = "/saleHistory")
-
 
432
	public String saleHistory(HttpServletRequest request, @RequestParam(name = "searchValue", defaultValue = "") String searchValue, 
-
 
433
			@RequestParam(name = "searchType", defaultValue="") SearchType searchType, 
-
 
434
			@RequestParam(required = false) LocalDateTime startTime, 
-
 
435
			@RequestParam(required = false) LocalDateTime endTime, 
432
	public String saleHistory(HttpServletRequest request, @RequestParam(name = "searchValue", defaultValue = "") String searchValue, @RequestParam(name = "searchType", defaultValue="") SearchType searchType, @RequestParam(name = ProfitMandiConstants.START_TIME, required = false) String startTimeString, @RequestParam(name = ProfitMandiConstants.END_TIME, required = false) String endTimeString, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue = "10") int limit, Model model) throws ProfitMandiBusinessException{
436
			@RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue = "10") int limit, Model model) throws ProfitMandiBusinessException{
433
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
437
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
434
		
438
		
435
		Map<String, Object> map = orderService.getSaleHistory(loginDetails.getFofoId(), searchType, searchValue, startTimeString, endTimeString, offset, limit);
439
		Map<String, Object> map = orderService.getSaleHistory(loginDetails.getFofoId(), searchType, searchValue, startTime, endTime, offset, limit);
436
		model.addAllAttributes(map);
440
		model.addAllAttributes(map);
437
		
441
		
438
		return "sale-history";
442
		return "sale-history";
439
	}
443
	}
440
	
444
	
Line 453... Line 457...
453
        return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
457
        return new ResponseEntity<InputStreamResource>(inputStreamResource, headers, HttpStatus.OK);
454
	}
458
	}
455
	
459
	
456
	
460
	
457
	@RequestMapping(value = "/getPaginatedSaleHistory")
461
	@RequestMapping(value = "/getPaginatedSaleHistory")
458
	public String getSaleHistoryPaginated(HttpServletRequest request, @RequestParam(name = "searchValue", defaultValue="") String searchValue, @RequestParam(name = "searchType", defaultValue = "") SearchType searchType, @RequestParam(name = ProfitMandiConstants.START_TIME, required = false) String startTimeString, @RequestParam(name = ProfitMandiConstants.END_TIME, required = false) String endTimeString, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue="10") int limit, Model model) throws ProfitMandiBusinessException{
462
	public String getSaleHistoryPaginated(HttpServletRequest request, @RequestParam(name = "searchValue", defaultValue="") String searchValue, @RequestParam(name = "searchType", defaultValue = "") SearchType searchType, 
-
 
463
			@RequestParam(required = false) LocalDateTime startTime, 
-
 
464
			@RequestParam(required = false) LocalDateTime endTime, 
-
 
465
			@RequestParam(name = "offset", defaultValue = "0") int offset, 
-
 
466
			@RequestParam(name = "limit", defaultValue="10") int limit, Model model) throws ProfitMandiBusinessException{
459
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
467
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
460
		
468
		
461
		Map<String, Object> map = orderService.getSaleHistoryPaginated(loginDetails.getFofoId(), searchType, searchValue, startTimeString, endTimeString, offset, limit);
469
		Map<String, Object> map = orderService.getSaleHistoryPaginated(loginDetails.getFofoId(), searchType, searchValue, startTime, endTime, offset, limit);
462
		model.addAllAttributes(map);
470
		model.addAllAttributes(map);
463
		
471
		
464
		return "sale-history-paginated";
472
		return "sale-history-paginated";
465
	}
473
	}
466
 
474