日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

jsp页面调用ajax,在jsp中使用jquery的ajax

發(fā)布時(shí)間:2024/4/13 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 jsp页面调用ajax,在jsp中使用jquery的ajax 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

jQuery.ajax({

url: 'getAssessmentStaffEvaluation.html',

type: 'post',

data: 'userId=' + userid + '&startDate=' + startDate + '&endDate=' + endDate,

dataType:'json',

success: function(returnObj){

$("#countTd").text("服務(wù)客戶(hù)次數(shù):" + returnObj.customerService + "??? 閱讀報(bào)告篇數(shù):" + returnObj.reportReadLog +"??? 撰寫(xiě)產(chǎn)品篇數(shù):" + returnObj.htreport + "??? 完成任務(wù)情況:" + returnObj.task + "??? 工作申請(qǐng)情況:" + returnObj.applyTask);

}

});

public ModelAndView getAssessmentStaffEvaluationHandler(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException, ParseException {

String userId = Utils.trim(request.getParameter("userId"));

String startDate = Utils.trim(request.getParameter("startDate"));

String endDate = Utils.trim(request.getParameter("endDate"));

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

Map param = new HashMap();

param.put("inputid", userId);

param.put("beginDate", sdf.parse(startDate));

param.put("endDate", sdf.parse(endDate));

Response response1 = customerServiceService.getCustomerServiceCount(param);

Integer count1 = response1.getReturnInt();

Calendar c = Calendar.getInstance();

c.setTime(sdf.parse(endDate));

c.add(Calendar.DATE, 1);

Map param1 = new HashMap();

param1.put("userid", userId);

param1.put("beginDate", sdf.parse(startDate));

param1.put("endDate", c.getTime());

Response response2 = reportReadLogService.getReportReadLogCount(param1);

Integer count2 = (Integer) response2.getReturnObject();

Response response3 = htreportService.getHtreportCount(param1);

Integer count3 = (Integer) response3.getReturnObject();

Map param2 = new HashMap();

param2.put("createId", userId);

param2.put("flag", 1);

param2.put("startTime", sdf.parse(startDate));

param2.put("endTime", c.getTime());

Response response4 = taskService.getTaskCount(param2);

Integer count4 = (Integer) response4.getReturnObject();

Map param3 = new HashMap();

param3.put("createId", userId);

param3.put("beginDate", sdf.parse(startDate));

param3.put("endDate", c.getTime());

Response response5 = applyTaskService.getApplyTaskCount(param3);

Integer count5 = (Integer) response5.getReturnObject();

response.setContentType("text/json");

PrintWriter out = response.getWriter();

out.println("{\"customerService\":\"" + count1 + "\", \"reportReadLog\":\"" + count2 + "\", \"htreport\":\""

+ count3 + "\", \"task\":\"" + count4 + "\", \"applyTask\":\"" + count5 + "\"}");

out.flush();

out.close();

return null;

}

總結(jié)

以上是生活随笔為你收集整理的jsp页面调用ajax,在jsp中使用jquery的ajax的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。