Commit fb306f45 authored by jshaikh's avatar jshaikh

workflow multi-tendency changes

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@179609 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bf76c16a
package ibase.webitm.ejb.fin.adv; package ibase.webitm.ejb.fin.adv;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.utility.UserInfoBean;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -10,8 +11,7 @@ import java.sql.SQLException; ...@@ -10,8 +11,7 @@ import java.sql.SQLException;
public class DirectPaymentConfWF public class DirectPaymentConfWF
{ {
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag) public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag, String userInfoStr) throws RemoteException, ITMException
throws RemoteException, ITMException
{ {
System.out.println("Parameters ::: tranId[" + tranId + "],empCodeAprv[" + empCodeAprv + "],xmlDataAll[" + xmlDataAll + "],processId[" + processId + "],keyFlag[" + keyFlag + "]"); System.out.println("Parameters ::: tranId[" + tranId + "],empCodeAprv[" + empCodeAprv + "],xmlDataAll[" + xmlDataAll + "],processId[" + processId + "],keyFlag[" + keyFlag + "]");
String retString = ""; String retString = "";
...@@ -22,12 +22,21 @@ public class DirectPaymentConfWF ...@@ -22,12 +22,21 @@ public class DirectPaymentConfWF
int updcnt = 0; int updcnt = 0;
try { conn = connDriver.getConnectDB("DriverITM"); try
{
//conn = connDriver.getConnectDB("DriverITM");
UserInfoBean userInfo = new UserInfoBean(userInfoStr);
String transDB = userInfo.getTransDB();
if (transDB != null && transDB.trim().length() > 0)
{
conn = connDriver.getConnectDB(transDB);
}
connDriver = null; connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim(); empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim();
if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0)) { if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0))
{
sql = "update payment_exp set confirmed = 'Y', conf_date = sysdate where tran_id = ?"; sql = "update payment_exp set confirmed = 'Y', conf_date = sysdate where tran_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -36,7 +45,8 @@ public class DirectPaymentConfWF ...@@ -36,7 +45,8 @@ public class DirectPaymentConfWF
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Updated Successfully:" + updcnt); System.out.println("Updated Successfully:" + updcnt);
if (updcnt > 0) { if (updcnt > 0)
{
conn.commit(); conn.commit();
retString = "Y"; retString = "Y";
} }
......
package ibase.webitm.ejb.fin.adv; package ibase.webitm.ejb.fin.adv;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
import ibase.utility.UserInfoBean;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -10,8 +11,7 @@ import java.sql.SQLException; ...@@ -10,8 +11,7 @@ import java.sql.SQLException;
public class PayAgainstVoucherConfWF public class PayAgainstVoucherConfWF
{ {
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag) public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag, String userInfoStr) throws RemoteException, ITMException
throws RemoteException, ITMException
{ {
System.out.println("Parameters ::: tranId[" + tranId + "],empCodeAprv[" + empCodeAprv + "],xmlDataAll[" + xmlDataAll + "],processId[" + processId + "],keyFlag[" + keyFlag + "]"); System.out.println("Parameters ::: tranId[" + tranId + "],empCodeAprv[" + empCodeAprv + "],xmlDataAll[" + xmlDataAll + "],processId[" + processId + "],keyFlag[" + keyFlag + "]");
String retString = ""; String retString = "";
...@@ -22,12 +22,21 @@ public class PayAgainstVoucherConfWF ...@@ -22,12 +22,21 @@ public class PayAgainstVoucherConfWF
int updcnt = 0; int updcnt = 0;
try { conn = connDriver.getConnectDB("DriverITM"); try
{
//conn = connDriver.getConnectDB("DriverITM");
UserInfoBean userInfo = new UserInfoBean(userInfoStr);
String transDB = userInfo.getTransDB();
if (transDB != null && transDB.trim().length() > 0)
{
conn = connDriver.getConnectDB(transDB);
}
connDriver = null; connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim(); empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim();
if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0)) { if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0))
{
sql = "update misc_payment set confirmed = 'Y', conf_date = sysdate where tran_id = ?"; sql = "update misc_payment set confirmed = 'Y', conf_date = sysdate where tran_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -36,7 +45,8 @@ public class PayAgainstVoucherConfWF ...@@ -36,7 +45,8 @@ public class PayAgainstVoucherConfWF
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("Updated Successfully:" + updcnt); System.out.println("Updated Successfully:" + updcnt);
if (updcnt > 0) { if (updcnt > 0)
{
conn.commit(); conn.commit();
retString = "Y"; retString = "Y";
} }
......
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