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
userLev = "", profileId = "", entityType = "", userType = "", transDb = "",
firstName = "", middleName = "", lastName = "", regNo = "",
qualification = "", address = "", state = "", city = "", pinCode = "",errorString = "";
org.json.JSONArray speciltyArr = new org.json.JSONArray();
try
{
org.json.JSONObject jsonData = new org.json.JSONObject(data);
......@@ -814,12 +814,11 @@ public class Appointment
qualification = jsonData.getString("qualification");
state = jsonData.getString("state");
pinCode = jsonData.getString("pin");
Object o = jsonData.get("speciality");
org.json.JSONArray speciltyArr = jsonData.getJSONArray("speciality");
System.out.println(o.getClass());
System.out.println(""+name+ " fi "+firstName+" "+middleName+" "+lastName+ "mobNo :"+mobNo+"genser : "+gender+"email Id = "+emailId);
Object specialtyObj = jsonData.get("speciality");
if(specialtyObj.toString().length() > 0)
{
speciltyArr = jsonData.getJSONArray("speciality");
}
String userString = userExists(mobNo);
if(E12GenericUtility.checkNull(userString).length() > 0)
......@@ -843,14 +842,14 @@ public class Appointment
pStmt.setString(2, firstName);
pStmt.setString(3, middleName);
pStmt.setString(4, lastName);
pStmt.setString(5, address);
pStmt.setString(5, name);
pStmt.setString(6, qualification);
pStmt.setString(7, address);
pStmt.setString(8, "");
pStmt.setString(9, "");
pStmt.setString(10, city);
pStmt.setString(11, "DUMMY");
pStmt.setString(12, "DUMMY");
pStmt.setString(12, state);
pStmt.setString(13, pinCode);
pStmt.setString(14, "IND");
pStmt.setString(15, mobNo);
......@@ -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 mobileRex = "(0/91)?[1-9][0-9]{9}";
org.json.JSONObject jsonObject = new org.json.JSONObject();
org.json.JSONArray speciltyArr = new org.json.JSONArray();
try
{
org.json.JSONObject jsonData = new org.json.JSONObject(data);
......@@ -1696,9 +1695,7 @@ public class Appointment
qualification = jsonData.getString("qualification");
state = jsonData.getString("state");
pinCode = jsonData.getString("pin");
Object o = jsonData.get("speciality");
org.json.JSONArray speciltyArr = jsonData.getJSONArray("speciality");
Object specialtyObj = jsonData.get("speciality");
if(firstName.length() == 0)
{
......@@ -1788,7 +1785,8 @@ public class Appointment
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
if(speciltyArr.length() == 0)
if(specialtyObj.toString().length() == 0)
{
errString = genericUtility.getErrorString("specialty", "NULLSPLCOD", mobNo);
jsonObject = this.convertXmlToJsonInError(errString);
......@@ -1969,7 +1967,7 @@ public class Appointment
{
System.out.println("1.........................");
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);
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