Commit a2dcddfe authored by msharma's avatar msharma

Show Quantity in Sandard unit


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93234 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e5d814cc
......@@ -149,6 +149,12 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocatio
Statement st = null;
StringBuffer retTabSepStrBuff = new StringBuffer();
ConnDriver connDriver = new ConnDriver(); //added by rajendra on 02/11/07
retTabSepStrBuff = new StringBuffer("<?xml version = \"1.0\"?>");
retTabSepStrBuff.append("<DocumentRoot>");
retTabSepStrBuff.append("<description>").append("Datawindow Root").append("</description>");
retTabSepStrBuff.append("<group0>");
retTabSepStrBuff.append("<description>").append("Group0 description").append("</description>");
retTabSepStrBuff.append("<Header0>");
try
{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
......@@ -307,6 +313,7 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocatio
+" ITEM.GTIN_CASE,SORDITEM.ITEM_CODE,SORDER.SITE_CODE__SHIP ,ITEM.GTIN_UNIT " //added by Kunal on 22/10/12
//Changed by sumit on 26/11/12 retrieve wave flag
+", CASE WHEN SORDALLOC.WAVE_FLAG IS NULL THEN 'N' ELSE SORDALLOC.WAVE_FLAG END AS WAVE_FLAG "
+",SORDDET.UNIT,SORDDET.UNIT__STD,SORDDET.CONV__QTY_STDUOM,SORDDET.QUANTITY__STDUOM "
+" FROM SORDDET,SORDALLOC,SORDITEM,CUSTOMER,ITEM, SORDER "
+" WHERE SORDER.SALE_ORDER = SORDDET.SALE_ORDER AND "
+"(SORDALLOC.SALE_ORDER = SORDDET.SALE_ORDER ) AND "
......@@ -384,49 +391,91 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocatio
}
rs1.close();
retTabSepStrBuff.append("<Detail2>");
System.out.println("1111111WW111144");
//SALE_ORDER
retTabSepStrBuff.append(rs.getString(1)).append("\t");
retTabSepStrBuff.append("<sale_order>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</sale_order>");
//LINE_NO
retTabSepStrBuff.append(rs.getString(2)).append("\t");
//Changed by sumit on 27/11/12 adding wave_flag
//WAVE_FLAG
retTabSepStrBuff.append(rs.getString("WAVE_FLAG")).append("\t");
retTabSepStrBuff.append("<line_no>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</line_no>");
//wave_flag
retTabSepStrBuff.append("<wave_flag>").append("<![CDATA[" + rs.getString("WAVE_FLAG") +"]]>").append("</wave_flag>");
//EXP_LEV
retTabSepStrBuff.append(rs.getString(3)).append("\t");
retTabSepStrBuff.append("<exp_lev>").append("<![CDATA[" + rs.getString(3) +"]]>").append("</exp_lev>");
//CUST_CODE
retTabSepStrBuff.append(" ").append("\t");
retTabSepStrBuff.append("<cust_code>").append("<![CDATA[ ]]>").append("</cust_code>");
//ITEM_CODE
retTabSepStrBuff.append(rs.getString(4)).append("\t");
retTabSepStrBuff.append("<item_code>").append("<![CDATA[" + rs.getString(4) +"]]>").append("</item_code>");
//ITEM_DESCR
retTabSepStrBuff.append(rs.getString(5)).append("\t");
retTabSepStrBuff.append("<item_descr>").append("<![CDATA[" + rs.getString(5) +"]]>").append("</item_descr>");
//QUANTITY
retTabSepStrBuff.append(rs.getDouble(6)).append("\t");
//PENDING_QTY
retTabSepStrBuff.append(rs.getDouble(7)).append("\t");
//LOT_NO
retTabSepStrBuff.append(rs.getString(8)).append("\t");
retTabSepStrBuff.append("<quantity>").append("<![CDATA[" + rs.getString(6) +"]]>").append("</quantity>");
//
//retTabSepStrBuff.append("<pending_quantity>").append("<![CDATA[" + rs.getDouble(9) +"]]>").append("</pending_quantity>");
//unit
retTabSepStrBuff.append("<unit>").append("<![CDATA[" + rs.getString("UNIT") +"]]>").append("</unit>");
//unit__std
retTabSepStrBuff.append("<unit__std>").append("<![CDATA[" + rs.getString("UNIT__STD") +"]]>").append("</unit__std>");
//conv__qty_stduom
retTabSepStrBuff.append("<conv__qty_stduom>").append("<![CDATA[" + rs.getString("CONV__QTY_STDUOM") +"]]>").append("</conv__qty_stduom>");
//quantity__stduom
retTabSepStrBuff.append("<quantity__stduom>").append("<![CDATA[" + rs.getString("QUANTITY__STDUOM") +"]]>").append("</quantity__stduom>");
//dealloc_qty
retTabSepStrBuff.append("<dealloc_qty>").append("<![CDATA[" + rs.getDouble(7) +"]]>").append("</dealloc_qty>");
//HOLD_QTY
retTabSepStrBuff.append("<hold_qty>").append("<![CDATA[" + holdQty +"]]>").append("</hold_qty>");
//gtin_case
// retTabSepStrBuff.append(rs.getString(11)== null ?"": rs.getString(11)).append("\t");
retTabSepStrBuff.append("<gtin_case>").append("<![CDATA[" + (rs.getString(11)== null ?"": rs.getString(11)) +"]]>").append("</gtin_case>");
//gtin_unit
retTabSepStrBuff.append("<gtin_unit>").append("<![CDATA[" + (rs.getString(14)== null ?"": rs.getString(14)) +"]]>").append("</gtin_unit>");
//LOT_NO
retTabSepStrBuff.append("<lot_no>").append("<![CDATA[" + rs.getString(8) +"]]>").append("</lot_no>");
//LOT_SL
retTabSepStrBuff.append(rs.getString(9)).append("\t");
retTabSepStrBuff.append("<lot_sl>").append("<![CDATA[" + rs.getString(9) +"]]>").append("</lot_sl>");
//LOC_CODE
retTabSepStrBuff.append(rs.getString(10)).append("\t");
retTabSepStrBuff.append("<loc_code>").append("<![CDATA[" + rs.getString(10) +"]]>").append("</loc_code>");
//ALLOC_TRANID
retTabSepStrBuff.append(" ").append("\t");
// retTabSepStrBuff.append(" ").append("\t");
retTabSepStrBuff.append("<tranid>").append("<![CDATA[ ]]>").append("</tranid>");
//ALLOC_LINENO
retTabSepStrBuff.append(" ").append("\t");
retTabSepStrBuff.append(" ").append("\t");
//hold qty
retTabSepStrBuff.append(holdQty).append("\t");
//gtin_case
retTabSepStrBuff.append(rs.getString(11)== null ?"": rs.getString(11)).append("\t");
//gtin_unit
retTabSepStrBuff.append(rs.getString(14) == null ?" ":rs.getString(14) ).append("\n"); //added by Kunal on 25/10/12
resultString = retTabSepStrBuff.toString();
pstmt.clearParameters();
// retTabSepStrBuff.append(" ").append("\t");
retTabSepStrBuff.append("<alloc_lineno>").append("<![CDATA[ ]]>").append("</alloc_lineno>");
retTabSepStrBuff.append("<empty>").append("<![CDATA[ ]]>").append("</empty>");
// retTabSepStrBuff.append(" ").append("\t");
retTabSepStrBuff.append("</Detail2>");
}while(rs.next());
retTabSepStrBuff.append("</Header0>");
retTabSepStrBuff.append("</group0>");
retTabSepStrBuff.append("</DocumentRoot>");
resultString = retTabSepStrBuff.toString();
System.out.println("ResultString....." + resultString);
pstmt.clearParameters();
}
......@@ -501,6 +550,8 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocatio
}
rs1.close();
//SALE_ORDER
retTabSepStrBuff.append(" ").append("\t");
//LINE_NO
......@@ -538,11 +589,12 @@ public class StockDeallocationPrc extends ProcessEJB implements StockDeallocatio
retTabSepStrBuff.append(rsDealloc.getString(14) == null ?" ":rsDealloc.getString(14)).append("\n"); //added by Kunal on 25/10/12
resultString = retTabSepStrBuff.toString();
pstmtDeAlloc.clearParameters();
pstmt.clearParameters();
}while(rsDealloc.next());
}
......
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