???????servlet???????????????
response.setContentType("text/xml;charset=GBK");
String orgId = request.getParameter("code");
String rangeType = request.getParameter("timeType");
String rangeValue = request.getParameter("timeValue");
String start  = request.getParameter("start");
String limit = request.getParameter("limit");
StatService ss = new StatService();
String json = ss.getStatByOrganization(orgId?? rangeType?? rangeValue?? start?? limit);
PrintWriter out = response.getWriter();
out.write(json);
out.flush();
out.close();
???????潲???o???????????????????????????????????json?????
StringBuffer json = new StringBuffer();
String jsonData = "";
......
//???????????????????????????????
int startNum = new Integer(start).intValue();
int limitNum = new Integer(limit).intValue();
startNum = startNum + 1;
limitNum = startNum + limitNum;
......
rs = ps.executeQuery();
//?????count???????????????????е??????????????????????data???
json.append("{count:" + count + "??data:[{");
int i = startNum - 1;  //???????????????????????
while(rs.next()){
i = i + 1;
//?????rowNo?????????????????????????????????
json.append("rowNo:'" + i + "'??");
String gpsId = rs.getString("GPSID");
json.append("gpsid:'" + gpsId + "'??");
String policeName = rs.getString("CALLNO");
json.append("policeName:'" + policeName + "'??");
json.append("}??{");
}
jsonData = json.substring(0?? json.length()-2);
jsonData = jsonData + "]}";
//????json????????????
//{count:count??data:[{rowNo:rowNo??gpsId:gpsId??policeName:policeName}??....]}
?????????????????????????????
????????????????λ???á?