Commit b6eec6e1 authored by CORP\sonam.kamble's avatar CORP\sonam.kamble

Changes done for specialty.

parent 2cff17b4
...@@ -785,7 +785,7 @@ public class Appointment ...@@ -785,7 +785,7 @@ public class Appointment
userLev = "", profileId = "", entityType = "", userType = "", transDb = "", userLev = "", profileId = "", entityType = "", userType = "", transDb = "",
firstName = "", middleName = "", lastName = "", regNo = "", firstName = "", middleName = "", lastName = "", regNo = "",
qualification = "", address = "", state = "", city = "", pinCode = "",errorString = ""; qualification = "", address = "", state = "", city = "", pinCode = "",errorString = "";
org.json.JSONArray speciltyArr = new org.json.JSONArray();
try try
{ {
org.json.JSONObject jsonData = new org.json.JSONObject(data); org.json.JSONObject jsonData = new org.json.JSONObject(data);
...@@ -814,12 +814,11 @@ public class Appointment ...@@ -814,12 +814,11 @@ public class Appointment
qualification = jsonData.getString("qualification"); qualification = jsonData.getString("qualification");
state = jsonData.getString("state"); state = jsonData.getString("state");
pinCode = jsonData.getString("pin"); pinCode = jsonData.getString("pin");
Object o = jsonData.get("speciality"); Object specialtyObj = jsonData.get("speciality");
org.json.JSONArray speciltyArr = jsonData.getJSONArray("speciality"); if(specialtyObj.toString().length() > 0)
{
System.out.println(o.getClass()); speciltyArr = jsonData.getJSONArray("speciality");
}
System.out.println(""+name+ " fi "+firstName+" "+middleName+" "+lastName+ "mobNo :"+mobNo+"genser : "+gender+"email Id = "+emailId);
String userString = userExists(mobNo); String userString = userExists(mobNo);
if(E12GenericUtility.checkNull(userString).length() > 0) if(E12GenericUtility.checkNull(userString).length() > 0)
...@@ -843,14 +842,14 @@ public class Appointment ...@@ -843,14 +842,14 @@ public class Appointment
pStmt.setString(2, firstName); pStmt.setString(2, firstName);
pStmt.setString(3, middleName); pStmt.setString(3, middleName);
pStmt.setString(4, lastName); pStmt.setString(4, lastName);
pStmt.setString(5, address); pStmt.setString(5, name);
pStmt.setString(6, qualification); pStmt.setString(6, qualification);
pStmt.setString(7, address); pStmt.setString(7, address);
pStmt.setString(8, ""); pStmt.setString(8, "");
pStmt.setString(9, ""); pStmt.setString(9, "");
pStmt.setString(10, city); pStmt.setString(10, city);
pStmt.setString(11, "DUMMY"); pStmt.setString(11, "DUMMY");
pStmt.setString(12, "DUMMY"); pStmt.setString(12, state);
pStmt.setString(13, pinCode); pStmt.setString(13, pinCode);
pStmt.setString(14, "IND"); pStmt.setString(14, "IND");
pStmt.setString(15, mobNo); pStmt.setString(15, mobNo);
...@@ -1665,7 +1664,7 @@ public class Appointment ...@@ -1665,7 +1664,7 @@ public class Appointment
String emailRegex = "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$"; String emailRegex = "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$";
String mobileRex = "(0/91)?[1-9][0-9]{9}"; String mobileRex = "(0/91)?[1-9][0-9]{9}";
org.json.JSONObject jsonObject = new org.json.JSONObject(); org.json.JSONObject jsonObject = new org.json.JSONObject();
org.json.JSONArray speciltyArr = new org.json.JSONArray();
try try
{ {
org.json.JSONObject jsonData = new org.json.JSONObject(data); org.json.JSONObject jsonData = new org.json.JSONObject(data);
...@@ -1696,9 +1695,7 @@ public class Appointment ...@@ -1696,9 +1695,7 @@ public class Appointment
qualification = jsonData.getString("qualification"); qualification = jsonData.getString("qualification");
state = jsonData.getString("state"); state = jsonData.getString("state");
pinCode = jsonData.getString("pin"); pinCode = jsonData.getString("pin");
Object o = jsonData.get("speciality"); Object specialtyObj = jsonData.get("speciality");
org.json.JSONArray speciltyArr = jsonData.getJSONArray("speciality");
if(firstName.length() == 0) if(firstName.length() == 0)
{ {
...@@ -1788,7 +1785,8 @@ public class Appointment ...@@ -1788,7 +1785,8 @@ public class Appointment
jsonObject = this.convertXmlToJsonInError(errString); jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString(); return jsonObject.toString();
} }
if(speciltyArr.length() == 0)
if(specialtyObj.toString().length() == 0)
{ {
errString = genericUtility.getErrorString("specialty", "NULLSPLCOD", mobNo); errString = genericUtility.getErrorString("specialty", "NULLSPLCOD", mobNo);
jsonObject = this.convertXmlToJsonInError(errString); jsonObject = this.convertXmlToJsonInError(errString);
...@@ -1969,7 +1967,7 @@ public class Appointment ...@@ -1969,7 +1967,7 @@ public class Appointment
{ {
System.out.println("1........................."); System.out.println("1.........................");
conn = connDriver.getConnectDB("APPVIS"); conn = connDriver.getConnectDB("APPVIS");
sql = "select DISTINCT(state_code),descr as state from state where count_code = 'IND' and state_code like 'IND%' and state_code is not null order by state"; sql = "select DISTINCT(state_code),descr as state from state where count_code = 'IND' and state_code is not null order by state";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
rs = pStmt.executeQuery(); rs = pStmt.executeQuery();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment