时间:2021-07-01 10:21:17 帮助过:13人阅读
前提:已经确定从数据库读出的数据转换为Json格式,测试了下,结果为:
factor Value: {"rows":[{"cur_val":0.1150,"pow_val":26.2913,"consum":76.3807,"voltage":228.6632,"opt_time":"2015-05-26 20:37"},{"cur_val":0.1181,"pow_val":27.0956,"consum":76.3807,"voltage":229.4428,"opt_time":"2015-05-26 20:53"},```]} 数据量有些多 大概有1000多条
Controller:
@ResponseBody
@RequestMapping(value="/factor",method ={RequestMethod.GET,RequestMethod.POST})
public String getFactor(HttpServletRequest request,HttpServletResponse response)throws SgccException{
String factor=null;
System.out.println(request.getParameter("eqid"));
try {
factor=elcDataService.queryData(request.getParameter("acid"), request.getParameter("eqid"));
System.out.print("factor Value: ");
System.out.print(factor);
} catch (Exception e) {
e.printStackTrace();
}
return factor;
}
页面:(大概把相关的贴下)
页面显示:
但是一直显示不出对应的图表,能否帮看下什么原因?