Commit 1129e37e authored by CORP\sonam.kamble's avatar CORP\sonam.kamble

updated comp

parent 3b787a20
......@@ -467,7 +467,7 @@ public class Appointment
}
}
SimpleDateFormat format2 = new SimpleDateFormat("dd-MMM-yy");
SimpleDateFormat format2 = new SimpleDateFormat("DD-MOM-YY");
frDate = output.parse(fromDateStr);
toDate = output.parse(toDateStr);
System.out.println(format2.format(frDate));
......@@ -596,7 +596,7 @@ public class Appointment
}
}
SimpleDateFormat format2 = new SimpleDateFormat("dd-MMM-yy");
SimpleDateFormat format2 = new SimpleDateFormat("DD-MON-YY");
frDate = output.parse(fromDateStr);
toDate = output.parse(toDateStr);
System.out.println(format2.format(frDate));
......@@ -826,7 +826,7 @@ public class Appointment
{
return userString;
}
name = firstName+" "+lastName;
boolean isUserCreated = insertUser(mobNo, name, gender, emailId, "KOYE_HELP");
try
{
......@@ -1696,15 +1696,27 @@ 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");
try
if(firstName.length() == 0)
{
errString = genericUtility.getErrorString("address", "VMFIRSTNM", mobNo);
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
if(lastName.length() == 0)
{
dateOfBirth = output.parse(dob);
dtOfBirth = Timestamp.valueOf(String.valueOf(this.genericUtility.getValidDateString(dob, this.genericUtility.getApplDateFormat(), this.genericUtility.getDBDateFormat())) + " 00:00:00.00");
errString = genericUtility.getErrorString("address", "VMLASTNM", mobNo);
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
catch(Exception e)
if(regNo.length() == 0)
{
errString = genericUtility.getErrorString("dateOfBirth", "VTBIRTH", userId);
errString = genericUtility.getErrorString("address", "VTREGNO", mobNo);
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
......@@ -1745,6 +1757,18 @@ public class Appointment
}
}
try
{
dateOfBirth = output.parse(dob);
dtOfBirth = Timestamp.valueOf(String.valueOf(this.genericUtility.getValidDateString(dob, this.genericUtility.getApplDateFormat(), this.genericUtility.getDBDateFormat())) + " 00:00:00.00");
}
catch(Exception e)
{
errString = genericUtility.getErrorString("dateOfBirth", "VTBIRTH", userId);
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
if(dob.length() == 0)
{
errString = genericUtility.getErrorString("date_of_birth", "VTBIRTH", mobNo);
......@@ -1764,6 +1788,12 @@ public class Appointment
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
if(speciltyArr.length() == 0)
{
errString = genericUtility.getErrorString("specialty", "NULLSPLCOD", mobNo);
jsonObject = this.convertXmlToJsonInError(errString);
return jsonObject.toString();
}
if(address.length() == 0)
{
......
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