Commit 788b1a38 authored by caluka's avatar caluka

line no bom validation change BOMAMD[MF3GSUN024]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94188 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c9f073d8
......@@ -54,6 +54,7 @@ public class BomAmdIC extends ValidatorEJB implements BomAmdICLocal, BomAmdICRem
{
dom2 = parseString(xmlString2);
System.out.println("xmlString2["+xmlString2+"]");
System.out.println("dom2["+dom2+"]");
}
errString = wfValData(dom, dom1, dom2, objContext, editFlag, xtraParams);
......@@ -73,7 +74,7 @@ public class BomAmdIC extends ValidatorEJB implements BomAmdICLocal, BomAmdICRem
String userId = "";
String sql = "";
String errorType = "";
int cnt = 0;
int cnt = 0,cnt1= 0;
int ctr=0;
int childNodeListLength;
NodeList parentNodeList = null;
......@@ -198,7 +199,9 @@ public class BomAmdIC extends ValidatorEJB implements BomAmdICLocal, BomAmdICRem
if ( childNodeName.equalsIgnoreCase("line_no__bom"))
{
lineNoBOM = checkNull(genericUtility.getColumnValue("line_no__bom", dom));
System.out.println("@@@@@@lineNoBOM["+lineNoBOM+"]");
bomcode = checkNull(genericUtility.getColumnValue("bom_code", dom));
lineNo = checkNull(genericUtility.getColumnValue("line_no", dom));
System.out.println("@@@@@@lineNoBOM["+lineNoBOM+"]"+"bomcode["+bomcode+"]");
if(lineNoBOM == null || lineNoBOM.trim().length() == 0)
{
......@@ -206,8 +209,29 @@ public class BomAmdIC extends ValidatorEJB implements BomAmdICLocal, BomAmdICRem
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else if( lineNoBOM != null && lineNoBOM.length() > 0 )
{
sql = "select count(1) from bomdet where bom_code = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,bomcode);
pstmt.setString(2,lineNoBOM);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( cnt == 0 )
{
errCode = "VTBOMDTLN2";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
java.util.HashSet<String> bomData=new java.util.HashSet<String>();
for(int i =0; i< dom2.getElementsByTagName("Detail2").getLength();i++)
......@@ -233,7 +257,7 @@ public class BomAmdIC extends ValidatorEJB implements BomAmdICLocal, BomAmdICRem
}
}
}
}
}
......
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