Commit c63b07b8 authored by caluka's avatar caluka

deleted from mps_order when any exception occured in export data


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101330 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ef19ca8c
......@@ -29,7 +29,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
E12GenericUtility genericUtility= new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
SimpleDateFormat simpleDateFormat = null;
String tranIdStr = "'";
public String wfValData() throws RemoteException, ITMException
{
System.out.println("wfValData()...");
......@@ -719,13 +719,29 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
System.out.println("parentNode["+parentNode+"]");
winName = this.getWinName(parentNode);
System.out.println("winName["+winName+"]");
tranIdStr = "'";
if (tranIdList != null && tranIdList.size() > 0)
{
for (int i = 0; i < tranIdList.size(); i++)
{
tranIdStr = tranIdStr + tranIdList.get(i) + "','";
}
}
if (tranIdStr.length() >= 2)
{
tranIdStr = tranIdStr.substring(0, tranIdStr.length() - 2);
} else
{
tranIdStr = "";
}
mrpGetData = runMRPObj.getData(argDom, dom2, winName, xtraParams);
/* End Added by sachin */
System.out.println("mrpGetData =[" + mrpGetData + "]");
String tranIdStr = "'";
//String tranIdStr = "'";
/*
if (tranIdList != null && tranIdList.size() > 0)
{
for (int i = 0; i < tranIdList.size(); i++)
......@@ -739,7 +755,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
} else
{
tranIdStr = "";
}
}*/
if (tranIdStr != null && tranIdStr.trim().length() > 0)
{
......@@ -773,6 +789,7 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
{
try
{
if (conn != null)
{
if (!isError)
......@@ -781,6 +798,19 @@ public class RequirementIC extends ValidatorEJB implements RequirementICLocal, R
} else
{
conn.rollback();
if (tranIdStr != null && tranIdStr.trim().length() > 0)
{
deleteSql = "DELETE FROM MPS_ORDER WHERE TRAN_ID IN(" + tranIdStr + ")";
pstmt = conn.prepareStatement(deleteSql);
delCnt = pstmt.executeUpdate();
if (delCnt > 0)
{
System.out.println("Record deleted from mps_order successfully for tran id in error block =[" + tranIdStr + "]");
conn.commit();
}
pstmt.close();
pstmt = null;
}
}
if (rs != null)
{
......
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