Commit e76858a6 authored by smestry's avatar smestry

W15FSUN008, Updated class file for Palletization.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99366 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1d38b880
......@@ -488,6 +488,7 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
try
{
if (conn != null)
{
conn.close();
......@@ -520,6 +521,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
msgType = rs.getString("MSG_TYPE");
}
if(pstmt != null){pstmt.close();pstmt = null;}
if(rs != null){rs.close();rs = null;}
}
catch (Exception ex)
{
......@@ -628,6 +631,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
count = rs.getInt(1);
}
if(pstmt != null){ pstmt.close(); pstmt = null; }
if(rs != null){ rs.close(); rs = null; }
}
catch(Exception e)
{
......@@ -670,6 +675,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
count = rs.getInt(1);
}
if(pstmt != null){ pstmt.close(); pstmt = null; }
if(rs != null){ rs.close(); rs = null; }
}
catch(Exception e)
{
......@@ -715,6 +722,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
lotNoDB = checkNullAndTrim(rs.getString("lot_no"));
lotSlDB = checkNullAndTrim(rs.getString("lot_sl"));
}
if(pstmt != null){ pstmt.close(); pstmt = null; }
if(rs != null){ rs.close(); rs = null; }
hm.put("ITEM_CODE", itemCodeDB);
hm.put("LOT_NO", lotNoDB);
......@@ -764,6 +773,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
status = checkNullAndTrim(rs.getString("status"));
}
if(pstmt != null){ pstmt.close(); pstmt = null; }
if(rs != null){ rs.close(); rs = null; }
}
catch(Exception e)
{
......@@ -1204,6 +1215,16 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
try
{
if(rs!=null)
{
rs.close();
rs = null;
}
if(pstmt!=null)
{
pstmt.close();
pstmt = null;
}
if ( conn != null )
{
conn.close();
......@@ -1250,6 +1271,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
String sql = "";
int lineNo = 0;
try
{
if( tranId != null && tranId.trim().length() > 0 ) // edit mode
{
sql = "select max(line_no)+1 as line_no from pallet_det where tran_id = ? ";
......@@ -1285,6 +1308,27 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
lineNo = 1;
}
}
catch(Exception e)
{
System.out.println("Exception in getItemQcStatus ::::::: " + e);
e.printStackTrace();
throw new Exception(e);
}
finally
{
if(rs!=null)
{
rs.close();
rs = null;
}
if(pstmt!=null)
{
pstmt.close();
pstmt = null;
}
}
System.out.println("return lineNo from getMaxLineNo :::::::::::::::::; "+lineNo);
return lineNo;
}
......
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