| Line 716... |
Line 716... |
| 716 |
|
716 |
|
| 717 |
@RequestMapping(value = "/getFranchiseeInfo", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
717 |
@RequestMapping(value = "/getFranchiseeInfo", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 718 |
@ApiImplicitParams({@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header")})
|
718 |
@ApiImplicitParams({@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header")})
|
| 719 |
public ResponseEntity<?> getFranchiseeInfo(HttpServletRequest request, @RequestParam(name = "id") int id) throws
|
719 |
public ResponseEntity<?> getFranchiseeInfo(HttpServletRequest request, @RequestParam(name = "id") int id) throws
|
| 720 |
ProfitMandiBusinessException {
|
720 |
ProfitMandiBusinessException {
|
| - |
|
721 |
FranchiseeVisit franchiseeVisit;
|
| - |
|
722 |
if (String.valueOf(id).length() < 9) {
|
| 721 |
FranchiseeVisit franchiseeVisit = franchiseeVisitRepository.selectById(id);
|
723 |
franchiseeVisit = franchiseeVisitRepository.selectById(id);
|
| - |
|
724 |
} else {
|
| - |
|
725 |
List<FranchiseeVisit> franchiseeVisits = franchiseeVisitRepository.selectAllByFofoId(id);
|
| - |
|
726 |
franchiseeVisit = franchiseeVisits.get(0);
|
| - |
|
727 |
}
|
| 722 |
|
728 |
|
| 723 |
List<DBObject> mobileBrands = mongoClient.getAllBrandsToDisplay(3);
|
729 |
List<DBObject> mobileBrands = mongoClient.getAllBrandsToDisplay(3);
|
| 724 |
|
730 |
|
| 725 |
List<String> brands = mobileBrands.stream().filter(x -> (boolean) x.get("active"))
|
731 |
List<String> brands = mobileBrands.stream().filter(x -> (boolean) x.get("active"))
|
| 726 |
.map(x -> (String) x.get("name")).collect(Collectors.toList());
|
732 |
.map(x -> (String) x.get("name")).collect(Collectors.toList());
|