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

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <%@page import="java.sql.*"%>
  2. <%
  3. try{
  4. //out.println("if");
  5. String sql;
  6. String zone = request.getParameter("zone");
  7. sql = "select * from APPOINTMENT_DTL where app_property_id like '"+zone+"-%'";
  8. //out.println(sql);
  9. Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.1.0.14:1521:chncorp","erp","erp");
  10. Statement stmt = conn.createStatement();
  11. ResultSet rs = stmt.executeQuery(sql);
  12. int appointments[];
  13. appointments = new int[100];
  14. String salary[];
  15. %>[<%
  16. while(rs.next()){
  17. String app_property_id = rs.getString("app_property_id");
  18. String a[] = app_property_id.split("-");
  19. // out.println(a[1]);
  20. String key = a[0]+"tt"+a[1];
  21. //out.println(key);
  22. %>
  23. {"app_property_id" :"<%= app_property_id %>", "pending":"<%= rs.getString("pending") %>" },
  24. <%
  25. }
  26. %>{"error":1}]<%
  27. response.setContentType("application/json");
  28. }catch(SQLException e){
  29. out.println(e);
  30. }
  31. %>