Commit d2ecfb30 authored by sghate's avatar sghate

shital: updated Component on 03-10-2019

ItDeclarationFmt.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208817 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fa45124a
...@@ -360,7 +360,8 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo ...@@ -360,7 +360,8 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo
int ctr = 0; int ctr = 0;
int count = 0; int count = 0;
int count1 = 0; int count1 = 0;
String seqNo = "" ; String seqNoStr = "" ;
int seqNo = 0;
String userId = "" ; String userId = "" ;
String adCode = "" ; String adCode = "" ;
String description = ""; String description = "";
...@@ -412,12 +413,12 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo ...@@ -412,12 +413,12 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo
if(childNodeName.equalsIgnoreCase("seq_no")) if(childNodeName.equalsIgnoreCase("seq_no"))
{ {
count = 0; count = 0;
seqNo = checkNull(genericUtility.getColumnValue("seq_no",dom,objContext)); seqNoStr = checkNull(genericUtility.getColumnValue("seq_no",dom,objContext));
System.out.println("seqNo got in the validation ..::["+seqNo+"]"); System.out.println("seqNo got in the validation ..::["+seqNo+"]");
if(seqNo == null || seqNo.trim().length() == 0) if(seqNoStr == null || seqNoStr.trim().length() == 0)
{ {
System.out.println("Invalid seqNo ::::"); System.out.println("Invalid seqNoStr ::::");
errList.add( "VMINVSEQ" ); errList.add( "VMINVSEQ" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
...@@ -432,7 +433,8 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo ...@@ -432,7 +433,8 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo
{ {
sql = " SELECT COUNT(*) AS SEQ_CNT FROM ITDECL_FMT WHERE SEQ_NO = ? "; sql = " SELECT COUNT(*) AS SEQ_CNT FROM ITDECL_FMT WHERE SEQ_NO = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,seqNo); pstmt.setString(1,seqNoStr);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next()) if( rs.next())
{ {
...@@ -444,7 +446,7 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo ...@@ -444,7 +446,7 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo
rs.close(); rs.close();
rs = null; rs = null;
} }
if ( pstmt != null ) if (pstmt != null)
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
...@@ -481,8 +483,27 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo ...@@ -481,8 +483,27 @@ public class ItDeclarationFmt extends ValidatorEJB implements ItDeclarationFmtLo
} }
} }
} }
//Added by Shital on 03/10/2019 [Start]
seqNoStr = checkNull(genericUtility.getColumnValue("seq_no",dom,objContext));
System.out.println("seq_no == ["+seqNoStr+"]");
try
{
seqNo = Integer.parseInt(seqNoStr);
}
catch(Exception e)
{
seqNo = 0;
}
if(seqNo < 0)
{
errList.add("VTINVSEQNO");
errFields.add(childNodeName.toLowerCase());
}
//Added by Shital on 03/10/2019 [End]
} }
} }
else if(childNodeName.equalsIgnoreCase("ad_code")) else if(childNodeName.equalsIgnoreCase("ad_code"))
{ {
count = 0; count = 0;
......
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