Commit 3bc8c766 authored by ssalve's avatar ssalve

Sarita : Done changes to saveData to set userId parameter to set user[0] as...

Sarita : Done changes to saveData to set userId parameter to set user[0] as userID for processRequest on 26DEC2017

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177244 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3dbf60d8
......@@ -660,8 +660,12 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
StringBuffer xmlString = null;
java.sql.Timestamp currDate = null;
FinCommon fin=new FinCommon();
//Added by sarita on 26DEC2017 to add userId
String userId = "";
try
{
//Added by sarita on 26DEC2017 to add userId
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
System.out.println("In generateAutoPayment@@ :"+sReturnDetailsMap);
tranId = sReturnDetailsMap.get("TRAN_ID");
invoiceId = sReturnDetailsMap.get("INVOICE_ID");
......@@ -1042,8 +1046,9 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
xmlString.append("</Header0></group0></DocumentRoot>");
xmlOutString = xmlString.toString();
System.out.println("XmlString Detail======"+xmlString.toString());
retString=saveData(siteCode, xmlOutString, conn);
//replace and added by sarita on 26DEC2017 to add userId parameter
//retString=saveData(siteCode, xmlOutString, conn);
retString=saveData(siteCode, xmlOutString, conn,userId);
System.out.println("Before retString------>>["+retString+"]");
// Commented by Sneha on 02/07/2015, Request ID: D15DKAT001
......@@ -1680,9 +1685,12 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
chgUser = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
chgTerm = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
//Added by sarita on 26DEC2017 to add userId
String userId = "";
try
{
//Added by sarita on 26DEC2017 to add userId
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
currDate = getCurrtDate();
SimpleDateFormat sdfAppl = new SimpleDateFormat(genericUtility.getApplDateFormat());
String currDateStr = sdfAppl.format(currDate);
......@@ -2047,7 +2055,9 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
if(xmlBuffer!=null && xmlBuffer.length() > 0)
{
System.out.println("Before save Data------->>["+xmlBuffer.toString()+"]");
String ret = saveData(siteCode, xmlBuffer.toString(), conn);
//replace and added by sarita on 26DEC2017 to add userId parameter
//String ret = saveData(siteCode, xmlBuffer.toString(), conn);
String ret = saveData(siteCode, xmlBuffer.toString(), conn,userId);
System.out.println("After RP saleOrder save------->>["+ret+"]");
if(ret != null && ret.indexOf("Success") > -1)
{
......@@ -2444,8 +2454,9 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
return payables;
}
private String saveData(String siteCode, String xmlString, Connection conn) throws ITMException, Exception
//Added and replace by sarita on 26DEC2017
//private String saveData(String siteCode, String xmlString, Connection conn) throws ITMException, Exception
private String saveData(String siteCode, String xmlString, Connection conn,String userId) throws ITMException, Exception
{
System.out.println("saving data...........");
......@@ -2459,7 +2470,9 @@ public class SalesReturnConf extends ActionHandlerEJB implements SalesReturnConf
masterStateful = (MasterStatefulLocal)ctx.lookup("ibase/MasterStatefulEJB/local");
String [] authencate = new String[2];
authencate[0] = "";
//replace and added by sarita on 26DEC2017 to keep first object of user array as userID
//authencate[0] = "";
authencate[0] = userId;
authencate[1] = "";
System.out.println("xmlString in masterStateful :::: " + xmlString);
retString = masterStateful.processRequest(authencate, siteCode, true, xmlString, true, conn);
......
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