Commit fffab3bb authored by vkadam's avatar vkadam

Resolve point :- [If no batch found for any win_name, system is giving error ].


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102789 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 36515872
......@@ -46,7 +46,8 @@ public class BatchLoadIdSpecificSch implements Schedule
E12GenericUtility genericUtility= new E12GenericUtility();
System.out.println("scheduleParamXML-----"+scheduleParamXML);
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
Document dom=genericUtility.parseString(scheduleParamXML);
//Condition Added By Manoj 25/01/2013 to load batch Win Name wise.
objName=genericUtility.getColumnValue("ACTUALPARAMETER",dom);
......@@ -234,131 +235,141 @@ public class BatchLoadIdSpecificSch implements Schedule
/*Change win_name w_dist_order_mid by Nikhil on dated 15-Jul-16*/
System.out.println("Dist_order map size :- ["+batchIdHashMap.size()+"]");
batchIdList=batchIdHashMap.get("w_dist_order_mid");
System.out.println("Dist_order batch id list size :- ["+batchIdList.size()+"]");
/**
* Get batch_id from
* batch_id list
* */
for (int i = 0; i < batchIdList.size(); i++)
if(batchIdList!=null)
{
batchId=batchIdList.get(i);
System.out.println("Batch id at Distribution order :- ["+batchId+"]");
System.out.println("Dist_order batch id list size :- ["+batchIdList.size()+"]");
/**
* Batch load of
* 'w_dist_order'
* Get batch_id from
* batch_id list
* */
retString = masterApplyLocal.applyMasterTable( batchId, xtraParams, userInfoBean );
System.out.println("Retstring of batch load of Dist order :- ["+retString+"] Batch Id :- ["+batchId+"]");
/**
* Get tran_id ie. distOrdId
* from retString
* of Distribution order
* */
// if (retString.indexOf("Success") > -1)//VTEDISU
if (retString.indexOf("VTEDISU") > -1)//VTEDISU
for (int i = 0; i < batchIdList.size(); i++)
{
// String[] arrayForTranIdIssue = retString.split("<TranID>");
// int endIndexDistOrd = arrayForTranIdIssue[1].indexOf("</TranID>");
// distOrdId = arrayForTranIdIssue[1].substring(0, endIndexDistOrd);
distOrdId = getGeneratedTranId(batchId,conn);
System.out.println("Distribution order id :- ["+distOrdId+"]");
batchId=batchIdList.get(i);
System.out.println("Batch id at Distribution order :- ["+batchId+"]");
/**
* Batch load of
* 'w_dist_order'
* */
retString = masterApplyLocal.applyMasterTable( batchId, xtraParams, userInfoBean );
System.out.println("Retstring of batch load of Dist order :- ["+retString+"] Batch Id :- ["+batchId+"]");
/**
* Call Auto confirm
* component for
* obj name 'dist_order'
* and respective distOrdId
* Get tran_id ie. distOrdId
* from retString
* of Distribution order
* */
retString = confirmTran("dist_order", distOrdId, xtraParams, "", conn);
System.out.println("Retstring after Dist order auto confirm :- ["+retString+"] Dis ordId :- ["+distOrdId+"]");
}
// if (retString.indexOf("Success") > -1)//VTEDISU
if (retString.indexOf("VTEDISU") > -1)//VTEDISU
{
// String[] arrayForTranIdIssue = retString.split("<TranID>");
// int endIndexDistOrd = arrayForTranIdIssue[1].indexOf("</TranID>");
// distOrdId = arrayForTranIdIssue[1].substring(0, endIndexDistOrd);
distOrdId = getGeneratedTranId(batchId,conn);
System.out.println("Distribution order id :- ["+distOrdId+"]");
/**
* Call Auto confirm
* component for
* obj name 'dist_order'
* and respective distOrdId
* */
retString = confirmTran("dist_order", distOrdId, xtraParams, "", conn);
System.out.println("Retstring after Dist order auto confirm :- ["+retString+"] Dis ordId :- ["+distOrdId+"]");
}
}
batchIdList.clear();
}
batchIdList.clear();
/**
* Get batch_id list
* according win_name 'w_adj_rcp'
* */
batchIdList=batchIdHashMap.get("w_adj_rcp");
System.out.println("Adj_rcp batch id list size :- ["+batchIdList.size()+"]");
/**
* Get batch_id from
* batch_id list
* */
for (int i = 0; i < batchIdList.size(); i++)
if(batchIdList!=null)
{
batchId=batchIdList.get(i);
System.out.println("Batch id at Adjustment receipt :- ["+batchId+"]");
/**
* Batch load of
* 'w_adj_rcp'
* */
retString = masterApplyLocal.applyMasterTable( batchId, xtraParams, userInfoBean );
System.out.println("Retstring of batch load of Adj Receipt :- ["+retString+"] Batch Id :- ["+batchId+"]");
System.out.println("Adj_rcp batch id list size :- ["+batchIdList.size()+"]");
/**
* Get tran_id ie. adjRcpId
* from retString
* of Adjustment receipt
* Get batch_id from
* batch_id list
* */
// if (retString.indexOf("Success") > -1)
if (retString.indexOf("VTEDISU") > -1)
for (int i = 0; i < batchIdList.size(); i++)
{
// String[] arrayForTranIdIssue = retString.split("<TranID>");
// int endIndexAdjRcp = arrayForTranIdIssue[1].indexOf("</TranID>");
adjRcpId = getGeneratedTranId(batchId, conn);
System.out.println("Adj Receipt id :- ["+adjRcpId+"]");
batchId=batchIdList.get(i);
System.out.println("Batch id at Adjustment receipt :- ["+batchId+"]");
/**
* Batch load of
* 'w_adj_rcp'
* */
retString = masterApplyLocal.applyMasterTable( batchId, xtraParams, userInfoBean );
System.out.println("Retstring of batch load of Adj Receipt :- ["+retString+"] Batch Id :- ["+batchId+"]");
/**
* Call Auto confirm
* component for
* obj name 'adj_rcp'
* and respective adjRcpId
* Get tran_id ie. adjRcpId
* from retString
* of Adjustment receipt
* */
retString = confirmTran("adj_rcp", adjRcpId, xtraParams, "", conn);
System.out.println("Retstring after Adj Receipt auto confirm :- ["+retString+"] Adj ReceiptId :- ["+adjRcpId+"]");
// if (retString.indexOf("Success") > -1)
if (retString.indexOf("VTEDISU") > -1)
{
// String[] arrayForTranIdIssue = retString.split("<TranID>");
// int endIndexAdjRcp = arrayForTranIdIssue[1].indexOf("</TranID>");
adjRcpId = getGeneratedTranId(batchId, conn);
System.out.println("Adj Receipt id :- ["+adjRcpId+"]");
/**
* Call Auto confirm
* component for
* obj name 'adj_rcp'
* and respective adjRcpId
* */
retString = confirmTran("adj_rcp", adjRcpId, xtraParams, "", conn);
System.out.println("Retstring after Adj Receipt auto confirm :- ["+retString+"] Adj ReceiptId :- ["+adjRcpId+"]");
}
}
batchIdList.clear();
}
batchIdList.clear();
/**
* Get batch_id list
* according win_name 'w_dist_issue'
* */
batchIdList=batchIdHashMap.get("w_dist_issue");
System.out.println("Dist_issue batch id list size :- ["+batchIdList.size()+"]");
/**
* Get batch_id from
* batch_id list
* */
for (int i = 0; i < batchIdList.size(); i++)
if(batchIdList!=null)
{
batchId=batchIdList.get(i);
System.out.println("Batch Id at Distribution issue :- ["+batchId+"]");
System.out.println("Dist_issue batch id list size :- ["+batchIdList.size()+"]");
/**
* Batch load of
* 'w_dist_issue'
* Get batch_id from
* batch_id list
* */
retString = masterApplyLocal.applyMasterTable( batchId, xtraParams, userInfoBean );
System.out.println("Retstring of batch load of Dist Issue :- ["+retString+"] Batch Id :- ["+batchId+"]");
/**
* Get tran_id ie. ditIssId
* from retString
* of Distribution issue
* */
// if (retString.indexOf("Success") > -1)
if (retString.indexOf("VTEDISU") > -1)
for (int i = 0; i < batchIdList.size(); i++)
{
// String[] arrayForTranIdIssue = retString.split("<TranID>");
// int endIndexDistIss = arrayForTranIdIssue[1].indexOf("</TranID>");
ditIssId = getGeneratedTranId(batchId, conn);
System.out.println("Dist Issue id :- ["+ditIssId+"]");
batchId=batchIdList.get(i);
System.out.println("Batch Id at Distribution issue :- ["+batchId+"]");
/**
* Call Auto confirm
* component for
* obj name 'dist_issue'
* and respective ditIssId
* Batch load of
* 'w_dist_issue'
* */
retString = confirmTran("dist_issue", ditIssId, xtraParams, "", conn);
System.out.println("Retstring after Dist Issue auto confirm :- ["+retString+"] Dist IssueId :- ["+ditIssId+"]");
}
retString = masterApplyLocal.applyMasterTable( batchId, xtraParams, userInfoBean );
System.out.println("Retstring of batch load of Dist Issue :- ["+retString+"] Batch Id :- ["+batchId+"]");
/**
* Get tran_id ie. ditIssId
* from retString
* of Distribution issue
* */
// if (retString.indexOf("Success") > -1)
if (retString.indexOf("VTEDISU") > -1)
{
// String[] arrayForTranIdIssue = retString.split("<TranID>");
// int endIndexDistIss = arrayForTranIdIssue[1].indexOf("</TranID>");
ditIssId = getGeneratedTranId(batchId, conn);
System.out.println("Dist Issue id :- ["+ditIssId+"]");
/**
* Call Auto confirm
* component for
* obj name 'dist_issue'
* and respective ditIssId
* */
retString = confirmTran("dist_issue", ditIssId, xtraParams, "", conn);
System.out.println("Retstring after Dist Issue auto confirm :- ["+retString+"] Dist IssueId :- ["+ditIssId+"]");
}
}
batchIdList.clear();
}
batchIdList.clear();
}
}
......
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