实时报表
1、action中drop和whitelist判断处理 2、修复functionId后台没有获取到
This commit is contained in:
@@ -60,7 +60,6 @@ public class NtcDestIpReportController extends BaseController {
|
||||
}else if(bean.getReportType()==Constants.REPORT_TYPE_MONTH){
|
||||
bean.setSearchBusinessType("4");
|
||||
}
|
||||
|
||||
// 调用服务接口...
|
||||
|
||||
bean.setPageSize(-1);
|
||||
@@ -70,6 +69,7 @@ public class NtcDestIpReportController extends BaseController {
|
||||
} catch (ParseException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
|
||||
}
|
||||
List<String> titles=this.getDateTitiles(bean);
|
||||
model.addAttribute("titles", titles);
|
||||
@@ -91,7 +91,11 @@ public class NtcDestIpReportController extends BaseController {
|
||||
trimStr=report.getDestCountry().trim()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
@@ -115,7 +119,8 @@ public class NtcDestIpReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// List<Long> line= new ArrayList<Long>();
|
||||
|
||||
@@ -32,9 +32,7 @@ import net.sf.json.JsonConfig;
|
||||
public class NtcEntranceReportController extends BaseController {
|
||||
@RequestMapping("/ajaxNtcIspReport")
|
||||
public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId());
|
||||
|
||||
if(bean.getAction()!=null){
|
||||
for(FunctionServiceDict service:serviceList){
|
||||
if(service.getAction().intValue()==bean.getAction().intValue()){
|
||||
@@ -91,7 +89,11 @@ public class NtcEntranceReportController extends BaseController {
|
||||
trimStr=report.getEntranceId().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(Entry<String, Long> counrty:trimData.entrySet()){
|
||||
@@ -114,7 +116,8 @@ public class NtcEntranceReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// List<Long> line= new ArrayList<Long>();
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.nis.domain.report.NtcLwhhReport;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
@@ -89,7 +90,11 @@ public class NtcLwhhReportController extends BaseController {
|
||||
trimStr=report.getLwhh().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(RequestInfo requestInfo:requestInfos){
|
||||
@@ -111,7 +116,8 @@ public class NtcLwhhReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// for(RequestInfo requestInfo:requestInfos){
|
||||
|
||||
@@ -122,7 +122,8 @@ public class NtcPzReportController extends BaseController{
|
||||
model.addAttribute("datas", getList(json));
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
return "/report/pz";
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class NtcServiceReportController extends BaseController {
|
||||
serviceId.append(bean.getServices());
|
||||
}else{
|
||||
for(int i=0;i<serviceList.size();i++){
|
||||
if(i==0){
|
||||
if(i==0){
|
||||
serviceId.append(serviceList.get(i).getServiceId().toString());
|
||||
}else{
|
||||
serviceId.append(","+serviceList.get(i).getServiceId().toString());
|
||||
@@ -67,12 +67,15 @@ public class NtcServiceReportController extends BaseController {
|
||||
}
|
||||
StringBuffer url=new StringBuffer(Constants.LOG_BASE_URL+Constants.NTC_SERVICE_REPORT);
|
||||
try {
|
||||
//bean.setSearchReportEndTime("2018-08-27 00:00:00");
|
||||
String json=ConfigServiceUtil.getReport(url.toString(), bean);
|
||||
List<NtcServiceReport> data=getList(json);
|
||||
Map<Integer, Long> dataMap=new HashMap<>();
|
||||
for(NtcServiceReport report:data){
|
||||
dataMap.put(report.getService(),report.getSum().longValue());
|
||||
if(dataMap.containsKey(report.getService())){
|
||||
dataMap.put(report.getService(), dataMap.get(report.getService())+report.getSum().longValue());
|
||||
}else{
|
||||
dataMap.put(report.getService(),report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
for(Entry<Integer, Long> e:dataMap.entrySet()) {
|
||||
Map<String, Object> _data=new HashMap<>();
|
||||
@@ -82,7 +85,8 @@ public class NtcServiceReportController extends BaseController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// if(bean.getAction()!=null){
|
||||
// data.put(bean.getAction().toString(), 66666666l);
|
||||
|
||||
@@ -127,7 +127,11 @@ public class NtcSrcipDomesticReportController extends BaseController {
|
||||
report.getSrcCity().trim()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(String key:trimData.keySet()){
|
||||
@@ -152,7 +156,8 @@ public class NtcSrcipDomesticReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// long total=0;
|
||||
|
||||
@@ -90,7 +90,11 @@ public class NtcTagReportController extends BaseController {
|
||||
trimStr=report.getTag().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(ServiceDictInfo label:labels){
|
||||
@@ -112,7 +116,8 @@ public class NtcTagReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// for(ServiceDictInfo label:labels){
|
||||
|
||||
@@ -95,7 +95,11 @@ public class NtcXzReportController extends BaseController {
|
||||
trimStr=report.getAttrType().intValue()+Constants.REPORT_TRIM_CONNECTOR+
|
||||
report.getReportTime().substring(0,7);
|
||||
}
|
||||
if(trimData.containsKey(trimStr)){
|
||||
trimData.put(trimStr, trimData.get(trimStr)+report.getSum().longValue());
|
||||
}else{
|
||||
trimData.put(trimStr, report.getSum().longValue());
|
||||
}
|
||||
}
|
||||
HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
for(ServiceDictInfo xz:xzs){
|
||||
@@ -117,7 +121,8 @@ public class NtcXzReportController extends BaseController {
|
||||
model.addAttribute("datas", showData);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
e.printStackTrace();
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, null);
|
||||
}
|
||||
// HashMap<String,List<Long>> showData=new LinkedHashMap<>();//构造数据展示集合
|
||||
// for(ServiceDictInfo xz:xzs){
|
||||
|
||||
Reference in New Issue
Block a user