Commit b97480be authored by jshaikh's avatar jshaikh

multi-tendency changes in bill of material workflow

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@179603 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2765b599
package ibase.webitm.ejb.mfg.adv; package ibase.webitm.ejb.mfg.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 BillOfMaterialConfWF public class BillOfMaterialConfWF
{ {
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 BillOfMaterialConfWF ...@@ -22,12 +22,21 @@ public class BillOfMaterialConfWF
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 bom set confirmed = 'Y', conf_date = sysdate where bom_code = ?"; sql = "update bom set confirmed = 'Y', conf_date = sysdate where bom_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -36,7 +45,8 @@ public class BillOfMaterialConfWF ...@@ -36,7 +45,8 @@ public class BillOfMaterialConfWF
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