Commit f8105503 authored by smestry's avatar smestry

W15FSUN008, Updated class file Palletization.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99104 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 67dd593a
...@@ -308,7 +308,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -308,7 +308,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
{ {
String sql = "", tranDate = "", invStat = "", qcType = "", String sql = "", tranDate = "", invStat = "", qcType = "",
expDate = "", mfgDate = "", palletStatus = "", qcReqd = "", procMth = "", lineNoInterface = ""; expDate = "", mfgDate = "", palletStatus = "", qcReqd = "", procMth = "", lineNoInterface = "";
double holdQuantity = 0, quantityDB = 0, packSize = 0, interfaceQty = 0, interfaceQtyRem = 0, totQuantity = 0; double holdQuantity = 0, quantityDB = 0, packSize = 0, interfaceQty = 0, interfaceQtyRem = 0, totQuantity = 0, qtyPerArt = 0, noArt = 0;
PreparedStatement pstmt = null, pstmt1 = null; PreparedStatement pstmt = null, pstmt1 = null;
ResultSet rs = null, rs1 = null; ResultSet rs = null, rs1 = null;
boolean isError = false; boolean isError = false;
...@@ -348,7 +348,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -348,7 +348,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while(rs.next()) while(rs.next())
{ {
sql = "select hold_qty from stock where quantity > 0 and site_code = ? and loc_code = ? and " sql = "select hold_qty, qty_per_art, no_art from stock where quantity > 0 and site_code = ? and loc_code = ? and "
+ "item_code = ? and lot_no = ? and lot_sl = ? "; + "item_code = ? and lot_no = ? and lot_sl = ? ";
pstmt1 = conn1.prepareStatement(sql); pstmt1 = conn1.prepareStatement(sql);
pstmt1.setString(1, rs.getString("site_code")); pstmt1.setString(1, rs.getString("site_code"));
...@@ -359,12 +359,16 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -359,12 +359,16 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if (rs1.next()) if (rs1.next())
{ {
holdQuantity = rs1.getDouble("hold_qty"); holdQuantity = rs1.getDouble("hold_qty");
qtyPerArt = rs1.getDouble("qty_per_art");
noArt = rs1.getDouble("no_art");
} }
System.out.println("holdQuantity ::::::::::::: " + holdQuantity);
if(pstmt1 != null){ pstmt1.close(); pstmt1 = null; } if(pstmt1 != null){ pstmt1.close(); pstmt1 = null; }
if(rs1 != null){ rs1.close(); rs1 = null; } if(rs1 != null){ rs1.close(); rs1 = null; }
System.out.println("holdQuantity ::::::::::::: " + holdQuantity);
System.out.println("qtyPerArt ::::::::::::: " + qtyPerArt);
System.out.println("noArt ::::::::::::: " + noArt);
// InvStat // InvStat
if(holdQuantity > 0) if(holdQuantity > 0)
{ {
...@@ -408,7 +412,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -408,7 +412,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
invStat = "A"; invStat = "A";
} }
System.out.println("invStat final ::::::::::::: " + invStat); System.out.println("invStat final ::::::::::::: " + invStat);
/*
// Quantity, no of Arts, Total Quantity // Quantity, no of Arts, Total Quantity
HashMap hm1 = new HashMap(); HashMap hm1 = new HashMap();
hm1 = commonWmsUtility.getItemVoumeMap(rs.getString("item_code"), rs.getString("lot_no"), conn1); hm1 = commonWmsUtility.getItemVoumeMap(rs.getString("item_code"), rs.getString("lot_no"), conn1);
...@@ -437,7 +441,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -437,7 +441,7 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
System.out.println("Final Quantity for interface table ::::::::::::: " + interfaceQty); System.out.println("Final Quantity for interface table ::::::::::::: " + interfaceQty);
System.out.println("totQuantity ::::::::::::: " + totQuantity); System.out.println("totQuantity ::::::::::::: " + totQuantity);
*/
// Expiry Date, Mfg Date // Expiry Date, Mfg Date
sql = "select exp_date, mfg_date from stock where item_code = ? and site_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? "; sql = "select exp_date, mfg_date from stock where item_code = ? and site_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? ";
pstmt1 = conn1.prepareStatement(sql); pstmt1 = conn1.prepareStatement(sql);
...@@ -515,9 +519,12 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf ...@@ -515,9 +519,12 @@ public class PalletizationConf extends ValidatorEJB implements PalletizationConf
hm.put("TRAN_DATE", checkNullAndTrim(String.valueOf(rs.getTimestamp("TRAN_DATE")))); hm.put("TRAN_DATE", checkNullAndTrim(String.valueOf(rs.getTimestamp("TRAN_DATE"))));
hm.put("LOT_NO", rs.getString("lot_no")); hm.put("LOT_NO", rs.getString("lot_no"));
hm.put("LOT_SL", rs.getString("lot_sl")); hm.put("LOT_SL", rs.getString("lot_sl"));
hm.put("QUANTITY", checkNullAndTrim((String.valueOf(interfaceQty)))); hm.put("QUANTITY", checkNullAndTrim((String.valueOf(noArt))));
hm.put("QTY_PER_ART",checkNullAndTrim((String.valueOf(qtyPerArt))));
hm.put("TOTAL_QTY", checkNullAndTrim(rs.getString("quantity")));
/*hm.put("QUANTITY", checkNullAndTrim((String.valueOf(interfaceQty))));
hm.put("QTY_PER_ART", checkNullAndTrim((String.valueOf(packSize)))); hm.put("QTY_PER_ART", checkNullAndTrim((String.valueOf(packSize))));
hm.put("TOTAL_QTY", checkNullAndTrim((String.valueOf(totQuantity)))); hm.put("TOTAL_QTY", checkNullAndTrim((String.valueOf(totQuantity)))); */
hm.put("EXP_DATE", checkNullAndTrim(expDate)); hm.put("EXP_DATE", checkNullAndTrim(expDate));
hm.put("MFG_DATE", checkNullAndTrim(mfgDate)); hm.put("MFG_DATE", checkNullAndTrim(mfgDate));
hm.put("PALLET_NO", checkNullAndTrim(rs.getString("pallet_no"))); hm.put("PALLET_NO", checkNullAndTrim(rs.getString("pallet_no")));
......
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