JSONObject json=new JSONObject();
JSONArray jsonMembers = new JSONArray();
for(Dept daily:dailys){
JSONObject member = new JSONObject();
member.put("dept_name", daily.getDPT_NAME());
member.put("user_name", daily.getUser_name());
if(daily.getE_mail()==null){
daily.setE_mail("暂无");
}
member.put("email",daily.getE_mail());
member.put("daily_date", daily.getDaily_date());
jsonMembers.put(member);
}
JSONArray jsonMembers1 = new JSONArray();
JSONObject member1 = new JSONObject();
member1.put("pagesize",dept.getPagesize());
member1.put("allpage", dept.getAllpage());
member1.put("allitems", dept.getAllitems());
member1.put("nowpage", dept.getNowpage());
jsonMembers1.put(member1);
json.put("check", jsonMembers);
json.put("page", jsonMembers1);
out.print(json);
JSONArray jsonMembers = new JSONArray();
for(Dept daily:dailys){
JSONObject member = new JSONObject();
member.put("dept_name", daily.getDPT_NAME());
member.put("user_name", daily.getUser_name());
if(daily.getE_mail()==null){
daily.setE_mail("暂无");
}
member.put("email",daily.getE_mail());
member.put("daily_date", daily.getDaily_date());
jsonMembers.put(member);
}
JSONArray jsonMembers1 = new JSONArray();
JSONObject member1 = new JSONObject();
member1.put("pagesize",dept.getPagesize());
member1.put("allpage", dept.getAllpage());
member1.put("allitems", dept.getAllitems());
member1.put("nowpage", dept.getNowpage());
jsonMembers1.put(member1);
json.put("check", jsonMembers);
json.put("page", jsonMembers1);
out.print(json);