源代码:
<%
/*获取所有业务
*/
String url="#url";
String param="#URL"; //地区编号
String html="";
//String temp="";
try{
String result=sendGet(url,param);
result=URLDecoder.decode(result);
//解析json数据
JSONObject jsonObject=JSONObject.fromObject(result);
String info=jsonObject.getString("info");
JSONArray infoArray=JSONArray.fromObject(info);
//拼接下面html数据
for(int i=0;i<infoArray.size();i++){
JSONObject oneObject=infoArray.getJSONObject(i);
//temp=oneObject.getString("ACCEPT_USER_NAME");
//没有完成的业务就没有完成时间,需要先判断,否则报错:
String finish_time="";
if(oneObject.containsKey("FINISH_TIME")){
finish_time="<script type='text/javascript'>showTime('"+oneObject.getString("FINISH_TIME")+"');</script>";
}else{
finish_time="处理中";
}
String time_limit="";
if(oneObject.containsKey("TIME_LIMIT")){
time_limit="<script type='text/javascript'>showTime('"+oneObject.getString("TIME_LIMIT")+"');</script>";
}else{
time_limit="-";
}
html+="<li><span class='span1'>"+oneObject.getString("RECEIVE_NUMBER")+"</span><span class='span2'><a title='"+oneObject.getString("APPLY_SUBJECT")+"'>"+oneObject.getString("APPLY_SUBJECT")+"</a></span><span class='span4'><a title='"+oneObject.getString("ORG_NAME")+"'>"+oneObject.getString("ORG_NAME")+"</a></span><span class='span4'>"+time_limit+"</span><span class='span4'>"+finish_time+"</span><span class='span3 yellow'>"+oneObject.getString("CURRENT_NODE_NAME")+"</span></li>";
}
//out.print(html);
}catch(Exception e){
out.print(e.toString());
}
%>
麻烦高手看看是啥情况!