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;
import ibase.system.config.ConnDriver;
import ibase.utility.UserInfoBean;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
......@@ -10,8 +11,7 @@ import java.sql.SQLException;
public class DirectPaymentConfWF
{
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag)
throws RemoteException, ITMException
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag, String userInfoStr) throws RemoteException, ITMException
{
System.out.println("Parameters ::: tranId[" + tranId + "],empCodeAprv[" + empCodeAprv + "],xmlDataAll[" + xmlDataAll + "],processId[" + processId + "],keyFlag[" + keyFlag + "]");
String retString = "";
......@@ -22,28 +22,38 @@ public class DirectPaymentConfWF
int updcnt = 0;
try { conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
conn.setAutoCommit(false);
empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim();
if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0)) {
sql = "update payment_exp set confirmed = 'Y', conf_date = sysdate where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
updcnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("Updated Successfully:" + updcnt);
if (updcnt > 0) {
conn.commit();
retString = "Y";
}
conn.rollback();
retString = "N";
}
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;
conn.setAutoCommit(false);
empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim();
if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0))
{
sql = "update payment_exp set confirmed = 'Y', conf_date = sysdate where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
updcnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("Updated Successfully:" + updcnt);
if (updcnt > 0)
{
conn.commit();
retString = "Y";
}
conn.rollback();
retString = "N";
}
}
catch (Exception e)
......
package ibase.webitm.ejb.fin.adv;
import ibase.system.config.ConnDriver;
import ibase.utility.UserInfoBean;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
......@@ -10,8 +11,7 @@ import java.sql.SQLException;
public class PayAgainstVoucherConfWF
{
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag)
throws RemoteException, ITMException
public String confirm(String tranId, String empCodeAprv, String xmlDataAll, String processId, String keyFlag, String userInfoStr) throws RemoteException, ITMException
{
System.out.println("Parameters ::: tranId[" + tranId + "],empCodeAprv[" + empCodeAprv + "],xmlDataAll[" + xmlDataAll + "],processId[" + processId + "],keyFlag[" + keyFlag + "]");
String retString = "";
......@@ -22,28 +22,38 @@ public class PayAgainstVoucherConfWF
int updcnt = 0;
try { conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
conn.setAutoCommit(false);
empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim();
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;
conn.setAutoCommit(false);
empCodeAprv = empCodeAprv == null ? "" : empCodeAprv.trim();
if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0)) {
sql = "update misc_payment set confirmed = 'Y', conf_date = sysdate where tran_id = ?";
pstmt = conn.prepareStatement(sql);
if ((xmlDataAll != null) && (xmlDataAll.trim().length() != 0))
{
sql = "update misc_payment set confirmed = 'Y', conf_date = sysdate where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
updcnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("Updated Successfully:" + updcnt);
if (updcnt > 0) {
conn.commit();
retString = "Y";
}
pstmt.setString(1, tranId);
updcnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("Updated Successfully:" + updcnt);
if (updcnt > 0)
{
conn.commit();
retString = "Y";
}
conn.rollback();
retString = "N";
}
conn.rollback();
retString = "N";
}
}
catch (Exception e)
......
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