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