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.
46 lines
933 B
46 lines
933 B
<%@page import="java.sql.*"%>
|
|
<%
|
|
|
|
try{
|
|
|
|
//out.println("if");
|
|
String sql;
|
|
|
|
String zone = request.getParameter("zone");
|
|
|
|
sql = "select * from APPOINTMENT_DTL where 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") %>" },
|
|
<%
|
|
|
|
}
|
|
|
|
|
|
%>{"error":1}]<%
|
|
|
|
|
|
|
|
|
|
|
|
response.setContentType("application/json");
|
|
}catch(SQLException e){
|
|
out.println(e);
|
|
}
|
|
|
|
%>
|