Commit a41fae5f authored by smestry's avatar smestry

W15FSUN008, Updated class file Palletization.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98887 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 02ecc1cf
...@@ -162,6 +162,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -162,6 +162,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
} }
catch (Exception e1) catch (Exception e1)
{ {
isError = true;
e1.printStackTrace(); e1.printStackTrace();
throw new ITMException(e1); throw new ITMException(e1);
} }
...@@ -310,6 +311,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -310,6 +311,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
double quantity = 0, holdQuantity = 0, quantityDB = 0, packSize = 0, interfaceQty = 0, qtyPerArt = 0, interfaceQtyRem = 0, totQuantity = 0; double quantity = 0, holdQuantity = 0, quantityDB = 0, packSize = 0, interfaceQty = 0, qtyPerArt = 0, interfaceQtyRem = 0, totQuantity = 0;
PreparedStatement pstmt = null, pstmt1 = null; PreparedStatement pstmt = null, pstmt1 = null;
ResultSet rs = null, rs1 = null; ResultSet rs = null, rs1 = null;
boolean isError = false;
DistCommon distComm = new DistCommon(); DistCommon distComm = new DistCommon();
String nexpLoc = "", lockCode = "", expLoc = ""; String nexpLoc = "", lockCode = "", expLoc = "";
...@@ -488,7 +490,6 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -488,7 +490,6 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
HashMap hm2 = new HashMap(); HashMap hm2 = new HashMap();
hm2 = commonWmsUtility.getPalletizedAttributes(rs.getString("item_code"), siteCode, conn1); hm2 = commonWmsUtility.getPalletizedAttributes(rs.getString("item_code"), siteCode, conn1);
procMth = (String) hm2.get("PROC_MTH"); procMth = (String) hm2.get("PROC_MTH");
int procMth1 = Integer.parseInt(procMth);
//= parse procMth; //= parse procMth;
System.out.println("qcReqd ::::::::::::: " + qcReqd); System.out.println("qcReqd ::::::::::::: " + qcReqd);
...@@ -498,7 +499,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -498,7 +499,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
{ {
qcType = "N"; qcType = "N";
} }
else if(procMth1 > 0 && "Y".equalsIgnoreCase(qcReqd)) else if(!"".equalsIgnoreCase(procMth) && "Y".equalsIgnoreCase(qcReqd))
{ {
qcType = "F"; qcType = "F";
} }
...@@ -551,18 +552,30 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -551,18 +552,30 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
} }
catch (SQLException ex) catch (SQLException ex)
{ {
isError = true;
System.out.println("Exception ::" +sql+ ex.getMessage() + ":"); System.out.println("Exception ::" +sql+ ex.getMessage() + ":");
ex.printStackTrace(); ex.printStackTrace();
throw new ITMException(ex); throw new ITMException(ex);
} }
catch (Exception e) catch (Exception e)
{ {
isError = true;
System.out.println("Exception ::" + e.getMessage() + ":"); System.out.println("Exception ::" + e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
finally finally
{ {
if( !isError )
{
System.out.println("commmit");
conn1.commit();
}
else if ( isError )
{
System.out.println("rollback");
conn1.rollback();
}
if(rs!=null) if(rs!=null)
{ {
rs.close(); rs.close();
...@@ -573,6 +586,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -573,6 +586,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
pstmt.close(); pstmt.close();
pstmt = null; pstmt = 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