Commit c50bd4a1 authored by kmandhre's avatar kmandhre

add Delivery customer ,parent customer,Prom date,customer PO and PO date in getdata


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93299 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d6e92e75
......@@ -288,14 +288,19 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
+"SORDER.SITE_CODE__SHIP,SORDITEM.EXP_LEV , "
+"CASE WHEN SORDDET.HOLD_FLAG IS NULL THEN 'N' ELSE SORDDET.HOLD_FLAG END, "// ADDED BY AKHILESH FOR NEW COLUNM
+" ITEM.GTIN_CASE,ITEM.GTIN_UNIT " //added by Kunal on 22/10/12
+",SORDDET.UNIT,SORDDET.UNIT__STD,SORDDET.CONV__QTY_STDUOM,SORDDET.QUANTITY__STDUOM "
+"FROM SORDDET,SORDER,SORDITEM,CUSTOMER,ITEM "
+",SORDDET.UNIT,SORDDET.UNIT__STD,SORDDET.CONV__QTY_STDUOM,SORDDET.QUANTITY__STDUOM , "
+" SORDER.PROM_DATE,SORDER.CUST_CODE__DLV,CUSTA.CUST_NAME AS CUST_CODE__DLV_NAME,SORDER.STATE_CODE__DLV, CUSTOMER.GROUP_CODE,CUSTB.CUST_NAME AS PCUST_NAME, " //added by kunal on 02/07/13
+" SORDER.CUST_PORD,SORDER.PORD_DATE " //added by kunal on 02/07/13
+"FROM SORDDET,SORDER,SORDITEM,CUSTOMER,ITEM ,customer custa,customer custb "
+"WHERE ( SORDER.SALE_ORDER = SORDDET.SALE_ORDER ) AND "
+"( SORDITEM.SALE_ORDER = SORDER.SALE_ORDER ) AND "
+"( SORDDET.LINE_NO = SORDITEM.LINE_NO ) AND "
+"( SORDITEM.ITEM_CODE = ITEM.ITEM_CODE ) AND "
+"( SORDER.CUST_CODE = CUSTOMER.CUST_CODE ) AND "
+"( SORDDET.SITE_CODE = SORDITEM.SITE_CODE ) AND "
+"( SORDER.CUST_CODE = CUSTOMER.CUST_CODE ) "
+" and ( sorder.cust_code__dlv = custa.cust_code ) "
+" and ( customer.group_code = custb.cust_code ) "
+"AND ( SORDDET.SITE_CODE = SORDITEM.SITE_CODE ) AND "
+" SORDER.SITE_CODE = ? AND "
+" ITEM.ITEM_SER >=? AND "
......@@ -382,29 +387,53 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
{
retTabSepStrBuff.append("<Detail2>");
//CUST_CODE
//retTabSepStrBuff.append(rs.getString(1)).append("\t");
retTabSepStrBuff.append("<cust_code>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</cust_code>");
//CUST_NAME
//retTabSepStrBuff.append(rs.getString(2)).append("\t");
retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</cust_name>");
//Hold Flag
//retTabSepStrBuff.append(rs.getString(14) == null?"N":rs.getString(14)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<hold_flag>").append("<![CDATA[" + (rs.getString(14) == null? " ":rs.getString(14)) +"]]>").append("</hold_flag>");
//LINE_NO
//retTabSepStrBuff.append(rs.getString(3)).append("\t");
retTabSepStrBuff.append("<line_no>").append("<![CDATA[" + rs.getString(3) +"]]>").append("</line_no>");
//SALE_ORDER
//retTabSepStrBuff.append(rs.getString(4)).append("\t");
retTabSepStrBuff.append("<sale_order>").append("<![CDATA[" + rs.getString(4) +"]]>").append("</sale_order>");
//DUE_DATE
//retTabSepStrBuff.append(rs.getTimestamp(5)).append("\t");
retTabSepStrBuff.append("<due_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp(5)) +"]]>").append("</due_date>");
if(rs.getTimestamp(5) != null)
{
retTabSepStrBuff.append("<due_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp(5)) +"]]>").append("</due_date>");
}
else
{
retTabSepStrBuff.append("<due_date>").append("<![CDATA[]]>").append("</due_date>");
}
dueDate = rs.getTimestamp(5);
//PROM_DATE
if(rs.getTimestamp("PROM_DATE") != null)
{
retTabSepStrBuff.append("<prom_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp("PROM_DATE")) +"]]>").append("</prom_date>");
}
else
{
retTabSepStrBuff.append("<prom_date>").append("<![CDATA[]]>").append("</prom_date>");
}
//DLV CUST_CODE
retTabSepStrBuff.append("<cust_code__dlv>").append("<![CDATA[" + checkNull(rs.getString("CUST_CODE__DLV")) +"]]>").append("</cust_code__dlv>");
//DLV CUST_CODE NAME
retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" + checkNull(rs.getString("CUST_CODE__DLV_NAME")) +"]]>").append("</cust_name>");
//DLV CUST_CODE STATE
retTabSepStrBuff.append("<state_code__dlv>").append("<![CDATA[" + checkNull(rs.getString("STATE_CODE__DLV")) +"]]>").append("</state_code__dlv>");
//SALE_ORDER
//retTabSepStrBuff.append(rs.getString(4)).append("\t");
retTabSepStrBuff.append("<sale_order>").append("<![CDATA[" + rs.getString(4) +"]]>").append("</sale_order>");
//LINE_NO
//retTabSepStrBuff.append(rs.getString(3)).append("\t");
retTabSepStrBuff.append("<line_no>").append("<![CDATA[" + rs.getString(3) +"]]>").append("</line_no>");
//ITEM_CODE
//retTabSepStrBuff.append(rs.getString(6)).append("\t");
retTabSepStrBuff.append("<item_code>").append("<![CDATA[" + rs.getString(6) +"]]>").append("</item_code>");
//DESCR
//retTabSepStrBuff.append(rs.getString(7)).append("\t");
retTabSepStrBuff.append("<item_descr>").append("<![CDATA[" + rs.getString(7) +"]]>").append("</item_descr>");
//QUANTITY
//retTabSepStrBuff.append(rs.getDouble(8)).append("\t");
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + rs.getDouble(8) +"]]>").append("</quantity>");
......@@ -414,28 +443,18 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
retTabSepStrBuff.append("<unit__std>").append("<![CDATA[" + rs.getString("UNIT__STD") +"]]>").append("</unit__std>");
//UNIT__STD
retTabSepStrBuff.append("<conv__qty_stduom>").append("<![CDATA[" + rs.getString("CONV__QTY_STDUOM") +"]]>").append("</conv__qty_stduom>");
//UNIT__STD
//Hold Qty
//retTabSepStrBuff.append(holdQty).append("\t");// added by Kunal on 22/10/12
retTabSepStrBuff.append("<hold_qty>").append("<![CDATA[" + holdQty +"]]>").append("</hold_qty>");
//STOCK QTY
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
//QTY__STD
retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>");
//PENDING_QUANTITY
//retTabSepStrBuff.append(rs.getDouble(9)).append("\t");
//retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>");
//Manoj dtd 18/06/2013 Pending Quantity in standard unit
retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + (rs.getDouble(9)) +"]]>").append("</pending_quantity>");
/*if (bappend == true)
{
//retTabSepStrBuff.append(balStockQty).append("\t");
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
}
else
{
//retTabSepStrBuff.append("0").append("\t");
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + 0 +"]]>").append("</stock_quantity>");
}*/
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
//qty allocated
//retTabSepStrBuff.append(rs.getDouble(10)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<qty_allocated>").append("<![CDATA[" + (rs.getDouble(10)) +"]]>").append("</qty_allocated>");
//STOCK_QUANTITY
pendQty = rs.getDouble(9);
......@@ -473,9 +492,38 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
//retTabSepStrBuff.append("0").append("\t");
retTabSepStrBuff.append("<qty_alloc>").append("<![CDATA[" + 0 +"]]>").append("</qty_alloc>");
}
//Hold Qty
//retTabSepStrBuff.append(holdQty).append("\t");// added by Kunal on 22/10/12
retTabSepStrBuff.append("<hold_qty>").append("<![CDATA[" + holdQty +"]]>").append("</hold_qty>");
//qty allocated
//retTabSepStrBuff.append(rs.getDouble(10)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<qty_allocated>").append("<![CDATA[" + (rs.getDouble(10)) +"]]>").append("</qty_allocated>");
//PARENT CUST_CODE
retTabSepStrBuff.append("<group_code>").append("<![CDATA[" + checkNull(rs.getString("GROUP_CODE")) +"]]>").append("</group_code>");
//PARENT CUST_CODE NAME
retTabSepStrBuff.append("<cust_name_1>").append("<![CDATA[" + checkNull(rs.getString("PCUST_NAME")) +"]]>").append("</cust_name_1>");
//PARENT CUST_CODE NAME
retTabSepStrBuff.append("<cust_pord>").append("<![CDATA[" + checkNull(rs.getString("CUST_PORD")) +"]]>").append("</cust_pord>");
//PO DATE
if(rs.getTimestamp("PORD_DATE") != null)
{
retTabSepStrBuff.append("<pord_date>").append("<![CDATA[" + sdf.format(rs.getTimestamp("PORD_DATE")) +"]]>").append("</pord_date>");
}
else
{
retTabSepStrBuff.append("<pord_date>").append("<![CDATA[]]>").append("</pord_date>");
}
//CUST_CODE
//retTabSepStrBuff.append(rs.getString(1)).append("\t");
retTabSepStrBuff.append("<cust_code>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</cust_code>");
//CUST_NAME
//retTabSepStrBuff.append(rs.getString(2)).append("\t");
retTabSepStrBuff.append("<cust_name_2>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</cust_name_2>");
//Hold Flag
//retTabSepStrBuff.append(rs.getString(14) == null?"N":rs.getString(14)).append("\t");// ADDED BY AKHILESH
retTabSepStrBuff.append("<hold_flag>").append("<![CDATA[" + (rs.getString(14) == null? " ":rs.getString(14)) +"]]>").append("</hold_flag>");
//Gtin Case
//retTabSepStrBuff.append(rs.getString(15)== null?" ":rs.getString(15)).append("\t");// added by Kunal on 22/10/12
......@@ -483,9 +531,6 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
//Gtin Unit
//retTabSepStrBuff.append(rs.getString(16) == null?" ":rs.getString(16)).append("\t");// added by Kunal on 25/10/12
retTabSepStrBuff.append("<gtin_unit>").append("<![CDATA[" + (rs.getString(16) == null? " ":rs.getString(16)) +"]]>").append("</gtin_unit>");
//DESCR
//retTabSepStrBuff.append(rs.getString(7)).append("\t");
retTabSepStrBuff.append("<item_descr>").append("<![CDATA[" + rs.getString(7) +"]]>").append("</item_descr>");
// this line has to be commented later
......@@ -494,6 +539,7 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
//PACK_INSTR
//retTabSepStrBuff.append(rs.getString(11) == null? " ":rs.getString(11)).append("\t");
retTabSepStrBuff.append("<pack_instr>").append("<![CDATA[" + (rs.getString(11) == null? " ":rs.getString(11)) +"]]>").append("</pack_instr>");
//SITE_CODE
//retTabSepStrBuff.append(rs.getString(12) == null?" ":rs.getString(12)).append("\t");
retTabSepStrBuff.append("<site_code>").append("<![CDATA[" + (rs.getString(12) == null? " ":rs.getString(12)) +"]]>").append("</site_code>");
......@@ -503,8 +549,20 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
/*if (bappend == true)
{
//retTabSepStrBuff.append(balStockQty).append("\t");
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + balStockQty +"]]>").append("</stock_quantity>");
}
else
{
//retTabSepStrBuff.append("0").append("\t");
retTabSepStrBuff.append("<stock_quantity>").append("<![CDATA[" + 0 +"]]>").append("</stock_quantity>");
}*/
retTabSepStrBuff.append("</Detail2>");
......@@ -813,6 +871,14 @@ public class StockAllocationPrc extends ProcessEJB implements StockAllocationPrc
}
}
private String checkNull( String input )
{
if ( input == null )
{
input = "";
}
return input;
}
private String sorderAllocate(String saleOrder, String lineNo, String itemCode, double allocQty, String expLev ,String holdFlag) throws ITMException
{
......
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