Commit e49d66ea authored by ssalve's avatar ssalve

Sarita : Done changes by sarita to get loginCode,loginEmpCode,loginSiteCode...

Sarita : Done changes by sarita to get loginCode,loginEmpCode,loginSiteCode and profileId as input on 24 SEP 2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191139 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 54e9d226
......@@ -36,10 +36,20 @@ public class GenVal
//HashMap<String, String> errorMap=new HashMap<String, String>();
String formNo="";
int Ctr=0;
String xtraParams = "";
//end added by msalam on 22/11/07 for appending log in jboss log
//Added by Santosh on 15/12/2016 to return list of error codes instead of HashMap
ArrayList<HashMap<String,String>> errList = new ArrayList<HashMap<String,String>>();
//Done changes by sarita for rquest id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [START]
HashMap<String,String> xtraparamsValMap = new HashMap<>();
public GenVal(HashMap<String,String> xtraparamsValues)
{
xtraparamsValMap = xtraparamsValues;
}
//Done changes by sarita for rquest id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [END]
//Changed by Santosh on 15/12/2016 to return list of error codes instead of HashMap
//public HashMap genVal(String modName ,String objContext,Document data )
public ArrayList<HashMap<String,String>> genVal(String modName ,String objContext,Document data )
......@@ -818,7 +828,7 @@ public class GenVal
//return err;
return traceNodeStr;
}
//private String genVal( String fldName, String modName, Document dom, String objContext, String queryFrDB, String sqlInput, String resultStr, String errcd, Connection conn )
private String genVal( String fldName, String modName, Document dom, String objContext, String queryFrDB, String sqlInput, String resultStr, String errcd , Connection conn) throws Exception
{
......@@ -838,6 +848,8 @@ public class GenVal
String colValue="";
//Added by Santosh on 15/12/2016 to add trace in error string
String traceNodeStr = "";
boolean isValExistInMap = false;
String colNameInput = "";
try
{
writeLog( filePtr, "Mod Name :::" + modName, true );
......@@ -883,35 +895,62 @@ public class GenVal
{
for(int ctr=0; ctr < sqlInputVec.size(); ctr++)
{
isValExistInMap = false;
String colName = (String)sqlInputVec.get( ctr );
//added on 310107
int objContextInt = Integer.parseInt( colName.substring( 0, colName.indexOf( "." ) ) );
objContextInt++;
String objContext1 = new Integer( objContextInt ).toString();
String colName1 = colName.substring( colName.indexOf( "." ) + 1 );
// 21-09-2007 manoharan
colName1 = colName1.replaceAll( ",", " " );
colName1 = colName1.trim();
// end 21-09-2007
colType = getType(modName, objContext1, colName1);
//*****find the value of given field
//changed by msalam on 24/09/07
//for getting value of last row
System.out.println("Ctr==========="+Ctr);
//added by priyanka
if(isFromButton)
System.out.println("colName is 121["+colName+"]");
//added on 310107
//Done changes by sarita for request id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [START]
System.out.println("Values in HashMap :: ["+xtraparamsValMap+"]");
if((colName != null && colName.trim().length() > 0) && (colName.indexOf( "." ) != -1))
{
colValue = getValueFromDom1( dom, colName1, objContext1,Ctr);
colNameInput = colName.substring( colName.indexOf( "." ) + 1 );
colNameInput = colNameInput.replaceAll( ",", " " );
colNameInput = colNameInput.trim();
System.out.println("colNameInput is ["+colNameInput+"]");
}
else
for (String keys : xtraparamsValMap.keySet())
{
colValue = getValueFromDom( dom, colName1, objContext1);
if(colNameInput.equalsIgnoreCase(keys))
{
colType = "String";
colValue = xtraparamsValMap.get(keys);
System.out.println("colType ["+colType+"] \t colValue ["+colValue+"]");
isValExistInMap = true;
}
}
if(!isValExistInMap)
{
//Done changes by sarita for request id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [END]
int objContextInt = Integer.parseInt( colName.substring( 0, colName.indexOf( "." ) ) );
objContextInt++;
String objContext1 = new Integer( objContextInt ).toString();
writeLog( filePtr, "colValue form dom===[" + colValue + "]" + " Col Type [" + colType + "]", true );
String colName1 = colName.substring( colName.indexOf( "." ) + 1 );
// 21-09-2007 manoharan
colName1 = colName1.replaceAll( ",", " " );
colName1 = colName1.trim();
// end 21-09-2007
colType = getType(modName, objContext1, colName1);
//*****find the value of given field
//changed by msalam on 24/09/07
//for getting value of last row
System.out.println("Ctr==========="+Ctr);
//added by priyanka
if(isFromButton)
{
colValue = getValueFromDom1( dom, colName1, objContext1,Ctr);
}
else
{
colValue = getValueFromDom( dom, colName1, objContext1);
}
}
writeLog( filePtr, "colValue form dom===[" + colValue + "]" + " Col Type [" + colType + "]", true );
//changed by msalam on 24/09/07 end
//changed by msalam on 03/10/07 for colType = "DATETIME"
......
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