Commit 51919171 authored by msharma's avatar msharma

issue resolved duplicate entry was inserting in inv_hold_rel_trace table


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96930 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5722c2d1
......@@ -117,11 +117,12 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
PreparedStatement pUpdate = null;
PreparedStatement pSelStck = null;
PreparedStatement pstmtInsert = null;
PreparedStatement pHoldDet = null,pHoldDet1=null;
PreparedStatement pHoldDet = null;
ResultSet rsHoldDet = null;
ResultSet rsSelStck = null;
ResultSet rsNoSl = null;
//ResultSet rsNoSl = null;
//changed by Dharmesh on 12-08-2011 [WM1ESUN004].end
try
......@@ -239,7 +240,7 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
rsHoldDet = pHoldDet.executeQuery();
// pHoldDet.clearParameters();
if ( rsHoldDet.next() )
while ( rsHoldDet.next() )
{
itemCode = checkNull(rsHoldDet.getString("ITEM_CODE"));
siteCode = checkNull(rsHoldDet.getString("SITE_CODE"));
......@@ -354,18 +355,18 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
}
else //i.e. line_sl is not found
{
System.out.println("333333");
//System.out.println("333333");
pHoldDet1 = conn.prepareStatement(sqlHoldDet);
pHoldDet1.setString( 1, tranId );
rsNoSl = pHoldDet1.executeQuery();
while ( rsNoSl.next() )
{
itemCode = checkNull(rsNoSl.getString("ITEM_CODE"));
siteCode = checkNull(rsNoSl.getString("SITE_CODE"));
locCode = checkNull(rsNoSl.getString("LOC_CODE"));
lotNo = checkNull(rsNoSl.getString("LOT_NO"));
lotSl = checkNull(rsNoSl.getString("LOT_SL"));
//pHoldDet1 = conn.prepareStatement(sqlHoldDet);
//pHoldDet1.setString( 1, tranId );
//rsNoSl = pHoldDet1.executeQuery();
//while ( rsNoSl.next() )
//{
//itemCode = checkNull(rsNoSl.getString("ITEM_CODE"));
//siteCode = checkNull(rsNoSl.getString("SITE_CODE"));
//locCode = checkNull(rsNoSl.getString("LOC_CODE"));
//lotNo = checkNull(rsNoSl.getString("LOT_NO"));
//lotSl = checkNull(rsNoSl.getString("LOT_SL"));
sql = "SELECT ITEM_CODE,SITE_CODE,LOC_CODE,LOT_NO,LOT_SL,QUANTITY, HOLD_QTY,QTY_PER_ART FROM STOCK WHERE QUANTITY > 0 " ;
......@@ -507,13 +508,8 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
rsStock.close();
rsStock = null;
}
}//end of while()
if( rsNoSl != null )
{
rsNoSl.close();
rsNoSl = null;
}
pHoldDet1.close();
//}//end of while()
}//end of else
if( rs != null )
......
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