Commit 2ecdcfbf authored by cpatil's avatar cpatil

Validation for Item code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93391 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 18481ecf
......@@ -104,7 +104,7 @@ public class JvVal extends ValidatorEJB implements JvValLocal, JvValRemote
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
String itemCode=""; // added by cpatil 01/07/13
try
{
finCommon = new FinCommon();
......@@ -631,6 +631,22 @@ public class JvVal extends ValidatorEJB implements JvValLocal, JvValRemote
}
////
else if(childNodeName.equalsIgnoreCase("item_code"))
{
itemCode = genericUtility.getColumnValue("item_code", dom);
//siteCode = genericUtility.getColumnValue("site_code",dom1);
siteCode = genericUtility.getColumnValue("site_code", dom);
refSer = genericUtility.getColumnValue("ref_ser", dom);
if(itemCode!= null && (itemCode.trim().length() > 0))
{
errCode = this.isItem(siteCode, itemCode, refSer, conn);
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
////
}
break;
......@@ -761,7 +777,7 @@ public class JvVal extends ValidatorEJB implements JvValLocal, JvValRemote
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver();
String itemCode="",itemDescr=""; // added by cpatil 01/07/13
try
{
conn = connDriver.getConnectDB("DriverITM");
......@@ -1065,6 +1081,17 @@ public class JvVal extends ValidatorEJB implements JvValLocal, JvValRemote
valueXmlString.append("<sundry_name>").append("<![CDATA[" + description + "]]>").append("</sundry_name>");
}
/// added by cpatil
else if(currentColumn.trim().equalsIgnoreCase("item_code"))
{
itemCode = genericUtility.getColumnValue("item_code", dom);
itemDescr = findValue(conn, "descr" , "item", "item_code", itemCode);
valueXmlString.append("<item_descr>").append("<![CDATA[" + itemDescr + "]]>").append("</item_descr>");
}
/// end
valueXmlString.append("</Detail>");
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