Commit 96d56faf authored by sgadve's avatar sgadve

updated schema balance logic

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196197 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 527a79a0
......@@ -528,25 +528,25 @@ public class SchemaBalance extends ValidatorEJB
if("itm_default".equalsIgnoreCase(currentColumn))
{
//Added by Vikas on 27-dec-2018[start]
sql="select cust_code,site_code__pbus from customer where site_code= ? and channel_partner='Y'";
sql="select cust_code,site_code__pbus,cust_name from customer where site_code= ? and channel_partner=?";
pStmt=conn.prepareStatement(sql);
pStmt.setString(1, siteCode);
pStmt.setString(2, "Y");
rs=pStmt.executeQuery();
int count=0;
while(rs.next())
{
custCode=rs.getString("cust_code");
siteCodePbus=rs.getString("site_code__pbus");
custName=rs.getString("cust_name");
count++;
}
System.out.println("Count :::::"+count);
if( count == 1 )
{
if(rs.next())
{
custCode=rs.getString("cust_code");
siteCodePbus=rs.getString("site_code__pbus");
System.out.println("Cust Code 123::: ["+custCode+"] ["+siteCodePbus+"]");
}
valueXmlString.append( "<cust_code>").append(custCode).append( "</cust_code>\r\n" );
valueXmlString.append( "<cust_code__repl>").append(custCode).append( "</cust_code__repl>\r\n" );
valueXmlString.append( "<cust_repl_name>").append(custName).append( "</cust_repl_name>\r\n" );
valueXmlString.append( "<site_code__repl>").append(siteCodePbus).append( "</site_code__repl>\r\n" );
}
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String loginCode=getValueFromXTRA_PARAMS(xtraParams,"loginCode");
......@@ -680,6 +680,7 @@ public class SchemaBalance extends ValidatorEJB
//Added By Vikas L on 27-Dec-18[start]
else if(("CUST_CODE__REPL").equalsIgnoreCase(currentColumn))
{
custCode="";
//siteCode = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" );
System.out.println("site_code<<<<<<<<<"+siteCode);
String siteCodeRepl="";
......@@ -695,10 +696,13 @@ public class SchemaBalance extends ValidatorEJB
System.out.println("site_code__pbus ::::"+siteCodeRepl);
}
if( siteCodeRepl.equals(""))
{
valueXmlString.append("<site_code__repl>").append(siteCode).append("</site_code__repl>");
}
else
{
valueXmlString.append("<site_code__repl>").append(siteCodeRepl).append("</site_code__repl>");
}
valueXmlString.append("<site_code__repl>").append(siteCode).append("</site_code__repl>");
valueXmlString.append("<cust_repl_name>").append(custName).append("</cust_repl_name>");
}
//Added By Vikas L on 27-Dec-18[start]
......
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