Commit be248ee3 authored by ajadhav's avatar ajadhav

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177283 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1cada905
...@@ -82,6 +82,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand ...@@ -82,6 +82,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
DistCommon distCommon=new DistCommon(); DistCommon distCommon=new DistCommon();
StringBuffer xmlBuff; StringBuffer xmlBuff;
String userId = "";//Added By Pavan R 27/DEC/17
try try
{ {
conn=getConnection(); conn=getConnection();
...@@ -93,6 +94,9 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand ...@@ -93,6 +94,9 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand
//custCode=genericUtility.getColumnValue("cust_code",Dom); //custCode=genericUtility.getColumnValue("cust_code",Dom);
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat());
loginSite=genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); loginSite=genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
//added by Pavan R on 27/DEC/17 userId passwed to savData() and processRequest()
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
System.out.println("userId::["+userId+"]");
tranDate = java.sql.Timestamp.valueOf(sdf1.format(new java.util.Date()).toString() + " 00:00:00.0"); tranDate = java.sql.Timestamp.valueOf(sdf1.format(new java.util.Date()).toString() + " 00:00:00.0");
System.out.println("FromDate["+fromDate+"]: ToDate["+toDate+"]"); System.out.println("FromDate["+fromDate+"]: ToDate["+toDate+"]");
Calendar currentDate = Calendar.getInstance(); Calendar currentDate = Calendar.getInstance();
...@@ -224,7 +228,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand ...@@ -224,7 +228,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand
System.out.println("xmlString::"+xmlString); System.out.println("xmlString::"+xmlString);
retString = saveData(loginSite,xmlString,conn); retString = saveData(loginSite,xmlString,userId,conn);
} }
else else
{ {
...@@ -366,7 +370,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand ...@@ -366,7 +370,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand
return errString; return errString;
} }
private String saveData(String siteCode,String xmlString,Connection conn) throws ITMException private String saveData(String siteCode,String xmlString,String userId,Connection conn) throws ITMException
{ {
System.out.println("saving data..........."); System.out.println("saving data...........");
InitialContext ctx = null; InitialContext ctx = null;
...@@ -385,7 +389,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand ...@@ -385,7 +389,7 @@ public class DemandGenPrc extends ProcessEJB implements DemandGenPrcLocal,Demand
masterStateful = (MasterStatefulLocal)ctx.lookup("ibase/MasterStatefulEJB/local"); masterStateful = (MasterStatefulLocal)ctx.lookup("ibase/MasterStatefulEJB/local");
System.out.println("-----------masterStateful------- " + masterStateful); System.out.println("-----------masterStateful------- " + masterStateful);
String [] authencate = new String[2]; String [] authencate = new String[2];
authencate[0] = ""; authencate[0] = userId;
authencate[1] = ""; authencate[1] = "";
System.out.println("xmlString to masterstateful [" + xmlString + "]"); System.out.println("xmlString to masterstateful [" + xmlString + "]");
retString = masterStateful.processRequest(authencate, siteCode, true, xmlString,true,conn); retString = masterStateful.processRequest(authencate, siteCode, true, xmlString,true,conn);
......
...@@ -365,13 +365,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -365,13 +365,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
String crTerm = ""; String crTerm = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
int count = 0; int count = 0;
String userId = "";//Added By Pavan R 27/DEC/17
try { try {
//genutility = GenericUtility.getInstance(); //genutility = GenericUtility.getInstance();
E12GenericUtility genutility= new E12GenericUtility(); E12GenericUtility genutility= new E12GenericUtility();
sdf = new SimpleDateFormat(genutility.getApplDateFormat()); sdf = new SimpleDateFormat(genutility.getApplDateFormat());
//added by Pavan R on 27/DEC/17 userId passwed to savData() and processRequest()
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
System.out.println("userId::["+userId+"]");
currDate = new java.sql.Timestamp(System.currentTimeMillis()); currDate = new java.sql.Timestamp(System.currentTimeMillis());
currAppdate = sdf.format(currDate); currAppdate = sdf.format(currDate);
java.sql.Timestamp invDate = getInvoiceDate(conn, invoiceId); java.sql.Timestamp invDate = getInvoiceDate(conn, invoiceId);
...@@ -507,7 +512,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -507,7 +512,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
System.out System.out
.println("------ debit Note Data saving------------------"); .println("------ debit Note Data saving------------------");
retString = saveData(siteCode, xmlString, conn); retString = saveData(siteCode, xmlString,userId, conn);
System.out System.out
.println("debit Note Data saved successfully. retString : [[" .println("debit Note Data saved successfully. retString : [["
+ retString + "]]"); + retString + "]]");
...@@ -730,7 +735,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -730,7 +735,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
return cnt; return cnt;
} }
private String saveData(String siteCode, String xmlString, Connection conn) private String saveData(String siteCode, String xmlString, String userId,Connection conn)
throws ITMException { throws ITMException {
System.out.println("saving data..........."); System.out.println("saving data...........");
...@@ -744,7 +749,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -744,7 +749,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
.lookup("ibase/MasterStatefulEJB/local"); .lookup("ibase/MasterStatefulEJB/local");
String[] authencate = new String[2]; String[] authencate = new String[2];
authencate[0] = ""; authencate[0] = userId;
authencate[1] = ""; authencate[1] = "";
System.out.println("xmlString in masterStateful :::: " + xmlString); System.out.println("xmlString in masterStateful :::: " + xmlString);
retString = masterStateful.processRequest(authencate, siteCode, retString = masterStateful.processRequest(authencate, siteCode,
......
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