Commit 232f9eef authored by smestry's avatar smestry

W15FSUN008, Updated class file Palletization.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98946 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7da66c90
...@@ -139,11 +139,12 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca ...@@ -139,11 +139,12 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
System.out.println("DOM1----->>["+genericUtility.serializeDom(dom1).toString()+"]"); System.out.println("DOM1----->>["+genericUtility.serializeDom(dom1).toString()+"]");
System.out.println("DOM2----->>["+genericUtility.serializeDom(dom2).toString()+"]"); System.out.println("DOM2----->>["+genericUtility.serializeDom(dom2).toString()+"]");
String locationCode ="", palletNo = "", sql = "", scheduleStatus = ""; String locationCode ="", palletNo = "", sql = "";
ArrayList<String> locStockList = new ArrayList<String>(); ArrayList<String> locStockList = new ArrayList<String>();
ArrayList<String> palletList = new ArrayList<String>(); ArrayList<String> palletList = new ArrayList<String>();
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
ResultSet rs = null ; ResultSet rs = null ;
int countPalletNo = 0;
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
...@@ -159,13 +160,14 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca ...@@ -159,13 +160,14 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
locStockList = getLocationCode(conn, loginSite); locStockList = getLocationCode(conn, loginSite);
palletList = getPalletNo(conn, loginSite); palletList = getPalletNo(conn, loginSite);
sql ="select schedule_status from interface2 where pallet_no = ? "; sql ="select count(*) from interface2 where pallet_no = ? and schedule_status is null ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo); pstmt.setString(1, palletNo);
pstmt.setString(2, "y");
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
scheduleStatus = checkNullAndTrim(rs.getString("schedule_status")); countPalletNo = rs.getInt(1);
} }
if(pstmt != null){pstmt.close();pstmt = null;} if(pstmt != null){pstmt.close();pstmt = null;}
if(rs != null){rs.close();rs = null;} if(rs != null){rs.close();rs = null;}
...@@ -251,13 +253,14 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca ...@@ -251,13 +253,14 @@ public class PalletizationIC extends ValidatorEJB implements PalletizationICLoca
errList.add( errCode ); errList.add( errCode );
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
}*/ }*/
if(!"Y".equalsIgnoreCase(scheduleStatus) && "".equalsIgnoreCase(scheduleStatus)) if(countPalletNo > 0)
{ {
System.out.println("Pallet No still transist, interface table :::::::::: "); System.out.println("Pallet No still transist, interface table :::::::::: ");
errCode = "VTINOUTPL"; errCode = "VTINOUTPL";
errList.add( errCode ); errList.add( errCode );
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
} }
break; break;
......
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