commit fabd52b62f78a56dd0245938f4c74b3d1609c0cc Author: bimalkalsa Date: Thu Dec 8 17:39:01 2022 +0530 initial commit diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..986771c --- /dev/null +++ b/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..ca75eb0 --- /dev/null +++ b/.project @@ -0,0 +1,31 @@ + + + Myproject + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..81672d4 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..d4540a5 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..a9452bf --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..d65ae0f --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..e853dfa --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,12 @@ + + + Myproject + + index.html + index.jsp + index.htm + default.html + default.jsp + default.htm + + \ No newline at end of file diff --git a/src/main/webapp/data.jsp b/src/main/webapp/data.jsp new file mode 100644 index 0000000..ea2247f --- /dev/null +++ b/src/main/webapp/data.jsp @@ -0,0 +1,55 @@ +<%@page import="java.sql.*"%> +<% +try{ + String zone = request.getParameter("zone"); + String division = request.getParameter("division"); + String billno = request.getParameter("billno"); + String subno = request.getParameter("subno"); + String is_existing_selected = request.getParameter("isExistingSelected"); + + + String sql; + String sql1; + if(Integer.parseInt(is_existing_selected) == 1){ + sql = "select * from mv1@erp where UPICNO = '" + zone + "-" + division + "-" + billno + "-" + subno+"'"; + + }else{ + sql = "select * from mv1@erp where UPICNO IN (select PROPERTYID from egpt_basic_property@erp where DL_PROPERTYID = '" + zone + "-" + division + "-" + billno + "')"; + + } + + + Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.1.0.14:1521:chncorp","erp","erp"); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery(sql); + //Statement stmt1 = conn.createStatement(); + //ResultSet rs1 = stmt1.executeQuery(sql1); + //out.println(rs1); + //out.println(sql); + + while(rs.next()){ + + String no1 = rs.getString("AGGREGATE_CURRENT_DEMAND"); + String no2 = rs.getString("AGGREGATE_ARREAR_DEMAND"); + String no3 = rs.getString("AGGREGATE_ARREAR_LP_DEMAND"); + String no4 = rs.getString("CURRENT_COLLECTION"); + String no5 = rs.getString("ARREARCOLLECTION"); + String no6 = rs.getString("ARREAR_LP_COLLECTION"); + String no7 = rs.getString("ARREAR_INCENTIVE"); + + Integer due = ( Integer.parseInt( no1 ) + Integer.parseInt( no2 ) + Integer.parseInt( no3 ) ) - ( Integer.parseInt( no4 ) + Integer.parseInt( no5 ) + Integer.parseInt( no6 ) + Integer.parseInt( no7 ) ); + %> + [ + {"OWNERSNAME":"<%=rs.getString("OWNERSNAME")%>", "ADDRESS":"<%=rs.getString("ADDRESS")%>", "AGGREGATE_CURRENT_DEMAND": "<%=rs.getString("AGGREGATE_CURRENT_DEMAND")%>", "DUE":"<%= due %>", "MOBILENO": "<%=rs.getString("MOBILENO")%>", "UPICNO": "<%=rs.getString("UPICNO")%>"} + + ] + <% + } + // Returns all employees (active and terminated) as json. + response.setContentType("application/json"); + +}catch(SQLException e){ + out.println(e); +} + +%> \ No newline at end of file diff --git a/src/main/webapp/getDivision.jsp b/src/main/webapp/getDivision.jsp new file mode 100644 index 0000000..3d03f9e --- /dev/null +++ b/src/main/webapp/getDivision.jsp @@ -0,0 +1,20 @@ +[ +<%@ page import="java.sql.*"%> +<% + String zone = request.getParameter("zone"); + + + Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.1.0.14:1521:chncorp","erp","erp"); + Statement stmt = conn.createStatement(); + ResultSet rs = stmt.executeQuery("select * from TBL_DIVISION where zone = " + zone); + +while(rs.next()){ +%> +{"DIVISION": "<%=rs.getString("DIVISION")%>"}, +<% +} + + // Returns all employees (active and terminated) as json. + response.setContentType("application/json"); +%> +{}] \ No newline at end of file diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html new file mode 100644 index 0000000..bdd5999 --- /dev/null +++ b/src/main/webapp/index.html @@ -0,0 +1,436 @@ + + + + + + + + Welcome to Greater Chennai Corporation + + + + +
+

Property Tax Appointment

+

Senior Citizen Request

+
+
+
+

+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +

+
+ +
+
+ +

Details

+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+

Appointment Booking Details

+
+
+
+ + +
+
+ + +
+
+ + + +
+
+ + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +   + \ No newline at end of file diff --git a/src/main/webapp/otp_verification.jsp b/src/main/webapp/otp_verification.jsp new file mode 100644 index 0000000..2d4191d --- /dev/null +++ b/src/main/webapp/otp_verification.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" session="true"%> +<%@ page language="java" import ="java.io.*,java.sql.*,java.net.HttpURLConnection,java.net.*,java.io.*,java.util.*" %> +<%@ page trimDirectiveWhitespaces="true"%> +<% +int session_otp = (Integer) session.getAttribute("otp"); +String string_entered_otp = request.getParameter("entered_otp"); +int entered_otp = Integer.parseInt(string_entered_otp); +if(session_otp == entered_otp) +{ + out.clear(); + out.print("success"); +} +else +{ + out.print("Incorrect OTP. Please enter correct OTP."); +} +%> \ No newline at end of file diff --git a/src/main/webapp/save.jsp b/src/main/webapp/save.jsp new file mode 100644 index 0000000..d701dae --- /dev/null +++ b/src/main/webapp/save.jsp @@ -0,0 +1,44 @@ +<%@ page import="java.sql.*,java.time.*"%> +<% + String property_id = request.getParameter("property_id"); + String contact_address = request.getParameter("contact_address"); + String mobile_number = request.getParameter("mobile_number"); + String age = request.getParameter("age"); + String app_date = request.getParameter("app_date"); + String app_time = request.getParameter("app_time"); + + // app_date=" to_date('"+app_date+"','rrrr-mm-dd') "; + + //out.println( property_id+" "+contact_address+" "+mobile_number+" "+age+" "+ app_date +" "+app_time ); + + try{ + Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.1.0.14:1521:chncorp","erp","erp"); + Statement stmt = conn.createStatement(); + stmt.execute("insert into appointment_dtl(App_Property_id, Contact_addr, Mobile_num, Age, App_Date, App_time)"+ + " values ("+ + "'"+property_id+"',"+ + "'"+contact_address+"',"+ + "'"+mobile_number+"',"+ + "'"+age+"',"+ + " to_date('"+app_date+"','rrrr-mm-dd'),"+ + "'"+app_time+"') " + ); + + + /*PreparedStatement st = conn.prepareStatement("insert into appointment_dtl(App_Property_id, Contact_addr, Mobile_num, Age, App_Date, App_time) values(?,?,?,?,?,?)"); + st.setString(1, property_id); + st.setString(2, contact_address); + st.setString(3, mobile_number); + st.setString(4, age); + st.setDate(5, app_date); + st.setString(6, app_time); + + st.executeUpdate(); + */ + out.print("Appointment was booked Successfully."); + conn.close(); + } + catch(Exception e){ + out.print(e); + } +%> diff --git a/src/main/webapp/send_otp.jsp b/src/main/webapp/send_otp.jsp new file mode 100644 index 0000000..63043cf --- /dev/null +++ b/src/main/webapp/send_otp.jsp @@ -0,0 +1,46 @@ +<%@ page language="java" session="true"%> +<%@ page language="java" import ="java.io.*,java.sql.*,java.net.HttpURLConnection,java.net.*,java.io.*,java.util.*" %> +<%@ page trimDirectiveWhitespaces="true"%> +<% + String MobileNo=request.getParameter("mobno"); + Random rand = new Random(); + int otp = rand.nextInt(90000) + 10000; + out.println("OTP sent successfully!"); + String generatedToken="Your OTP is " +otp+ ". OTP is valid for the next 5 minutes.%0aBy%0aGreater Chennai Corporation."; + try + { + generatedToken=generatedToken.replace(" ","%20"); + + String urlString="http://api.onex-ultimo.in/api/pushsms?user=GCCtrans&authkey=92kOC1RBGBIws&sender=GCCCRP&mobile="+MobileNo+"&text="+generatedToken+"&rpt=1&summary=1&output=json&entityid=1401572690000011081&templateid=1407165856492044436"; + URL myurl = null; + myurl = new URL(urlString ); + URLConnection connection = myurl.openConnection(); + HttpURLConnection conn = (HttpURLConnection)myurl.openConnection(); + conn.connect(); + BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); + String line = ""; + String page_line = ""; + while( (line = br.readLine() ) != null ) + { + page_line += line+""; + } + System.out.println("page_line :" +page_line); + + String[] tempvalue = page_line.split("
"); + String outputvalue = ""; + boolean isConnected = (conn.getContentLength() > 0); + java.util.Date dt=new java.util.Date(); + if(isConnected) + { + System.out.print("Sending Sucess"); + conn.disconnect(); + } + + }catch(Exception ex) + { + out.println("Error "+ex +" MobileNo"+MobileNo); + } + // storing otp in session + session.setAttribute("otp",otp); + +%> diff --git a/src/main/webapp/style.css b/src/main/webapp/style.css new file mode 100644 index 0000000..6087bbc --- /dev/null +++ b/src/main/webapp/style.css @@ -0,0 +1,169 @@ +* { + margin: 0; + padding: 0; + font-family: sans-serif; +} + +.form { + width: 60%; + margin: 0 auto; + max-width: 42 rem; +} + +.heading { + font-size: 20px; + line-height: 32px; + font-weight: 800; + text-align: center; + text-transform: uppercase; + margin: 20px 0; +} + +.heading2 { + text-align: left !important; +} + +.box { + box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; + padding: 12px 24px; + border-radius: 6px; + --tw-bg-opacity: 1; + background-color: rgb(249 250 251 / var(--tw-bg-opacity)); +} + +.firstbox { + display: flex; + flex-wrap: wrap; + padding-top: 20px; + margin-left: -12px; + margin-right: -12px; + margin-bottom: 24px; +} + +.inputcontainer { + width: 40%; + padding-left: 24px; + padding-right: 24px; + margin-bottom: 24px; +} + +.label { + display: block; + text-transform: uppercase; + letter-spacing: 0.025em; + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); + font-size: 12px; + line-height: 16px; + font-weight: 700; + margin-bottom: 8px; +} + +.blockinput { + width: 100%; + padding: 12px 20px; + margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} + +.secondbox { + display: grid; + padding-top: 20px; + margin-left: -12px; + margin-right: -12px; + margin-bottom: 24px; +} + +.inputcontainer2 { + display: flex; + align-items: center; + width: 100%; + padding-left: 12px; + padding-right: 12px; + margin-bottom: 24px; + font-weight:bold; +} + + +#otp { + display: none; +} + +.text { + width: 50%; + margin: 0 0 8px; + display: inline-block; +} + +.label2 { + width: 40%; + text-transform: uppercase; + letter-spacing: 0.025em; + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); + font-size: 14px; + line-height: 16px; + font-weight: 700; + margin-bottom: 8px; +} + +.input { + width: 50%; + padding: 12px 20px; + margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} + +.button { + --tw-bg-opacity: 1; + background-color: rgb(59 130 246 / var(--tw-bg-opacity)); + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + font-weight: 700; + padding: 8px 16px; + border: 1px; + border-radius: 4px; + margin-left: 8px; +} + +.button:hover { + --tw-bg-opacity: 1; + background-color: rgb(29 78 216 / var(--tw-bg-opacity)); +} + +.inputnum { + width: 40%; + padding: 12px 20px; + margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} + +.thirdbox { + display: flex; + flex-wrap: wrap; + margin-bottom: 8px; +} + +.inputcontainer3 { + width: 30%; + padding-right: 12px; + margin-bottom: 24px; +} + +.buttonbox { + display: flex; + justify-content: space-between; + padding-top: 32px; + padding-bottom: 32px; + width: 33.333333%; + margin: auto; +} \ No newline at end of file