if(stuary.size() != 0){
for(int j = 0; j<ary.size(); j++){
JSONObject stuinfo = ary.getJSONObject(j);
JSONObject stuview = new JSONObject();
long stuCode = stuinfo.getLongValue("stuCode");
long yearin = stuinfo.getLongValue("yearIn");
String stuName = stuinfo.getString("stuName");
String classid = stuinfo.getString("classId");
String cls = classid.substring(classid.length()-2);
long stuid = stuinfo.getLongValue("stuId");
stuview.put("stuCode", stuCode);
stuview.put("yearIn", "20"+yearin+"级");
stuview.put("stuName", stuName);
stuview.put("cls", cls);
stuview.put("stuId", stuid);
data.add(stuview);
}
for(int i = 0; i<stuary.size(); i++){
long stuid2 = stuary.getLongValue(i);
for(int j = 0; j<data.size();){
JSONObject stuinfo = data.getJSONObject(j);
long stuid1 = stuinfo.getLongValue("stuId");
if (stuid1 == stuid2){
data.remove(j);
} else
j++;
}
}