Commit 4dd2abe1 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@177242 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7a76a612
......@@ -253,10 +253,12 @@ public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalI
double issueQuantity = 0;
double rate = 0.0;
double grossRate = 0.0;
//added by sarita on 26DEC2017
String userId="";
try
{
//added by sarita on 26DEC2017 to add userId
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
// To retrieve tranDate and 1st issu or receipt itemSeries
sql = "select p.tran_date, (select item_ser from item where item_code = pd.item_code) as item_ser "
......@@ -600,7 +602,9 @@ public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalI
if(issueCondition && flagSaveString.equals(""))
{
System.out.println("Saving Data for Issue");
retSting = saveData(siteCode,valueXmlforIssue.toString(),conn);
//added and replace by sarita on 26DEC2017 to add userId
//retSting = saveData(siteCode,valueXmlforIssue.toString(),conn);
retSting = saveData(siteCode,valueXmlforIssue.toString(),conn,userId);
if(retSting.indexOf("Success") > -1)
{
String[] arrayForTranId = retSting.split("<TranID>");
......@@ -632,7 +636,9 @@ public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalI
if(receiptCondition && flagSaveString.equals(""))
{
System.out.println("Saving Data for Receipt");
retSting = saveData(siteCode,valueXmlforReceipt.toString(),conn);
//added and replace by sarita on 26DEC2017 to add userId
//retSting = saveData(siteCode,valueXmlforReceipt.toString(),conn);
retSting = saveData(siteCode,valueXmlforReceipt.toString(),conn,userId);
if(retSting.indexOf("Success") > -1)
{
String[] arrayForTranId = retSting.split("<TranID>");
......@@ -1149,8 +1155,9 @@ public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalI
return valueXmlString.toString();
}
public String saveData(String siteCode,String xmlString, Connection conn) throws ITMException
//Added and replace by sarita on 26DEC2017
//public String saveData(String siteCode,String xmlString, Connection conn) throws ITMException
public String saveData(String siteCode,String xmlString, Connection conn,String userId) throws ITMException
{
System.out.println("saving data...........");
InitialContext ctx = null;
......@@ -1162,7 +1169,9 @@ public class PhysicalInvFreezeConf extends ActionHandlerEJB implements PhysicalI
ctx = new InitialContext(appConnect.getProperty());
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 :::: " + xmlString+"END END END");
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