Commit 27e8e733 authored by msharma's avatar msharma

Changes received from unique on 02102012


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91919 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4f6d6597
......@@ -316,9 +316,11 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
//errCode = "VMSTANCOD ";
//errList.add(errCode);
//errFields.add(childNodeName.toLowerCase());
/* //Changed by Sankara on 01/10/12 statin code from allowed blank [start]
errCode = "STNCDFRBK ";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
errFields.add(childNodeName.toLowerCase()); */
//Changed by Sankara on 01/10/12 statin code from allowed blank [end]
}
else if(StanCodeFrom != null && StanCodeFrom.trim().length() > 0)
{
......@@ -350,9 +352,11 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
//errCode = "VMSTANCOD ";
//errList.add(errCode);
//errFields.add(childNodeName.toLowerCase());
errCode = "STNCODTOBK ";
//Changed by Sankara on 01/10/12 station code to allowed blank [start]
/* errCode = "STNCODTOBK ";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
errFields.add(childNodeName.toLowerCase()); */
//Changed by Sankara on 01/10/12 station code to allowed blank [end]
}
else if(StanCodeTo != null && StanCodeTo.trim().length() > 0)
{
......@@ -601,9 +605,9 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
if(locType != null && locType.trim().length() > 0)
{
sql = "SELECT rtrim(FLD_VALUE), descr FROM GENCODES WHERE FLD_NAME IN ('LOC_TYPE') AND fld_value=?";
sql = "SELECT trim(FLD_VALUE), descr FROM GENCODES WHERE FLD_NAME IN ('LOC_TYPE') AND fld_value= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,locType);
pstmt.setString(1,locType.trim());
rs = pstmt.executeQuery();
if(rs.next())
{
......@@ -830,7 +834,8 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append("<station_descr>").append("<![CDATA[" + descr +"]]>").append("</station_descr>");
// valueXmlString.append("<stationa_descr>").append("<![CDATA[" + descr +"]]>").append("</stationa_descr>");
valueXmlString.append("<stationa_descr>").append("<![CDATA[" + descr +"]]>").append("</stationa_descr>");
}
else if(currentColumn.trim().equalsIgnoreCase("stan_code__to"))
{
......@@ -950,7 +955,7 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
{
sql = "Select descr,state_code from station where stan_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,stanCodeFr);
pstmt.setString(1,stanCodeFr.trim());
rs = pstmt.executeQuery();
if(rs.next())
{
......@@ -978,7 +983,7 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
}
}
valueXmlString.append("<state_code__fr>").append("<![CDATA[" + stateCodeFr +"]]>").append("</state_code__fr>");
valueXmlString.append("<descr_1>").append("<![CDATA[" + stateDescr +"]]>").append("</descr_1>");
valueXmlString.append("<descr>").append("<![CDATA[" + stateDescr +"]]>").append("</descr>");
valueXmlString.append("<stationa_descr>").append("<![CDATA[" + descr +"]]>").append("</stationa_descr>");
if(stateCodeFr.trim().length() == 0)
......@@ -1001,7 +1006,7 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
{
sql = "Select descr,state_code from station where stan_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,stanCodeTo);
pstmt.setString(1,stanCodeTo.trim());
rs = pstmt.executeQuery();
if(rs.next())
{
......@@ -1030,7 +1035,7 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
}
valueXmlString.append("<state_code__to>").append("<![CDATA[" + stateCodeTo +"]]>").append("</state_code__to>");
valueXmlString.append("<station_descr_1>").append("<![CDATA[" + descr +"]]>").append("</station_descr_1>");
valueXmlString.append("<descr>").append("<![CDATA[" + stateDescr +"]]>").append("</descr>");
valueXmlString.append("<descr_1>").append("<![CDATA[" + stateDescr +"]]>").append("</descr_1>");
if(stanCodeTo.trim().length() == 0)
{
......@@ -1097,7 +1102,7 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
pstmt.close();
pstmt = null;
}
valueXmlString.append("<descr>").append("<![CDATA[" + descr +"]]>").append("</descr>");
valueXmlString.append("<descr_1>").append("<![CDATA[" + descr +"]]>").append("</descr_1>");
if(stateCodeTo.trim().length() == 0)
{
valueXmlString.append("<state_code__to>").append("<![CDATA[ ]]>").append("</state_code__to>");
......@@ -1121,7 +1126,7 @@ public class DistributionRoute extends ValidatorEJB implements DistributionRoute
pstmt.close();
pstmt = null;
}
valueXmlString.append("<descr_1>").append("<![CDATA[" + descr +"]]>").append("</descr_1>");
valueXmlString.append("<descr>").append("<![CDATA[" + descr +"]]>").append("</descr>");
if(stateCodeFr.trim().length() == 0)
{
valueXmlString.append("<state_code__fr>").append("<![CDATA[ ]]>").append("</state_code__fr>");
......
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