Commit 7b0cb006 authored by sghate's avatar sghate

shital: updated component 23-09-2019

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208058 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a7b36031
...@@ -9,8 +9,8 @@ import org.w3c.dom.Document; ...@@ -9,8 +9,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
//import com.sybase.ejb.RemoteException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
...@@ -73,11 +73,14 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal, ...@@ -73,11 +73,14 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
int currentFormNo = 0; int currentFormNo = 0;
int counter; int counter;
Connection conn = null; Connection conn = null;
String qlfCode = null; String qlfCode = "";
int cnt = 0; int cnt = 0;
String descr = null; String descr = "";
String shDescr = null; String shDescr = "";
String eqival = null; String eqival = "";
int eqivalInt = 0;
String type = "";
String shDescr1 = "";
ITMDBAccessEJB itmDbAcess = null; ITMDBAccessEJB itmDbAcess = null;
E12GenericUtility genericUtility = null; E12GenericUtility genericUtility = null;
...@@ -125,7 +128,7 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal, ...@@ -125,7 +128,7 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
if("A".equalsIgnoreCase(editFlag)) if("A".equalsIgnoreCase(editFlag))
{ {
if(qlfCode == null || qlfCode.length() == 0) if(qlfCode == null || qlfCode.trim().length() == 0)
{ {
errList.add("VEQLF2"); errList.add("VEQLF2");
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
...@@ -159,38 +162,36 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal, ...@@ -159,38 +162,36 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
} }
} }
} }
if("descr".equalsIgnoreCase(childNodeName)) else if("descr".equalsIgnoreCase(childNodeName))
{ {
descr = checkNull(genericUtility.getColumnValue("descr", dom)).trim(); descr = checkNull(genericUtility.getColumnValue("descr", dom)).trim();
System.out.println("descr == ["+descr+"]"); System.out.println("descr == ["+descr+"]");
if(descr == null || descr.length() == 0) if(descr == null || descr.trim().length() == 0)
{ {
errList.add("VTDESC1"); errList.add("VTDESC1");
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
if("sh_descr".equalsIgnoreCase(childNodeName)) else if("sh_descr".equalsIgnoreCase(childNodeName))
{ {
shDescr = checkNull(genericUtility.getColumnValue("sh_descr", dom)).trim(); shDescr = checkNull(genericUtility.getColumnValue("sh_descr", dom)).trim();
System.out.println("sh_descr == ["+shDescr+"]"); System.out.println("sh_descr == ["+shDescr+"]");
if(shDescr == null || shDescr.length() == 0) if(shDescr == null || shDescr.trim().length() == 0)
{ {
errList.add("VEADN2"); errList.add("VEADN2");
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
if("eqival".equalsIgnoreCase(childNodeName)) else if("eqival".equalsIgnoreCase(childNodeName))
{ {
eqival = checkNull(genericUtility.getColumnValue("eqival", dom)); eqival = checkNull(genericUtility.getColumnValue("eqival", dom));
if(eqival != null && eqival.trim().length() > 0)
if(eqival != null || eqival.trim().length() > 0)
{ {
sql = "Select count(*) as cnt from qualification where qlf_code = ?"; sql = "Select count(*) as cnt from qualification where qlf_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -219,6 +220,48 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal, ...@@ -219,6 +220,48 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
} }
} }
else if("type".equalsIgnoreCase(childNodeName))
{
cnt = 0;
type = checkNull(genericUtility.getColumnValue("type", dom));
System.out.println("type::::::"+type);
if(type != null && type.trim().length() > 0)
{
sql = "SELECT FLD_VALUE as DESCR "
+ "FROM GENCODES "
+ "WHERE "
+ "FLD_NAME = ? "
+ "and MOD_NAME = ? "
+ "and DESCR = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "TYPE");
pstmt.setString(2, "W_QUAL");
pstmt.setString(3, type);
rs = pstmt.executeQuery();
if (rs.next())
{
descr = rs.getString("DESCR");
cnt = 1;
}
System.out.println("descr for Type..:: [" + descr + "]");
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0 )
{
errList.add("VMTYPE1");
errFields.add(childNodeName.toLowerCase());
}
}
}
} }
break; break;
} }
...@@ -362,5 +405,4 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal, ...@@ -362,5 +405,4 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
} }
return input.trim(); return input.trim();
} }
} }
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