提交标签报表页面第一版
This commit is contained in:
28
src/main/java/com/nis/domain/log/NtcServiceReportLog.java
Normal file
28
src/main/java/com/nis/domain/log/NtcServiceReportLog.java
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
*@Title: NtcServiceReportLog.java
|
||||
*@Package com.nis.domain.log
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年7月9日 上午8:57:01
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
/**
|
||||
* @ClassName: NtcServiceReportLog.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年7月9日 上午8:57:01
|
||||
* @version V1.0
|
||||
*/
|
||||
public class NtcServiceReportLog extends BaseReportLog<NtcServiceReportLog> {
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 5574384523786886920L;
|
||||
|
||||
}
|
||||
43
src/main/java/com/nis/domain/log/NtcTagReportLog.java
Normal file
43
src/main/java/com/nis/domain/log/NtcTagReportLog.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
*@Title: NtcServiceReportLog.java
|
||||
*@Package com.nis.domain.log
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年7月9日 上午8:57:01
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
/**
|
||||
* @ClassName: NtcServiceReportLog.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年7月9日 上午8:57:01
|
||||
* @version V1.0
|
||||
*/
|
||||
public class NtcTagReportLog extends BaseReportLog<NtcTagReportLog> {
|
||||
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 2245672277797057001L;
|
||||
private Integer tag;
|
||||
/**
|
||||
* tag
|
||||
* @return tag
|
||||
*/
|
||||
|
||||
public Integer getTag() {
|
||||
return tag;
|
||||
}
|
||||
/**
|
||||
* @param tag the tag to set
|
||||
*/
|
||||
public void setTag(Integer tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.ws.rs.client.Invocation.Builder;
|
||||
@@ -62,13 +64,13 @@ public class ReportResultLog<T extends BaseReportLog> extends RestfulResult{
|
||||
public void setData(Page<T> data) {
|
||||
this.data = data;
|
||||
}
|
||||
public ReportResultLog<T> getReport(String reportUrl,SearchReport searchCondition) throws MaatConvertException{
|
||||
if(StringUtils.isBlank(searchCondition.getSearchService())){
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
public ReportResultLog<T> getReport(String reportUrl,SearchReport searchCondition) throws MaatConvertException, UnsupportedEncodingException{
|
||||
// if(StringUtils.isBlank(searchCondition.getSearchService())){
|
||||
// throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
// }
|
||||
String result = null;
|
||||
ReportResultLog<T> bean = null;
|
||||
StringBuffer url=new StringBuffer(reportUrl+"?");
|
||||
StringBuffer url=new StringBuffer(reportUrl);
|
||||
url.append("searchBusinessType=").append(searchCondition.getSearchBusinessType())
|
||||
.append("&searchService=").append(searchCondition.getSearchService());
|
||||
if(searchCondition.getSearchCondition()!=null){
|
||||
@@ -95,7 +97,7 @@ public class ReportResultLog<T extends BaseReportLog> extends RestfulResult{
|
||||
url.append("&fields=").append(searchCondition.getFields());
|
||||
}
|
||||
//创建连接
|
||||
WebTarget wt = ClientUtil.getWebTarger(url.toString());
|
||||
WebTarget wt = ClientUtil.getWebTarger(URLEncoder.encode(url.toString(),"UTF-8"));
|
||||
Builder header = wt.request(MediaType.APPLICATION_JSON);
|
||||
Response response= header.get();
|
||||
if( response.getStatus() == 200){
|
||||
|
||||
Reference in New Issue
Block a user