Commit c1cb7ac8 authored by pgole's avatar pgole

Updated EJB FOR CUST STOCK issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103974 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 630ed2ef
......@@ -256,6 +256,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
ArrayList tempList = null;
Timestamp morderDt = null ;
PreparedStatement pstmt = null,pstmt1 =null ,pstmt2 =null ,pstmtDet = null;
ResultSet rs = null,rs1 =null ,rs2 = null ,rsDet = null;
......@@ -940,6 +941,8 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
lsOrderType = tempOrderType ;
}
System.out.println("lsOrderType "+lsOrderType);
custStockSoGen.put("order_type", lsOrderType);
custStockSoGen.put("invoice_item_ser", invoiceItemSer);
custStockSoGen.put("loc_type", mlocType);
......@@ -953,7 +956,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
custStockSoGen.put("cust_item__ref", custItemRef);
custStockSoGen.put("order_stock", orderStock);
System.out.println("Inside for for loop ["+custStockSoGenList.size() + "] ");
System.out.println("Inside for for loop ["+custStockSoGenList.size() + "]lsOrderType "+lsOrderType);
sql = "Select descr from item where item_code = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -1753,15 +1756,17 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
}
System.out.println("NewCustStockSoGenList ["+NewCustStockSoGenList.size()+"]");
//System.out.println("NewCustStockSoGenList ["+NewCustStockSoGenList.toString()+"]");
if(NewCustStockSoGenList.size() > 0)
{
schpercTmp = (Double) schpercList.get(0) ;
for(k = 0 ; k < schdtList.size() ; k++)
{
HashMap splitCodeWiseMap = new HashMap();
//tempList = new ArrayList();
System.out.println("INSIDE NewCust K LOOP"+ k);
int q = 0 ;
......@@ -1773,6 +1778,11 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
schdtList = tschdtList ;
schpercList = tschpercList ;
if(custStockSoGen.size() > 0)
{
System.out.println("custStockSoGen ... ["+custStockSoGen.toString()+"]");
}
if(!"P".equalsIgnoreCase(asType))
{
mitemCd = (String) custStockSoGen.get("item_code");
......@@ -1872,7 +1882,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
orderType = (String) custStockSoGen.get("order_type");
System.out.println("Before DETAIL2 LOG["+ NewCustStockSoGenList.size()+"]");
System.out.println("Before DETAIL2 LOG["+ NewCustStockSoGenList.size()+"]orderType"+orderType);
/*for(int j = q ;j< NewCustStockSoGenList.size(); j++)
{
......@@ -2192,9 +2202,11 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("@@@@@ :Inside locType.trim().....["+locType.trim()+"]itemserProm["+itemserProm+"]");
tempSplitCode = itemserProm + "@" + locType.trim();
splitCodeWiseMap = new HashMap();
//splitCodeWiseMap = new HashMap();
System.out.println("splitCodeWiseMap"+splitCodeWiseMap.toString());
System.out.println("tempSplitCode......"+tempSplitCode);
System.out.println("splitCodeWiseMap"+splitCodeWiseMap.size());
System.out.println("tempList before["+tempList+"][tempList["+tempList +"]\n");
if (splitCodeWiseMap.containsKey(tempSplitCode))
{
tempList = (ArrayList) splitCodeWiseMap.get(tempSplitCode);
......@@ -2203,9 +2215,11 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
} else
{
tempList = new ArrayList();
//tempList.add(custStockSoGen);
System.out.println("@@@@@ tempList in else....."+tempList);
}
System.out.println("tempList after["+tempList+"][tempList["+tempList +"]");
tempMap = new HashMap();
System.out.println("LINE NO PLAN["+lineNo+"][LINE NO SET["+msetLine +"]");
......@@ -2257,12 +2271,15 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("sales parson = " + tempMap.size() );
tempList.add(tempMap);
System.out.println("Print Templist["+ tempList + "]");
System.out.println(" Templist["+ tempList.size() + "]");
System.out.println(" splitCodeWiseMap ["+ splitCodeWiseMap + "]");
//for(int r = 0 ; r < tempList.size();r++ )
//{
System.out.println("Inside templist size");
if (splitCodeWiseMap.containsKey(tempSplitCode))
{
splitCodeWiseMap.put(tempSplitCode, tempList);
......@@ -2270,6 +2287,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
{
splitCodeWiseMap.put(tempSplitCode, tempList);
}
//}
System.out.println("Print splitCodeWiseMap"+ splitCodeWiseMap);
System.out.println("Print splitCodeWiseMap>>["+ splitCodeWiseMap.size()+"]");
......@@ -2287,6 +2305,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("tempList before while >>>["+tempList +"] "+itrItem.toString());
int w = 0 ;
String ordType = "";
while (itrItem.hasNext())
{
if(tempList != null && tempList.size() > 0)
......@@ -2314,8 +2333,8 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
// modify by cpatil on 14-06-12 for splitting start
//int crIndex = splitCode.indexOf('.');
//crTerm = splitCode.substring(custIndex + 1, crIndex);
//String locTypeParent = splitCode.substring(crIndex + 1, splitCode.length());
//System.out.println(">>>>>>>>>locTypeParent===" + locTypeParent);
String locTypeParent = splitCode.substring(itemIndex + 1, splitCode.length());
System.out.println(">>>>>>>>>locTypeParent===" + locTypeParent);
System.out.println("INSIDE WHILE....");
System.out.println("SDF DATE"+sdf.format(morderDt));
......@@ -2336,6 +2355,25 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
System.out.println("tempList111>>>>[" + tempList.size() + "]"+"["+tempList+"]");
sql = " select order_type from sordertype where loc_type__parent=?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, locTypeParent);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
ordType = checkNull(rs1.getString("order_type"));
}
pstmt1.close();
pstmt1 = null;
rs1.close();
rs1 = null;
if (ordType == null || ordType.trim().length() == 0)
{
ordType = orderType;
}
System.out.println("ordType>>>>"+ordType);
xmlBuff = null;
xmlBuff = new StringBuffer();
......@@ -2361,7 +2399,7 @@ public class CustStockOrder extends ActionHandlerEJB implements CustStockOrderLo
xmlBuff.append("<Detail1 dbID=\"\" domID=\"1\" objName=\"sorder\" objContext=\"1\">");
xmlBuff.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
xmlBuff.append("<order_type><![CDATA["+ checkNull(orderType )+"]]></order_type>");
xmlBuff.append("<order_type><![CDATA["+ checkNull(ordType)+"]]></order_type>");
//xmlBuff.append("<sale_order><![CDATA["+ checkNull(msetTranId )+"]]></sale_order>");
xmlBuff.append("<sale_order/>");
xmlBuff.append("<order_date><![CDATA["+ morderDtApp +"]]></order_date>");
......
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