Extjs??????Java??????????????
???????????? ???????[ 2014/12/5 16:04:41 ] ????????JAVA ????? ????
???????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}??....]}
?????????????????????????????
????????????????λ???á?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11