You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
1.2 KiB

<%@page import="java.sql.*"%>
<%
try{
String action = request.getParameter("action");
String from_date = request.getParameter("from_date");
String to_date = request.getParameter("to_date");
String action1 = "getCount";
//out.println("if");
String sql;
String zone = (String)session.getAttribute("zone");
sql = "select * from APPOINTMENT_DTL where app_date >= TO_DATE('"+from_date+"','YYYY-MM-DD') and app_date <= TO_DATE('"+to_date+"', 'YYYY-MM-DD') and app_property_id like '"+zone+"-%'";
//out.println(sql);
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.1.0.14:1521:chncorp","erp","erp");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
int appointments[];
appointments = new int[100];
String salary[];
%>[<%
while(rs.next()){
String app_property_id = rs.getString("app_property_id");
String a[] = app_property_id.split("-");
// out.println(a[1]);
String key = a[0]+"tt"+a[1];
//out.println(key);
%>
{"app_property_id" :"<%= app_property_id %>", "pending":"<%= rs.getString("pending") %>" },
<%
}
%>{}]<%
response.setContentType("application/json");
}catch(SQLException e){
out.println(e);
}
%>