Commit 82aad0f9 authored by ssalve's avatar ssalve

Sarita: Done changes to resolve [Message Id not Found] error for gtpl as error...

Sarita: Done changes to resolve [Message Id not Found] error for gtpl as error code not passed in getErrorString on 03 JUL 18

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@187222 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 78fb0e7f
...@@ -782,7 +782,10 @@ AssetSalesConfLocal,AssetSalesConfRemote ...@@ -782,7 +782,10 @@ AssetSalesConfLocal,AssetSalesConfRemote
//changes by sarita on 06 JUN 2018 to set current date Timestamp parameter //changes by sarita on 06 JUN 2018 to set current date Timestamp parameter
//sql = "select code from period where fr_date = (select fr_date from period where code = (select acct_prd from period where '"+currAppdate+"' between fr_date and to_date))"; //sql = "select code from period where fr_date = (select fr_date from period where code = (select acct_prd from period where '"+currAppdate+"' between fr_date and to_date))";
sql4 = "select code from period where fr_date = (select fr_date from period where code = (select acct_prd from period where ? between fr_date and to_date))"; //changes by sarita on 03 JUL 2018 as getting account period not defined in period masted [START]
//sql4 = "select code from period where fr_date = (select fr_date from period where code = (select acct_prd from period where ? between fr_date and to_date))";
sql4 = "select code from period where fr_date = (select fr_date from period where code = (select code from period where ? between fr_date and to_date))";
//changes by sarita on 03 JUL 2018 as getting account period not defined in period masted [END]
pstmt4=conn.prepareStatement(sql4); pstmt4=conn.prepareStatement(sql4);
//Added by sarita on 06 JUN 2018 //Added by sarita on 06 JUN 2018
// Modified by Piyush [Should be tran date and not current date] on 02JUL18 // Modified by Piyush [Should be tran date and not current date] on 02JUL18
...@@ -1192,7 +1195,12 @@ AssetSalesConfLocal,AssetSalesConfRemote ...@@ -1192,7 +1195,12 @@ AssetSalesConfLocal,AssetSalesConfRemote
if(errshow.length() > 0) if(errshow.length() > 0)
{ {
System.out.println("mahesh called method"); System.out.println("mahesh called method");
errString = itmdbAccess.getErrorString("", "", "", "", conn); //Added by sarita to show error message as [getting message not found Exception] on 03 JUL 18 [START]
errCode = getErrorId(errshow);
System.out.println("Error Code is ["+errCode+"]");
errString = itmdbAccess.getErrorString("", errCode, "", "", conn);
//errString = itmdbAccess.getErrorString("", "", "", "", conn);
//Added by sarita to show error message as [getting message not found Exception] on 03 JUL 18 [END]
return errString; return errString;
} }
...@@ -2581,4 +2589,52 @@ AssetSalesConfLocal,AssetSalesConfRemote ...@@ -2581,4 +2589,52 @@ AssetSalesConfLocal,AssetSalesConfRemote
return sh; return sh;
} }
//Added by sarita on 19 JUN 18 to get store errorType and errCode in HashMap and Return [End] //Added by sarita on 19 JUN 18 to get store errorType and errCode in HashMap and Return [End]
//Added by sarita to get Error Code from errorString on 03 JUL 18 [START]
private String getErrorId(String retXml)
{
System.out.println("retXml------["+ retXml + "]");
E12GenericUtility genericUtility = null;
NodeList parentNodeList = null;
Node parentNode = null;
NodeList childNodeList = null;
Node childNode = null;
String childNodeName = "";
String errId = "";
int childNodeLength = 0;
int ctr=0;
try
{
if(retXml.indexOf("<Root>") != -1)
{
System.out.println("Inside root condition......");
genericUtility = new E12GenericUtility();
Document errDom = genericUtility.parseString(retXml);
parentNodeList = errDom.getElementsByTagName("Errors");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
childNodeLength = childNodeList.getLength();
for(ctr = 0; ctr < childNodeLength; ctr++)
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if("error".equalsIgnoreCase(childNodeName))
{
errId = childNode.getAttributes().getNamedItem("id").getNodeValue();
System.out.println("Error code -----["+ errId +"]");
}
}
}
}
catch(Exception e)
{
System.out.println("Exception from getErrorXml---["+ e.getMessage() +"]");
e.printStackTrace();
return retXml;
}
return errId;
}
//Added by sarita to get Error Code from errorString on 03 JUL 18 [END]
} }
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