| Line 52... |
Line 52... |
| 52 |
@PathVariable ReporticoProject projectName, @RequestBody(required=false) Map<String, String> paramsMap)
|
52 |
@PathVariable ReporticoProject projectName, @RequestBody(required=false) Map<String, String> paramsMap)
|
| 53 |
throws ProfitMandiBusinessException, UnsupportedOperationException, IOException {
|
53 |
throws ProfitMandiBusinessException, UnsupportedOperationException, IOException {
|
| 54 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
54 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 55 |
HttpResponse response;
|
55 |
HttpResponse response;
|
| 56 |
if (roleManager.isAdmin(loginDetails.getRoleIds())) {
|
56 |
if (roleManager.isAdmin(loginDetails.getRoleIds())) {
|
| 57 |
response = getAdminReportFile(loginDetails.getEmailId(), projectName, fileName + ".xml", paramsMap);
|
- |
|
| 58 |
} else {
|
57 |
} else {
|
| - |
|
58 |
//Ensuring on partner data;
|
| 59 |
response = reporticoService.getReportFile(loginDetails.getFofoId(), projectName, fileName + ".xml");
|
59 |
paramsMap.put("MANUAL_fofoId", loginDetails.getFofoId() + "");
|
| 60 |
}
|
60 |
}
|
| - |
|
61 |
response = getAdminReportFile(loginDetails.getEmailId(), projectName, fileName + ".xml", paramsMap);
|
| 61 |
HttpHeaders headers = new HttpHeaders();
|
62 |
HttpHeaders headers = new HttpHeaders();
|
| 62 |
InputStreamResource is = new InputStreamResource(response.getEntity().getContent());
|
63 |
InputStreamResource is = new InputStreamResource(response.getEntity().getContent());
|
| 63 |
headers.set("Content-Type", "application/vnd.ms-excel");
|
64 |
headers.set("Content-Type", "application/vnd.ms-excel");
|
| 64 |
headers.set("Content-disposition",
|
65 |
headers.set("Content-disposition",
|
| 65 |
"inline; filename=report-" + fileName + ".csv");
|
66 |
"inline; filename=report-" + fileName + ".csv");
|