Subversion Repositories SmartDukaan

Rev

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

Rev 25896 Rev 26066
Line 57... Line 57...
57
					});
57
					});
58
				}
58
				}
59
			});
59
			});
60
	
60
	
61
	
61
	
62
	public HttpResponse getReportFile(ReporticoProject projectName, String reportName) throws HttpHostConnectException, ProfitMandiBusinessException {
62
	public HttpResponse getReportFile(ReporticoProject projectName, String reportName) 
63
		
-
 
-
 
63
			throws HttpHostConnectException, ProfitMandiBusinessException {
64
		Map<String, String> authMap = projectAuthMap.get(projectName);
64
		Map<String, String> authMap = projectAuthMap.get(projectName);
65
		
-
 
66
		Map<String, String> params = new HashMap<>(authMap);
65
		Map<String, String> params = new HashMap<>(authMap);
67
		params.put("xmlin", reportName);
66
		params.put("xmlin", reportName);
68
		params.put("target_format", "CSV");
67
		params.put("target_format", "CSV");
69
		params.put("execute_mode", "EXECUTE");
68
		params.put("execute_mode", "EXECUTE");
70
		return restClient.getResponse(reporticoUrl, params, new HashMap<>());
69
		return restClient.getResponse(reporticoUrl, params, new HashMap<>());
Line 109... Line 108...
109
		return new ByteArrayResource(responseEntity.getBody());
108
		return new ByteArrayResource(responseEntity.getBody());
110
		
109
		
111
	}
110
	}
112
	
111
	
113
	public HttpResponse getReportFile(int fofoId, ReporticoProject projectName, String reportName) throws HttpHostConnectException, ProfitMandiBusinessException {
112
	public HttpResponse getReportFile(int fofoId, ReporticoProject projectName, String reportName) throws HttpHostConnectException, ProfitMandiBusinessException {
-
 
113
		Map<String, String> params = new HashMap<>();
-
 
114
		params.put("MANUAL_fofoId", String.valueOf(fofoId));
-
 
115
		return this.getReportFile(projectName, reportName, params);
114
		
116
	}
-
 
117
 
-
 
118
	
-
 
119
	public HttpResponse getReportFile(ReporticoProject projectName, String reportName, Map<String, String> params) throws HttpHostConnectException, ProfitMandiBusinessException {
-
 
120
		if(params==null) {
115
		Map<String, String> authMap = projectAuthMap.get(projectName);
121
			params=new HashMap<>();
116
		
122
		}
117
		Map<String, String> params = new HashMap<>(authMap);
123
		params.putAll(projectAuthMap.get(projectName));
118
		params.put("xmlin", reportName);
124
		params.put("xmlin", reportName);
119
		params.put("target_format", "CSV");
125
		params.put("target_format", "CSV");
120
		params.put("execute_mode", "EXECUTE");
126
		params.put("execute_mode", "EXECUTE");
121
		params.put("MANUAL_fofoId", String.valueOf(fofoId));
-
 
122
		return restClient.getResponse(reporticoUrl, params, new HashMap<>());
127
		return restClient.getResponse(reporticoUrl, params, new HashMap<>());
123
	}
128
	}
124
	
129
	
125
	public HttpResponse getJsonFile(ReporticoProject projectName, String reportName, Map<String, String> params) throws HttpHostConnectException, ProfitMandiBusinessException {
130
	public HttpResponse getJsonFile(ReporticoProject projectName, String reportName, Map<String, String> params) throws HttpHostConnectException, ProfitMandiBusinessException {
126
		
131