Commit 7f8ef654 authored by msaggam's avatar msaggam

In site customer sales_pers, sales_pers__1 and sales_pers__2 to be defaulted from customer.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@201251 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7edd639e
...@@ -537,6 +537,8 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site ...@@ -537,6 +537,8 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
String channelPartner = ""; String channelPartner = "";
String nullVar= ""; String nullVar= "";
String sql = ""; String sql = "";
String salesPers = "", salesPers1 = "", salesPers2 = ""; // variables declared by Mahesh Saggam on 24-05-2019
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -566,7 +568,7 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site ...@@ -566,7 +568,7 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
else if(currentColumn.trim().equalsIgnoreCase("cust_code")) else if(currentColumn.trim().equalsIgnoreCase("cust_code"))
{ {
custCode = genericUtility.getColumnValue("cust_code", dom); custCode = genericUtility.getColumnValue("cust_code", dom);
sql = " select cust_type,cust_name from customer where cust_code = ?"; sql = " select cust_type,cust_name, sales_pers, sales_pers__1, sales_pers__2 from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,custCode); pstmt.setString(1,custCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -574,9 +576,18 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site ...@@ -574,9 +576,18 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
{ {
custType = rs.getString("cust_type"); custType = rs.getString("cust_type");
custName = rs.getString("cust_name"); custName = rs.getString("cust_name");
// Added by Mahesh Saggam on 24-05-2019
salesPers = rs.getString("sales_pers");
salesPers1 = rs.getString("sales_pers__1");
salesPers2 = rs.getString("sales_pers__2");
} }
valueXmlString.append("<cust_type>").append("<![CDATA[" + custType +"]]>").append("</cust_type>"); valueXmlString.append("<cust_type>").append("<![CDATA[" + custType +"]]>").append("</cust_type>");
valueXmlString.append("<cust_name>").append("<![CDATA[" + custName +"]]>").append("</cust_name>"); valueXmlString.append("<cust_name>").append("<![CDATA[" + custName +"]]>").append("</cust_name>");
// Added by Mahesh Saggam on 24-05-2019
valueXmlString.append("<sales_pers>").append("<![CDATA[" + salesPers +"]]>").append("</sales_pers>");
valueXmlString.append("<sales_pers__1>").append("<![CDATA[" + salesPers1 +"]]>").append("</sales_pers__1>");
valueXmlString.append("<sales_pers__2>").append("<![CDATA[" + salesPers2 +"]]>").append("</sales_pers__2>");
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
......
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