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 ...@@ -117,11 +117,12 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
PreparedStatement pUpdate = null; PreparedStatement pUpdate = null;
PreparedStatement pSelStck = null; PreparedStatement pSelStck = null;
PreparedStatement pstmtInsert = null; PreparedStatement pstmtInsert = null;
PreparedStatement pHoldDet = null,pHoldDet1=null; PreparedStatement pHoldDet = null;
ResultSet rsHoldDet = null; ResultSet rsHoldDet = null;
ResultSet rsSelStck = null; ResultSet rsSelStck = null;
ResultSet rsNoSl = null; //ResultSet rsNoSl = null;
//changed by Dharmesh on 12-08-2011 [WM1ESUN004].end //changed by Dharmesh on 12-08-2011 [WM1ESUN004].end
try try
...@@ -239,7 +240,7 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I ...@@ -239,7 +240,7 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
rsHoldDet = pHoldDet.executeQuery(); rsHoldDet = pHoldDet.executeQuery();
// pHoldDet.clearParameters(); // pHoldDet.clearParameters();
if ( rsHoldDet.next() ) while ( rsHoldDet.next() )
{ {
itemCode = checkNull(rsHoldDet.getString("ITEM_CODE")); itemCode = checkNull(rsHoldDet.getString("ITEM_CODE"));
siteCode = checkNull(rsHoldDet.getString("SITE_CODE")); siteCode = checkNull(rsHoldDet.getString("SITE_CODE"));
...@@ -354,18 +355,18 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I ...@@ -354,18 +355,18 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
} }
else //i.e. line_sl is not found else //i.e. line_sl is not found
{ {
System.out.println("333333"); //System.out.println("333333");
pHoldDet1 = conn.prepareStatement(sqlHoldDet); //pHoldDet1 = conn.prepareStatement(sqlHoldDet);
pHoldDet1.setString( 1, tranId ); //pHoldDet1.setString( 1, tranId );
rsNoSl = pHoldDet1.executeQuery(); //rsNoSl = pHoldDet1.executeQuery();
while ( rsNoSl.next() ) //while ( rsNoSl.next() )
{ //{
itemCode = checkNull(rsNoSl.getString("ITEM_CODE")); //itemCode = checkNull(rsNoSl.getString("ITEM_CODE"));
siteCode = checkNull(rsNoSl.getString("SITE_CODE")); //siteCode = checkNull(rsNoSl.getString("SITE_CODE"));
locCode = checkNull(rsNoSl.getString("LOC_CODE")); //locCode = checkNull(rsNoSl.getString("LOC_CODE"));
lotNo = checkNull(rsNoSl.getString("LOT_NO")); //lotNo = checkNull(rsNoSl.getString("LOT_NO"));
lotSl = checkNull(rsNoSl.getString("LOT_SL")); //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 " ; 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 ...@@ -507,13 +508,8 @@ public class InvHoldConf extends ActionHandlerEJB implements InvHoldConfLocal ,I
rsStock.close(); rsStock.close();
rsStock = null; rsStock = null;
} }
}//end of while() //}//end of while()
if( rsNoSl != null )
{
rsNoSl.close();
rsNoSl = null;
}
pHoldDet1.close();
}//end of else }//end of else
if( rs != null ) 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