Commit 115e33fd authored by pgole's avatar pgole

Updated EJB FOR CUST STOCK changes for proper sale order generation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104049 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3f54ed1b
...@@ -244,17 +244,24 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -244,17 +244,24 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
prevScheme= "" ,itemStru = "" , sqlNew = "" , mitCode = "",mitFlg = "" ,sqlin = "" ,sqlinner = "" , mslabOn = "",packCode = "",plistDisc = "", prevScheme= "" ,itemStru = "" , sqlNew = "" , mitCode = "",mitFlg = "" ,sqlin = "" ,sqlinner = "" , mslabOn = "",packCode = "",plistDisc = "",
mpriceList= "",listType = "",mstanCode = "",typeTaxclass = "",mstanCodeSite = "",mtaxClass = "",mtaxChap = "",mtaxEnv = "",itemserProm = "" , mpriceList= "",listType = "",mstanCode = "",typeTaxclass = "",mstanCodeSite = "",mtaxClass = "",mtaxChap = "",mtaxEnv = "",itemserProm = "" ,
mgenTrans = "",morderDtDtr = "",msetLine = "" ,oldInvoiceItemSer = "" , InvoiceItemSer= "" ,locType = "" , itemSerDesc = "",lineNoo = "", mgenTrans = "",morderDtDtr = "",msetLine = "" ,oldInvoiceItemSer = "" , InvoiceItemSer= "" ,locType = "" , itemSerDesc = "",lineNoo = "",
remarks = "" ,termId = "" ,crTerm = "" ,cctrcodeSal = "" , xmlString = "",tempSplitCode = "",splitCode = ""; remarks = "" ,termId = "" ,SplitCodeNew = "" ,crTerm = "" ,cctrcodeSal = "" , xmlString = "",tempSplitCode = "",splitCode = "",splitCodeIn="";
String[] acctcodeSal= null; String[] acctcodeSal= null;
HashMap tempMap = null; HashMap tempMap = null;
HashMap custStockSoGen = null; HashMap custStockSoGen = null;
HashMap NewCustStockMap = new HashMap();
HashMap custStockSoGenNew = new HashMap();
HashMap NewCustStockNewMap = new HashMap();
HashMap NewCustStockSoGen = new HashMap(); HashMap NewCustStockSoGen = new HashMap();
ArrayList custStockSoGenList = new ArrayList(); ArrayList custStockSoGenList = new ArrayList();
ArrayList custStockSoGenListNew = new ArrayList();
ArrayList NewCustStockSoGenList = new ArrayList(); ArrayList NewCustStockSoGenList = new ArrayList();
ArrayList NewCustStockMapList = new ArrayList();
//ArrayList NewCustStockSoGenList = new ArrayList();
ArrayList tempList = null; ArrayList tempList = null;
ArrayList temp1List = new ArrayList();
Timestamp morderDt = null ; Timestamp morderDt = null ;
...@@ -655,6 +662,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -655,6 +662,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
rsDet = pstmtDet.executeQuery(); rsDet = pstmtDet.executeQuery();
while(rsDet.next()) while(rsDet.next())
{ {
mitemCd = checkNull(rsDet.getString("item_code")); mitemCd = checkNull(rsDet.getString("item_code"));
mlocType = checkNull(rsDet.getString("loc_type")); mlocType = checkNull(rsDet.getString("loc_type"));
lineNo = rsDet.getString("line_no"); lineNo = rsDet.getString("line_no");
...@@ -667,6 +675,24 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -667,6 +675,24 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
custStockSoGen = new HashMap(); custStockSoGen = new HashMap();
SplitCodeNew = invoiceItemSer + "@" + mlocType.trim();
System.out.println("SplitCodeNew First >>>"+SplitCodeNew);
System.out.println("custStockSoGenList before["+custStockSoGenList+"]\n");
System.out.println("NewCustStockMap before "+NewCustStockMap+"]\n");
if (NewCustStockMap.containsKey(SplitCodeNew))
{
custStockSoGenList = (ArrayList) NewCustStockMap.get(SplitCodeNew);
System.out.println("@@@@@ NewCustStockMap in if....."+tempList);
} else
{
custStockSoGenList = new ArrayList();
System.out.println("@@@@@ NewCustStockMap in else....."+tempList);
}
System.out.println("custStockSoGenList After["+custStockSoGenList+"]\n");
mvarValue = ""; mvarValue = "";
if("P".equalsIgnoreCase(asType)) if("P".equalsIgnoreCase(asType))
{ {
...@@ -943,6 +969,12 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -943,6 +969,12 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("lsOrderType "+lsOrderType); System.out.println("lsOrderType "+lsOrderType);
if(mlocType != null && invoiceItemSer != null)
{
SplitCodeNew = invoiceItemSer.trim() + "@" + mlocType.trim();
}
custStockSoGen.put("order_type", lsOrderType); custStockSoGen.put("order_type", lsOrderType);
custStockSoGen.put("invoice_item_ser", invoiceItemSer); custStockSoGen.put("invoice_item_ser", invoiceItemSer);
custStockSoGen.put("loc_type", mlocType); custStockSoGen.put("loc_type", mlocType);
...@@ -1348,6 +1380,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -1348,6 +1380,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
sql = "select count(item_code) from bomdet where bom_code = ? and item_code = ?"; sql = "select count(item_code) from bomdet where bom_code = ? and item_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mitCode); pstmt.setString(1, mitCode);
pstmt.setString(2, mitemCd);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
...@@ -1579,202 +1612,234 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -1579,202 +1612,234 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
} }
custStockSoGenList.add(custStockSoGen); custStockSoGenList.add(custStockSoGen);
System.out.println("custStockSoGenList.size() inside"+custStockSoGenList.size()); System.out.println("custStockSoGenList.size() inside"+custStockSoGenList.size());
System.out.println("SplitCodeNew >>>"+SplitCodeNew);
System.out.println("Inside templist size");
if (NewCustStockMap.containsKey(SplitCodeNew))
{
NewCustStockMap.put(SplitCodeNew, custStockSoGenList);
} else
{
NewCustStockMap.put(SplitCodeNew, custStockSoGenList);
}
System.out.println("NewCustStockMap nEW["+ NewCustStockMap.size()+"]");
} }
rsDet.close();rsDet = null; rsDet.close();rsDet = null;
pstmtDet.close();pstmtDet = null; pstmtDet.close();pstmtDet = null;
System.out.println("custStockSoGenList outside loop"+custStockSoGenList.size()); System.out.println("custStockSoGenList outside loop"+custStockSoGenList.size());
System.out.println("NewCustStockMap["+NewCustStockMap.toString()+"]");
System.out.println("custStockSoGenListNew["+NewCustStockMap.size()+"]");
System.out.println("custStockSoGenList before remove row"+custStockSoGenList.toString()); System.out.println("custStockSoGenList before remove row"+custStockSoGenList.toString());
//for(int m = 0 ;m < custStockSoGenList.size(); m++ )
for(int m = custStockSoGenList.size()-1 ; m >= 0 ; m-- )
{
System.out.println("Inside for loop ["+custStockSoGenList.size() + "] M ["+ m + "]");
custStockSoGen = new HashMap();
custStockSoGen = (HashMap) custStockSoGenList.get(m);
mclStock = (Double) custStockSoGen.get("cl_stock");
integralQty = (Double) custStockSoGen.get("integral_qty");
System.out.println("Inside mclStock["+mclStock +"]");
System.out.println("Inside integralQty["+integralQty + "]" );
if("P".equalsIgnoreCase(asType))
{
if(mclStock < 0 )
{
custStockSoGenList.remove(m);
}
}
else
{
if(mclStock <= integralQty/2)
{
custStockSoGenList.remove(m);
}
}
System.out.println("custStockSoGenList size after remove row"+custStockSoGenList.size());
System.out.println("custStockSoGenList after remove row"+custStockSoGenList.toString());
}
System.out.println("custStockSoGenList.size() IN 222222"+custStockSoGenList.size());
if(!"P".equalsIgnoreCase(asType)) if(!"P".equalsIgnoreCase(asType))
{ {
System.out.println("Inside ***********"+custStockSoGenList.size()); System.out.println("Inside ***********"+custStockSoGenList.size());
if(custStockSoGenList.size() > 0) if(NewCustStockMap.size() > 0)
{ {
System.out.println("Inside #######"+custStockSoGenList.size()); for(k = 1 ; k< schdtList.size(); k++)
for(k = 1 ; k< schdtList.size() ; k++)
{ {
System.out.println("Inside^^^^^^^^"+custStockSoGenList.size()+"K:"+k); Iterator it = NewCustStockMap.entrySet().iterator();
for(int p = 0 ;p < custStockSoGenList.size() ; p++) while(it.hasNext())
{ {
System.out.println("INSIDE IF FOR FOR P LOOP"); NewCustStockSoGenList = new ArrayList();
custStockSoGen = new HashMap(); Map.Entry pairs = (Map.Entry)it.next();
custStockSoGen = (HashMap) custStockSoGenList.get(p); splitCodeIn = (String) pairs.getKey();
System.out.println("splitCode>>>["+splitCodeIn +"]");
int itemIndex = splitCodeIn.indexOf('@');
NewCustStockSoGen = custStockSoGen; System.out.println("temp1List before["+temp1List+"]\n");
mitemCd = (String) custStockSoGen.get("item_code");
minOrderQty = gfGetMinOrderQty(custCode,msiteCd,mitemCd ,conn);
if(minOrderQty > 0) temp1List = (ArrayList) NewCustStockMap.get(splitCodeIn);
System.out.println("temp1List from key>>>>[" + temp1List.size() + "]"+"["+temp1List+"]");
for(int p = 0 ;p < temp1List.size() ; p++)
{ {
demandQty = (Double) custStockSoGen.get("demand_qty"); NewCustStockSoGen = new HashMap();
clStockOrg = (Double) custStockSoGen.get("cl_stock__org"); System.out.println("INSIDE IF FOR FOR P LOOP");
custStockSoGen = new HashMap();
custStockSoGen = (HashMap) temp1List.get(p);
System.out.println("demandQty:::["+demandQty+"]clStockOrg:::["+clStockOrg+"]"); //NewCustStockSoGen = custStockSoGen;
mitemCd = (String) custStockSoGen.get("item_code");
String mitemSr = (String) custStockSoGen.get("item_ser");
String mLocType = (String) custStockSoGen.get("loc_type");
if(demandQty < minOrderQty) minOrderQty = gfGetMinOrderQty(custCode,msiteCd,mitemCd ,conn);
{
continue;
}
}
integralQty= (Double) custStockSoGen.get("integral_qty");
mclStock= (Double) custStockSoGen.get("cl_stock");
System.out.println("integralQty:::["+integralQty+"] mclStock:::["+mclStock+"]schpercList.get(k)["+schpercList.get(k)+"]");
if( mclStock > integralQty)
{
mclStock = mclStock * schpercList.get(k) / 100 ;
System.out.println("mclStock:::::::["+mclStock+"]"); if(minOrderQty > 0)
if (integralQty > 0)
{ {
sql = "Select mod(?,?) from dual"; demandQty = (Double) custStockSoGen.get("demand_qty");
pstmt = conn.prepareStatement(sql); clStockOrg = (Double) custStockSoGen.get("cl_stock__org");
pstmt.setDouble(1, mclStock);
pstmt.setDouble(2, integralQty); System.out.println("demandQty:::["+demandQty+"]clStockOrg:::["+clStockOrg+"]");
rs = pstmt.executeQuery();
if(rs.next()) if(demandQty < minOrderQty)
{ {
mmodqty = rs.getDouble(1); continue;
} }
rs.close();rs = null; }
pstmt.close();pstmt = null; integralQty= (Double) custStockSoGen.get("integral_qty");
mclStock= (Double) custStockSoGen.get("cl_stock");
System.out.println("mmodqty:::["+mmodqty+"]"); System.out.println("integralQty:::["+integralQty+"] mclStock:::["+mclStock+"]schpercList.get(k)["+schpercList.get(k)+"]");
if( mclStock > integralQty)
{
mclStock = mclStock * schpercList.get(k) / 100 ;
if(mmodqty > 0) System.out.println("mclStock:::::::["+mclStock+"]");
if (integralQty > 0)
{ {
mitFlg = (String) custStockSoGen.get("item_flag"); sql = "Select mod(?,?) from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, mclStock);
pstmt.setDouble(2, integralQty);
rs = pstmt.executeQuery();
if(rs.next())
{
mmodqty = rs.getDouble(1);
}
rs.close();rs = null;
pstmt.close();pstmt = null;
System.out.println("mitFlg:::["+mitFlg+"]"); System.out.println("mmodqty:::["+mmodqty+"]");
if("I".equalsIgnoreCase(mitFlg)) if(mmodqty > 0)
{ {
qtyPerc = gfGetQtyPerc(custCode,msiteCd,mitemCd,conn); mitFlg = (String) custStockSoGen.get("item_flag");
lcQty = integralQty * (qtyPerc/100);
sql = "Select mod(?,?) from dual"; System.out.println("mitFlg:::["+mitFlg+"]");
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, mclStock);
pstmt.setDouble(2, integralQty);
rs = pstmt.executeQuery();
if(rs.next())
{
mmodqty = rs.getDouble(1);
}
rs.close();rs = null;
pstmt.close();pstmt = null;
System.out.println("mmodqty:::["+mmodqty+"]lcQty:::["+lcQty+"]"); if("I".equalsIgnoreCase(mitFlg))
if(mmodqty < lcQty)
{ {
perc = (mclStock/integralQty) ; qtyPerc = gfGetQtyPerc(custCode,msiteCd,mitemCd,conn);
lcQty = integralQty * (qtyPerc/100);
sql = "Select mod(?,?) from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, mclStock);
pstmt.setDouble(2, integralQty);
rs = pstmt.executeQuery();
if(rs.next())
{
mmodqty = rs.getDouble(1);
}
rs.close();rs = null;
pstmt.close();pstmt = null;
System.out.println("mmodqty:::["+mmodqty+"]lcQty:::["+lcQty+"]");
if(mmodqty < lcQty)
{
perc = (mclStock/integralQty) ;
}
else
{
perc = (mclStock/integralQty) + 1;
}
} }
else else
{ {
perc = (mclStock/integralQty) + 1; perc = (mclStock/integralQty) ;
} }
} }
else else
{ {
perc = (mclStock/integralQty) ; perc = (mclStock/integralQty) ;
} }
mclStock = (perc * integralQty) ;
System.out.println("mclStock["+mclStock+"] integralQty["+integralQty+"] perc["+perc+"] perc * integralQty["+perc * integralQty+"]");
} }
else
{
perc = (mclStock/integralQty) ;
}
mclStock = (perc * integralQty) ;
System.out.println("mclStock["+mclStock+"] integralQty["+integralQty+"] perc["+perc+"] perc * integralQty["+perc * integralQty+"]"); lcOrderStock = (Double) custStockSoGen.get("order_stock");
custStockSoGen.put("order_stock", lcOrderStock + mclStock);
System.out.println("lcOrderStock["+lcOrderStock+"] lcOrderStock + mclStock["+lcOrderStock + mclStock+"]");
System.out.println("mclStock["+mclStock+"]");
} }
NewCustStockSoGenList.add(custStockSoGen);
lcOrderStock = (Double) custStockSoGen.get("order_stock"); NewCustStockNewMap.put(splitCodeIn, NewCustStockSoGenList) ;
NewCustStockSoGen.put("order_stock", lcOrderStock + mclStock); }
System.out.println("lcOrderStock["+lcOrderStock+"] lcOrderStock + mclStock["+lcOrderStock + mclStock+"]");
System.out.println("mclStock["+mclStock+"]");
NewCustStockSoGenList.add(NewCustStockSoGen);
}
} }
} }
if(NewCustStockNewMap == null || NewCustStockNewMap.size() == 0)
if(NewCustStockSoGenList == null || NewCustStockSoGenList.size() == 0)
{ {
for(int p = 0 ;p < custStockSoGenList.size() ; p++) System.out.println("IN 2ND LOOP....");
Iterator it = NewCustStockMap.entrySet().iterator();
while(it.hasNext())
{ {
System.out.println("INSIDE IF FOR second P LOOP"); NewCustStockSoGenList = new ArrayList();
custStockSoGen = new HashMap(); Map.Entry pairs = (Map.Entry)it.next();
custStockSoGen = (HashMap) custStockSoGenList.get(p); splitCodeIn = (String) pairs.getKey();
System.out.println("splitCode>>>["+splitCodeIn +"]");
NewCustStockSoGen = custStockSoGen; int itemIndex = splitCodeIn.indexOf('@');
System.out.println("temp1List before 2bd loop["+temp1List+"]\n");
NewCustStockSoGenList.add(NewCustStockSoGen); temp1List = (ArrayList) NewCustStockMap.get(splitCodeIn);
System.out.println("temp1List from key else>>>>[" + temp1List.size() + "]"+"["+temp1List+"]");
System.out.println("NewCustStockSoGenList new list ["+NewCustStockSoGenList.toString()+"]"); for(int p = 0 ;p < temp1List.size() ; p++)
{
NewCustStockSoGen = new HashMap();
System.out.println("INSIDE IF FOR FOR P LOOP");
custStockSoGen = new HashMap();
custStockSoGen = (HashMap) temp1List.get(p);
NewCustStockSoGenList.add(custStockSoGen);
NewCustStockNewMap.put(splitCodeIn, NewCustStockSoGenList) ;
}
} }
} }
}
}
System.out.println("NewCustStockSoGenList ["+NewCustStockSoGenList.size()+"]");
//System.out.println("NewCustStockSoGenList ["+NewCustStockSoGenList.toString()+"]");
}
}
System.out.println("NewCustStockSoGenList ["+NewCustStockSoGenList.size()+"]\n["+NewCustStockSoGenList.toString()+"]");
System.out.println("NewCustStockNewMap ["+NewCustStockNewMap.size()+"]\n["+NewCustStockNewMap.toString()+"]");
System.out.println("NewCustStockSoGenList size ["+NewCustStockSoGenList.size()+"]");
System.out.println("NewCustStockSoGenList ["+NewCustStockNewMap.size()+"]\n["+NewCustStockNewMap.toString()+"]");
if(NewCustStockSoGenList.size() > 0) if(NewCustStockNewMap.size() > 0)
{ {
schpercTmp = (Double) schpercList.get(0) ; schpercTmp = (Double) schpercList.get(0) ;
for(k = 0 ; k < schdtList.size() ; k++) for(k = 0 ; k < schdtList.size() ; k++)
{ {
HashMap splitCodeWiseMap = new HashMap(); HashMap splitCodeWiseMap = new HashMap();
//tempList = new ArrayList();
System.out.println("INSIDE NewCust K LOOP"+ k); System.out.println("INSIDE NewCust K LOOP"+ k);
int q = 0 ; Iterator it = NewCustStockNewMap.entrySet().iterator();
for( q = 0 ;q < NewCustStockSoGenList.size() ; q++)
while(it.hasNext())
{ {
Map.Entry pairs = (Map.Entry)it.next();
splitCodeIn = (String) pairs.getKey();
//temp1List = (ArrayList) pairs.getValue();
//System.out.println("temp1List from value>>>["+temp1List +"]");
System.out.println("splitCode>>>["+splitCodeIn +"]");
int itemIndex = splitCodeIn.indexOf('@');
itemSer = splitCodeIn.substring(0, itemIndex);
String locTypeParent = splitCodeIn.substring(itemIndex + 1, splitCodeIn.length());
System.out.println(">>>>>>>>>locTypeParent===" + locTypeParent);
temp1List = (ArrayList) NewCustStockNewMap.get(splitCodeIn);
System.out.println("temp1List from key in 2nd loop>>>>[" + temp1List.size() + "]"+"["+temp1List+"]");
for(int q = 0 ;q < temp1List.size() ; q++)
{
System.out.println("INSIDE NewCust Q LOOP"+ q); System.out.println("INSIDE NewCust Q LOOP"+ q);
custStockSoGen = new HashMap(); custStockSoGen = new HashMap();
custStockSoGen = (HashMap) NewCustStockSoGenList.get(q); custStockSoGen = (HashMap) temp1List.get(q);
schdtList = tschdtList ; schdtList = tschdtList ;
schpercList = tschpercList ; schpercList = tschpercList ;
...@@ -2155,14 +2220,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2155,14 +2220,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
mclStock = perc * integralQty ; mclStock = perc * integralQty ;
System.out.println("mclStock mmodqty>>["+mclStock +"]perc["+perc+"]integralQty["+integralQty+"]"); System.out.println("mclStock mmodqty>>["+mclStock +"]perc["+perc+"]integralQty["+integralQty+"]");
} }
/*else
{
if(integralQty != 0)
{
perc = (mclStock / integralQty);
}
}*/
//mclStock = perc * integralQty ;
System.out.println("perc11>>>>>"+perc); System.out.println("perc11>>>>>"+perc);
System.out.println("integralQty111>>>>>"+integralQty); System.out.println("integralQty111>>>>>"+integralQty);
System.out.println("mclStock1>>>>>"+mclStock); System.out.println("mclStock1>>>>>"+mclStock);
...@@ -2195,12 +2253,11 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2195,12 +2253,11 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
continue; continue;
} }
System.out.println("mclStock*****>>>>>"+mclStock); System.out.println("mclStock*****>>>>>"+mclStock);
System.out.println("@@@@@ :Inside else....."); System.out.println("@@@@@ :Inside else.....");
System.out.println("@@@@@ :Inside locType.trim().....["+locType.trim()+"]itemserProm["+itemserProm+"]"); System.out.println("@@@@@ :Inside locType.trim().....["+locType.trim()+"]itemserProm["+itemserProm+"]");
tempSplitCode = itemserProm + "@" + locType.trim(); tempSplitCode = itemserProm.trim() + "@" + locType.trim();
//splitCodeWiseMap = new HashMap(); //splitCodeWiseMap = new HashMap();
...@@ -2215,7 +2272,6 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2215,7 +2272,6 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
} else } else
{ {
tempList = new ArrayList(); tempList = new ArrayList();
//tempList.add(custStockSoGen);
System.out.println("@@@@@ tempList in else....."+tempList); System.out.println("@@@@@ tempList in else....."+tempList);
} }
...@@ -2224,10 +2280,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2224,10 +2280,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("LINE NO PLAN["+lineNo+"][LINE NO SET["+msetLine +"]"); System.out.println("LINE NO PLAN["+lineNo+"][LINE NO SET["+msetLine +"]");
//lineNo = getLineNewNo(lineNo); System.out.println("lineNo["+lineNo+"]");
System.out.println("lineNo["+lineNo+"]");
tempMap.put("item_code", mitemCd); tempMap.put("item_code", mitemCd);
tempMap.put("item_ser", itemserProm); tempMap.put("item_ser", itemserProm);
tempMap.put("loc_type", locType); tempMap.put("loc_type", locType);
...@@ -2257,7 +2310,6 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2257,7 +2310,6 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
tempMap.put("tax_chap", mtaxChap); tempMap.put("tax_chap", mtaxChap);
tempMap.put("tax_class", mtaxClass); tempMap.put("tax_class", mtaxClass);
tempMap.put("tax_env", mtaxEnv); tempMap.put("tax_env", mtaxEnv);
//tempMap.put("tax_amt", mtaxAmt);
tempMap.put("net_amt", mnetAmt); tempMap.put("net_amt", mnetAmt);
tempMap.put("ord_amt", mordAmt); tempMap.put("ord_amt", mordAmt);
tempMap.put("dsp_date", schdtList.get(k)); tempMap.put("dsp_date", schdtList.get(k));
...@@ -2270,15 +2322,12 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2270,15 +2322,12 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("Print tempMap{"+ tempMap +"}schdtList.get(k)["+schdtList.get(k)+"]"); System.out.println("Print tempMap{"+ tempMap +"}schdtList.get(k)["+schdtList.get(k)+"]");
System.out.println("sales parson = " + tempMap.size() ); System.out.println("sales parson = " + tempMap.size() );
tempList.add(tempMap); tempList.add(tempMap);
System.out.println("Print Templist["+ tempList + "]"); System.out.println("Print Templist["+ tempList + "]");
System.out.println(" Templist["+ tempList.size() + "]"); System.out.println(" Templist["+ tempList.size() + "]");
System.out.println(" splitCodeWiseMap ["+ splitCodeWiseMap + "]"); System.out.println(" splitCodeWiseMap ["+ splitCodeWiseMap + "]");
//for(int r = 0 ; r < tempList.size();r++ )
//{
System.out.println("Inside templist size"); System.out.println("Inside templist size");
if (splitCodeWiseMap.containsKey(tempSplitCode)) if (splitCodeWiseMap.containsKey(tempSplitCode))
{ {
...@@ -2287,32 +2336,26 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2287,32 +2336,26 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
{ {
splitCodeWiseMap.put(tempSplitCode, tempList); splitCodeWiseMap.put(tempSplitCode, tempList);
} }
//}
System.out.println("Print splitCodeWiseMap"+ splitCodeWiseMap); System.out.println("Print splitCodeWiseMap"+ splitCodeWiseMap);
System.out.println("Print splitCodeWiseMap>>["+ splitCodeWiseMap.size()+"]"); System.out.println("Print splitCodeWiseMap>>["+ splitCodeWiseMap.size()+"]");
//} //}
} }
System.out.println("INSIDE splitCodeWiseMap...."+splitCodeWiseMap.toString()); }
System.out.println("Outside splitCodeWiseMap...."+splitCodeWiseMap.size()); System.out.println("INSIDE splitCodeWiseMap...."+splitCodeWiseMap.toString());
Set setItem = splitCodeWiseMap.entrySet(); System.out.println("Outside splitCodeWiseMap...."+splitCodeWiseMap.size());
System.out.println("setItemsetItem>>"+setItem.size()); Set setItem = splitCodeWiseMap.entrySet();
System.out.println("setItemsetItem >>"+setItem); System.out.println("setItemsetItem>>"+setItem.size());
tempList = null; System.out.println("setItemsetItem >>"+setItem);
Iterator itrItem = setItem.iterator(); tempList = null;
int cnt2 = 0 ; Iterator itrItem = setItem.iterator();
System.out.println("tempList before while >>>["+tempList +"] "+itrItem.toString()); int cnt2 = 0 ;
System.out.println("tempList before while >>>["+tempList +"] "+itrItem.toString());
int w = 0 ; int w = 0 ;
String ordType = ""; String ordType = "";
while (itrItem.hasNext()) while (itrItem.hasNext())
{ {
if(tempList != null && tempList.size() > 0)
{
System.out.println("tempList111>>>>[" + tempList.size() + "]"+"["+tempList+"]");
}
System.out.println("COUNT OF WHILE FOR " + w ); System.out.println("COUNT OF WHILE FOR " + w );
mtotOrdAmt = 0 ; mtotOrdAmt = 0 ;
...@@ -2328,11 +2371,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2328,11 +2371,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
int itemIndex = splitCode.indexOf('@'); int itemIndex = splitCode.indexOf('@');
itemSer = splitCode.substring(0, itemIndex); itemSer = splitCode.substring(0, itemIndex);
//int custIndex = splitCode.indexOf('@');
//String custCd = splitCode.substring(itemIndex + 1, custIndex);
// modify by cpatil on 14-06-12 for splitting start
//int crIndex = splitCode.indexOf('.');
//crTerm = splitCode.substring(custIndex + 1, crIndex);
String locTypeParent = splitCode.substring(itemIndex + 1, splitCode.length()); String locTypeParent = splitCode.substring(itemIndex + 1, splitCode.length());
System.out.println(">>>>>>>>>locTypeParent===" + locTypeParent); System.out.println(">>>>>>>>>locTypeParent===" + locTypeParent);
...@@ -2347,9 +2386,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo ...@@ -2347,9 +2386,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("@@@@@@@ [ splitCode[" + splitCode + "]"); System.out.println("@@@@@@@ [ splitCode[" + splitCode + "]");
System.out.println("itemSer[" + itemSer + "]"); System.out.println("itemSer[" + itemSer + "]");
//System.out.println("custCd[" + custCd + "]");
System.out.println("crTerm[" + crTerm + "]"+mcrterm); System.out.println("crTerm[" + crTerm + "]"+mcrterm);
// System.out.println("locTypeParent[" + locTypeParent + "] ] @@@@@@@@");
tempList = (ArrayList) splitCodeWiseMap.get(splitCode); tempList = (ArrayList) splitCodeWiseMap.get(splitCode);
......
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