Commit 88126be8 authored by dsawant's avatar dsawant

updated for adding 2 new column (Ref_id__alloc,ref_line__no) in insert query


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93822 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 952cbc08
...@@ -200,6 +200,8 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -200,6 +200,8 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
System.out.println("updateSOrder calling .............."); System.out.println("updateSOrder calling ..............");
String getDataSql = null; String getDataSql = null;
String saleOrder = null; String saleOrder = null;
String lineNoo = null;
String tranIDD = null;
String sorditemSql=null; String sorditemSql=null;
String itemCodeOrd = null ; String itemCodeOrd = null ;
String unitStd = null ; String unitStd = null ;
...@@ -306,14 +308,14 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -306,14 +308,14 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
+"ITEM_CODE,QUANTITY ,LOT_NO, LOT_SL, LOC_CODE, UNIT, QTY_ALLOC," +"ITEM_CODE,QUANTITY ,LOT_NO, LOT_SL, LOC_CODE, UNIT, QTY_ALLOC,"
+"ITEM_REF, DATE_ALLOC, STATUS,ITEM_GRADE, EXP_DATE, ALLOC_MODE, " +"ITEM_REF, DATE_ALLOC, STATUS,ITEM_GRADE, EXP_DATE, ALLOC_MODE, "
+" CONV__QTY_STDUOM, UNIT__STD, QUANTITY__STDUOM, " +" CONV__QTY_STDUOM, UNIT__STD, QUANTITY__STDUOM, "
+"MFG_DATE, SITE_CODE__MFG ) " +"MFG_DATE, SITE_CODE__MFG, REF_ID__ALLOC, REF_LINE__NO) " //REF_ID__ALLOC, REF_LINE__NO added by deepak sawant (24/10/13)
+"VALUES ( ?, ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ," +"VALUES ( ?, ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,"
+" ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) " ; +" ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) " ;
pInsSordAlloc = conn.prepareStatement(insertSql); pInsSordAlloc = conn.prepareStatement(insertSql);
getDataSql = "select d.line_no ,d.sale_order ,d.line_no__sord ,d.item_code , " getDataSql = "select d.tran_id ,d.line_no ,d.sale_order ,d.line_no__sord ,d.item_code , "
+" d.loc_code ,d.lot_no ,d.lot_sl ,d.quantity ,d.dealloc_qty,h.site_code__ship , " // replace h.site_code__ship instead of d.site_code to get sitecodeship from header at the time of confirmation +" d.loc_code ,d.lot_no ,d.lot_sl ,d.quantity ,d.dealloc_qty,h.site_code__ship , " // replace h.site_code__ship instead of d.site_code to get sitecodeship from header at the time of confirmation
//+" d.loc_code ,d.lot_no ,d.lot_sl ,d.quantity ,d.dealloc_qty, d.site_code , " //+" d.loc_code ,d.lot_no ,d.lot_sl ,d.quantity ,d.dealloc_qty, d.site_code , "
+" d.exp_lev,d.pending_qty " +" d.exp_lev,d.pending_qty "
...@@ -330,29 +332,34 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -330,29 +332,34 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
{ {
System.out.println( "INSIDE WHILE LOOP............."); System.out.println( "INSIDE WHILE LOOP.............");
tranIDD = rs.getString(1); //added by deepak sawant (24/10/13)
lineNoo = rs.getString(2); //added by deepak sawant (24/10/13)
//SALE_ORDER //SALE_ORDER
saleOrder = rs.getString(2); saleOrder = rs.getString(3);
//LINE_NO__SlineNoSordORD //LINE_NO__SlineNoSordORD
lineNoSord = rs.getString(3); lineNoSord = rs.getString(4);
lineNoSord = " " + lineNoSord.trim(); lineNoSord = " " + lineNoSord.trim();
lineNoSord = lineNoSord.substring( lineNoSord.length()-3 ); lineNoSord = lineNoSord.substring( lineNoSord.length()-3 );
System.out.println("lineNoSord =["+lineNoSord+"]"); System.out.println("lineNoSord =["+lineNoSord+"]");
//ITEM_CODE //ITEM_CODE
itemCode = rs.getString(4); itemCode = rs.getString(5);
//LOC_CODE //LOC_CODE
locCode = rs.getString(5); locCode = rs.getString(6);
//LOT_NO //LOT_NO
lotNo = rs.getString(6); lotNo = rs.getString(7);
//LOT_SL //LOT_SL
lotSl = rs.getString(7); lotSl = rs.getString(8);
//QUANTITY //QUANTITY
quantity = rs.getDouble(8); quantity = rs.getDouble(9);
//SITE_CODE //SITE_CODE
//siteCode = rs.getString(10); // chage by cpatil for siteCode to siteCodeShip //siteCode = rs.getString(10); // chage by cpatil for siteCode to siteCodeShip
siteCodeShip = rs.getString(10); // change by cpatil for siteCode to siteCodeShip siteCodeShip = rs.getString(11); // change by cpatil for siteCode to siteCodeShip
//EXP_LEV //EXP_LEV
expLev = rs.getString(11); expLev = rs.getString(12);
pendingQuantity = rs.getDouble(12); pendingQuantity = rs.getDouble(13);
qtyToBeAllocated = quantity; qtyToBeAllocated = quantity;
...@@ -490,7 +497,7 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -490,7 +497,7 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
{ {
//Inserting the records into SORDALLOC TABLE //Inserting the records into SORDALLOC TABLE
//SALE_ORDER //SALE_ORDER
pInsSordAlloc.setString(1, saleOrder); pInsSordAlloc.setString(1, saleOrder);
System.out.println("saleOrder------->"+saleOrder); System.out.println("saleOrder------->"+saleOrder);
//LINE_NO //LINE_NO
pInsSordAlloc.setString(2, lineNoSord); pInsSordAlloc.setString(2, lineNoSord);
...@@ -567,6 +574,9 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca ...@@ -567,6 +574,9 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
pInsSordAlloc.setString(23,siteCodeMfg); pInsSordAlloc.setString(23,siteCodeMfg);
System.out.println("siteCodeMfg------->"+siteCodeMfg); System.out.println("siteCodeMfg------->"+siteCodeMfg);
//QTY_DESP //QTY_DESP
pInsSordAlloc.setString(24,tranIDD); //added by deepak sawant (24/10/13)
pInsSordAlloc.setString(25,lineNoo); //added by deepak sawant (24/10/13)
int insCnt = 0; int insCnt = 0;
insCnt = pInsSordAlloc.executeUpdate(); insCnt = pInsSordAlloc.executeUpdate();
pInsSordAlloc.clearParameters(); pInsSordAlloc.clearParameters();
......
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