Commit 1fc5ff0c authored by cpatil's avatar cpatil

modify for multi auto


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101157 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 98d07b1d
......@@ -669,6 +669,9 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
String autoReconFilterValue="",refNo="",refDate="",amtAdj="",amtBc="";
double totalBSAmount=0,totalBTAmount=0;
HashMap<String,ArrayList<String>> RefBSHashMapAuto = new HashMap<String,ArrayList<String>>();
HashMap<String,ArrayList<String>> RefBTHashMapAuto = new HashMap<String,ArrayList<String>>();
TransIDGenerator generator = null;
if(conn!=null)
......@@ -802,9 +805,19 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
rType ="A";
System.out.println("xmlString(Automatically)!!!!!!! :"+stringBuffer.toString());
System.out.println("siteCode :"+siteCode);
System.out.println("bankCode :"+bankCode);
System.out.println("siteCode:["+siteCode+"]......bankCode:["+bankCode+"]");
if(!"REFNO_DATE_AMT".equalsIgnoreCase(autoReconFilter) )
{
valueXmlString = valueXmlString.append("<?xml version='1.0'?><Root>");
valueXmlString = valueXmlString.append("<message>RFNDTAMT</message>");
valueXmlString = valueXmlString.append("</Root>");
System.out.println("valueXmlString :"+valueXmlString);
return valueXmlString;
}
sql = "select bs.TRAN_ID tran_id,bs.REF_NO ref_no," +
" to_char(bs.REF_DATE,'DD-MON-YY') ref_date," +
" bs.REF_MODE ref_mode,bs.AMOUNT amount,bs.TRAN_TYPE tran_type," +
......@@ -844,7 +857,7 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
System.out.println(":"+refNoBS.length());
tempAmt = amtBS - amtAdjBS;
System.out.println("tranTypeBS :"+tranTypeBS);
System.out.println("tranTypeBS :["+tranTypeBS+"]tempAmt["+tempAmt+"]");
/*---------combination for ref_no and amount -------------------------*/
......@@ -891,22 +904,33 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
if("REFNO_DATE_AMT".equalsIgnoreCase(autoReconFilter))
{
if(RefBSHashMap.containsKey(refNoBS+":"+refDateBS))
if(RefBSHashMapAuto.containsKey(refNoBS+":"+refDateBS+":"+tempAmt+":"+tranTypeBS))
{
RefBSHashMap.put(refNoBS+":"+refDateBS,RefBSHashMap.get(refNoBS+":"+refDateBS) + tempAmt);
System.out.println("value will be :"+RefBSHashMap.get(refNoBS+":"+refDateBS));
ArrayList<String> tempArrayList = new ArrayList<String>();
tempArrayList = RefBSHashMapAuto.get(refNoBS+":"+refDateBS+":"+tempAmt+":"+tranTypeBS);
tempArrayList.add(tranIdBS);
RefBSHashMapAuto.put(refNoBS+":"+refDateBS+":"+tempAmt+":"+tranTypeBS, tempArrayList );
System.out.println("@@@@@@@@@@@1 modify--> RefBSHashMapAuto["+RefBSHashMapAuto+"]");
}
else
{
{/*
RefBSHashMap.put(refNoBS+":"+refDateBS, tempAmt);
//System.out.println("refSer !!!!!!!!!!!!!"+refSer);
//System.out.println(siteCode+":"+refNoBS+":"+tranTypeBS);
tranIdBSMap.put(""+":"+refNoBS+":"+refDateBS, refSer);
tranIdBSMap.put(""+"@"+refNoBS+":"+refDateBS, tranIdBS);
System.out.println("get value!!!!!!!!!!!!"+tranIdBSMap.get(""+":"+refDateBS));
*/
ArrayList<String> tempArrayList = new ArrayList<String>();
//tempArrayList = RefBSHashMapAuto.get(refNoBS+":"+refDateBS+":"+tempAmt);
tempArrayList.add(tranIdBS);
RefBSHashMapAuto.put(refNoBS+":"+refDateBS+":"+tempAmt+":"+tranTypeBS, tempArrayList );
System.out.println("@@@@@@@@@@@2 added--> RefBSHashMapAuto["+RefBSHashMapAuto+"]");
}
}
}
/*----------------------------------------------------------*/
/*
......@@ -1066,26 +1090,35 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
if("REFNO_DATE_AMT".equalsIgnoreCase(autoReconFilter))
{
if(RefBTHashMap.containsKey(refNoBT+":"+refDateBT))
if(RefBTHashMapAuto.containsKey(refNoBT+":"+refDateBT+":"+tempAmt+":"+tranTypeBT))
{
RefBTHashMap.put(refNoBT+":"+refDateBT,RefBTHashMap.get(refNoBT+":"+refDateBT) + tempAmt);
System.out.println("value will be :"+RefBTHashMap.get(refNoBT+":"+refDateBT));
ArrayList<String> tempArrayList = new ArrayList<String>();
tempArrayList = RefBTHashMapAuto.get(refNoBT+":"+refDateBT+":"+tempAmt+":"+tranTypeBT);
tempArrayList.add(tranIdBT);
RefBTHashMapAuto.put(refNoBT+":"+refDateBT+":"+tempAmt+":"+tranTypeBT, tempArrayList);
System.out.println("@@@@@@@@@@4 modify RefBTHashMapAuto["+RefBTHashMapAuto+"]");
}
else
{
RefBTHashMap.put(refNoBT+":"+refDateBT, tempAmt);
/*RefBTHashMap.put(refNoBT+":"+refDateBT, tempAmt);
//System.out.println("refSer !!!!!!!!!!!!!"+refSer);
//System.out.println(siteCode+":"+refNoBS+":"+tranTypeBS);
tranIdBSMap.put(""+":"+refNoBT+":"+refDateBT, refSer);
tranIdBSMap.put(""+"@"+refNoBT+":"+refDateBT, tranIdBT);
System.out.println("get value!!!!!!!!!!!!"+tranIdBSMap.get(""+":"+refDateBT));
System.out.println("get value!!!!!!!!!!!!"+tranIdBSMap.get(""+":"+refDateBT));*/
ArrayList<String> tempArrayList = new ArrayList<String>();
//tempArrayList = RefBTHashMapAuto.get(refNoBT+":"+refDateBT+":"+tempAmt);
tempArrayList.add(tranIdBT);
RefBTHashMapAuto.put(refNoBT+":"+refDateBT+":"+tempAmt+":"+tranTypeBT, tempArrayList);
System.out.println("@@@@@@@@@@5 added RefBTHashMapAuto["+RefBTHashMapAuto+"]");
}
}
/*----------------------------------------------------------*/
/*
if(RefBTHashMap.containsKey(refNoBT+":"+tranTypeBT))
{
......@@ -1135,28 +1168,59 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
pstmt.close();
pstmt=null;
System.out.println("@@@@@@@@@@@1 final--> RefBSHashMapAuto["+RefBSHashMapAuto+"]");
System.out.println("@@@@@@@@@@@2 final--> RefBTHashMapAuto["+RefBTHashMapAuto+"]");
//System.out.println("@@@@@@@ RefBTHashMap["+RefBTHashMap+"]");
//System.out.println("@@@@@@@ tranIdBSMap["+tranIdBSMap+"]");
System.out.println("RefBSHashMap @@@@..... :"+RefBSHashMap);
System.out.println("RefBTHashMap.@@@@.... :"+RefBTHashMap);
Iterator<Map.Entry<String,Double>> entries = RefBSHashMap.entrySet().iterator();
//System.out.println("RefBSHashMap @@@@..... :"+RefBSHashMap);
//System.out.println("RefBTHashMap.@@@@.... :"+RefBTHashMap);
Iterator<Map.Entry<String,ArrayList<String>>> entries = RefBSHashMapAuto.entrySet().iterator();
while (entries.hasNext())
{
Map.Entry<String,Double> entry = entries.next();
Map.Entry<String,ArrayList<String>> entry = entries.next();
System.out.println("key are :"+entry.getKey());
if(RefBTHashMap.containsKey(entry.getKey()))
if(RefBSHashMapAuto.containsKey(entry.getKey()))
{
System.out.println("!!!!!!!!!!!!!!"+entry.getKey());
double lAmt = RefBSHashMap.get(entry.getKey());
System.out.println("lAmt :::"+lAmt);
double rAmt = RefBTHashMap.get(entry.getKey());
System.out.println("rAmt :::"+rAmt);
System.out.println("@@@@@@@@@@@ RefBSHashMapAuto["+entry.getKey()+"]");
ArrayList<String> tempBSArrayList = new ArrayList<String>();
tempBSArrayList = RefBSHashMapAuto.get(entry.getKey());
System.out.println("RefBTHashMapAuto tempBSArrayList:::["+tempBSArrayList+"]tempBSArrayList.size()["+tempBSArrayList.size()+"]");
for(int BSctr=0 ; BSctr < tempBSArrayList.size() ; BSctr++ )
{
//Boolean breakFlag = false;
if(RefBTHashMapAuto.containsKey(entry.getKey()) )
{
ArrayList<String> tempBTArrayList = new ArrayList<String>();
tempBTArrayList = RefBTHashMapAuto.get(entry.getKey());
if( tempBTArrayList.size() > 0 )
{
tranIdBSList.add(tempBSArrayList.get(BSctr));
tranIdBTList.add(tempBTArrayList.get(0));
System.out.println("@@@@@@@@@@@@@ match found==>[tempBSArrayList"+tempBSArrayList.get(0)+"]tempBTArrayList["+tempBTArrayList.get(0)+"]");
tempBTArrayList.remove(0);
RefBTHashMapAuto.put(entry.getKey(),tempBTArrayList);
// breakFlag = true;;
}
}
}
}
}
// double rAmt = RefBTHashMap.get(entry.getKey());
// System.out.println("rAmt :::"+rAmt);
/*String currCdBS = currBSMap.get(entry.getKey());
System.out.println("currCdBS :::"+currCdBS);
String currCdBT = currBTMap.get(entry.getKey());
System.out.println("currCdBT :::"+currCdBT);*/
bankStmtMap.put("" +":"+entry.getKey(), lAmt);
/* bankStmtMap.put("" +":"+entry.getKey(), lAmt);
System.out.println("bankStmtMap is :"+bankStmtMap);
bankTntMap.put("" +":"+entry.getKey(), rAmt);
System.out.println("reseiverSiteMap is :"+bankTntMap);
......@@ -1231,8 +1295,12 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
traceData.add(lAmt);
arrayListData.add(traceData);
}
//cpatil for multiple BS and BT
if(tranIdBSList.size() > 1 && tranIdBTList.size() > 1)
*/
System.out.println("@@@@@@@@@@ final list tranIdBSList.size["+tranIdBSList.size()+"]tranIdBSList["+tranIdBSList+"]");
System.out.println("@@@@@@@@@@ final list tranIdBTList.size["+tranIdBTList.size()+"]tranIdBTList["+tranIdBTList+"]");
//cpatil for multiple BS and BT
if(tranIdBSList.size() >= 1 && tranIdBTList.size() >= 1 )
{
for(int i = 0 ; i < tranIdBSList.size() ; i++)
{
......@@ -1243,6 +1311,7 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
System.out.println(tranIdBTList.get(i));
// System.out.println(amtList.get(i));
double amtTemp = getReconcileAmount("banktran_log",tranIdBTList.get(i),conn);
System.out.println("@@@@@@@@@@ etst amount amtTemp["+amtTemp+"]");
traceData.add(tranIdBTList.get(i));
traceData.add(tranIdBSList.get(i));
traceData.add(amtTemp);
......@@ -1252,9 +1321,9 @@ public class BankRecoWizIC extends ValidatorEJB implements BankRecoWizICLocal, B
}
////////////////////////////////////////////////////////////////////
}
}
}
//}
//}
//}
}
else if("Manually".equalsIgnoreCase(reconcileType))
......
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