Commit 4a193068 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@99371 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f800bc20
......@@ -372,11 +372,10 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
hm2 = getScanItem(palletNo, loginSite, conn);
itemCodeDB = (String) hm2.get("ITEM_CODE");
lotNoDB = (String) hm2.get("LOT_NO");
lotSlDB = (String) hm2.get("LOT_SL");
/*
//lotSlDB = (String) hm2.get("LOT_SL");
System.out.println("itemCodeDB :::::::::: " + itemCodeDB);
System.out.println("lotNoDB :::::::::: " + lotNoDB);
System.out.println("lotSlDB :::::::::: " + lotSlDB);*/
if(itemCodeDB.length() > 0) // not blank
{
......@@ -390,7 +389,8 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
qcTypeDB = (String) hm1.get("PROC_MTH");
stroPrefDB = (String) hm1.get("ANALYSIS_CLASS");
/* System.out.println("familyGrp :::::::::: " + familyGrp);
/*
System.out.println("familyGrp :::::::::: " + familyGrp);
System.out.println("qcType :::::::::: " + qcType);
System.out.println("stroPref :::::::::: " + stroPref);
......@@ -398,20 +398,20 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
System.out.println("qcTypeDB :::::::::: " + qcTypeDB);
System.out.println("stroPrefDB :::::::::: " + stroPrefDB);
*/
/*
if(!familyGrpDB.equalsIgnoreCase(familyGrp) || !qcTypeDB.equalsIgnoreCase(qcType) || !stroPrefDB.equalsIgnoreCase(stroPref))
{
System.out.println(" item code is not of same analysis grp :::::::::: ");
errCode = "VTINVAC";
errList.add( errCode );
errFields.add(childNodeName.toLowerCase());
}
}*/
System.out.println("Checking condition for QC order status :::::::::: " );
System.out.println("Checking validation for QC order status :::::::::: " );
statusDB = getItemQcStatus(itemCodeDB, lotNoDB, lotSlDB, loginSite, conn);
status = getItemQcStatus(itemCode, lotNo, lotSl, loginSite, conn);
statusDB = getItemQcStatus(itemCodeDB, lotNoDB, loginSite, conn);
status = getItemQcStatus(itemCode, lotNo, loginSite, conn);
if("".equalsIgnoreCase(statusDB) || statusDB == null)
{
statusDB = "C";
......@@ -421,9 +421,9 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
status = "C";
}
/*System.out.println("value of statusDB :::::::::: " + statusDB);
System.out.println("value of status :::::::::: " + status);
*/
System.out.println("value of statusDB after if :::::::::: " + statusDB);
System.out.println("value of status after if :::::::::: " + status);
if(!statusDB.equalsIgnoreCase(status))
{
System.out.println(" item code is not of same qc order status :::::::::: ");
......@@ -709,7 +709,7 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
String sql = "", itemCodeDB = "", lotNoDB = "", lotSlDB = "";
try
{
sql ="select distinct(item_code) as item_code, lot_no, lot_sl from pallet_hdr h, pallet_det d where d.pallet_no = ? and "
sql ="select distinct(item_code) as item_code, lot_no from pallet_hdr h, pallet_det d where d.pallet_no = ? and "
+ "h.confirmed = ? and h.site_code = ? and d.tran_id = h.tran_id and rownum < 2 ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
......@@ -720,14 +720,14 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
{
itemCodeDB = checkNullAndTrim(rs.getString("item_code"));
lotNoDB = checkNullAndTrim(rs.getString("lot_no"));
lotSlDB = checkNullAndTrim(rs.getString("lot_sl"));
//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);
hm.put("LOT_SL", lotSlDB);
//hm.put("LOT_SL", lotSlDB);
}
catch(Exception e)
{
......@@ -752,22 +752,18 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
return hm;
}
//private String getItemQcStatus(String itemCode, String lotNo, String lotSl, String siteCode, String palletNo, Connection conn) throws Exception
private String getItemQcStatus(String itemCode, String lotNo, String lotSl, String siteCode, Connection conn) throws Exception
private String getItemQcStatus(String itemCode, String lotNo, String siteCode, Connection conn) throws Exception
{
PreparedStatement pstmt = null ;
ResultSet rs = null ;
String sql = "", status = "";
try
{
sql ="select status from qc_order where item_code = ? and lot_no = ? and lot_sl = ? and site_code = ? " ;
//"and loc_code = ? ";
sql ="select status from qc_order where item_code = ? and lot_no = ? and site_code = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
pstmt.setString(2, lotNo);
pstmt.setString(3, lotSl);
pstmt.setString(4, siteCode);
//pstmt.setString(5, palletNo);
pstmt.setString(3, siteCode);
rs = pstmt.executeQuery();
if(rs.next())
{
......
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