Commit 00be84a1 authored by msingh's avatar msingh

Changed by Manish on 14/07/16 for shipment label is generated from ADSI server.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102455 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2c15f65d
...@@ -1471,6 +1471,19 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob ...@@ -1471,6 +1471,19 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
int currentFormNo = 0; int currentFormNo = 0;
String lrNo = ""; String lrNo = "";
String dlvAdd1 = "";
String dlvAdd2 = "";
String dlvAdd3 = "";
String dlvCity = "";
String dlvPin = "";
String stateCodedlv = "";
String countCodedlv = "";
String stanCode = "";
String telDlv = "";
String custName = "";
String stanCodeDesc = "";
String stateCodeDesc = "";
String countCodeDesc = "";
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
//changed by sankara on 03/01/14 for freight_amt_add in ship_docs //changed by sankara on 03/01/14 for freight_amt_add in ship_docs
...@@ -2017,6 +2030,115 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob ...@@ -2017,6 +2030,115 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob
valueXmlString.append( "<country_descr><![CDATA[" ).append( checkNull( descr) ).append( "]]></country_descr>\r\n" ); valueXmlString.append( "<country_descr><![CDATA[" ).append( checkNull( descr) ).append( "]]></country_descr>\r\n" );
} }
//Changed by sankara on 05-07-13 getting state code,station code,country code descriptions in item change[End.....] //Changed by sankara on 05-07-13 getting state code,station code,country code descriptions in item change[End.....]
//Changed by Manish on 08-07-16 to getting address,state code,station code,country code descriptions from sale_order in item change[Start]
else if( currentColumn.trim().equalsIgnoreCase( "sale_order" ) )
{
columnValue = genericUtility.getColumnValue("sale_order",dom);
sql = "select dlv_add1,dlv_add2,dlv_add3,dlv_city,dlv_pin,state_code__dlv,count_code__dlv,stan_code,tel1__dlv,tran_code from sorder where sale_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
dlvAdd1 = rs.getString("dlv_add1");
dlvAdd2 = rs.getString("dlv_add2");
dlvAdd3 = rs.getString("dlv_add3");
dlvCity = rs.getString("dlv_city");
dlvPin = rs.getString("dlv_pin");
stateCodedlv = rs.getString("state_code__dlv");
countCodedlv = rs.getString("count_code__dlv");
stanCode = rs.getString("stan_code");
telDlv = rs.getString("tel1__dlv");
tranCode = rs.getString("tran_code");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<tran_code><![CDATA[" ).append( tranCode ).append( "]]></tran_code>\r\n" );
valueXmlString.append( "<addr1><![CDATA[" ).append( checkNull( dlvAdd1) ).append( "]]></addr1>\r\n" );
valueXmlString.append( "<addr2><![CDATA[" ).append( checkNull( dlvAdd2) ).append( "]]></addr2>\r\n" );
valueXmlString.append( "<addr3><![CDATA[" ).append( checkNull( dlvAdd3) ).append( "]]></addr3>\r\n" );
valueXmlString.append( "<city><![CDATA[" ).append( checkNull( dlvCity) ).append( "]]></city>\r\n" );
valueXmlString.append( "<pin><![CDATA[" ).append( checkNull( dlvPin) ).append( "]]></pin>\r\n" );
valueXmlString.append( "<state_code><![CDATA[" ).append( checkNull( stateCodedlv) ).append( "]]></state_code>\r\n" );
valueXmlString.append( "<count_code><![CDATA[" ).append( checkNull( countCodedlv) ).append( "]]></count_code>\r\n" );
valueXmlString.append( "<stan_code><![CDATA[" ).append( checkNull( stanCode) ).append( "]]></stan_code>\r\n" );
valueXmlString.append( "<tele1><![CDATA[" ).append( checkNull( telDlv ) ).append( "]]></tele1>\r\n" );
sql = "select descr from station where stan_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, stanCode);
rs = pstmt.executeQuery();
if( rs.next() )
{
stanCodeDesc = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<station_c_descr><![CDATA[" ).append( checkNull( stanCodeDesc) ).append( "]]></station_c_descr>\r\n" );
sql = "select descr from state where state_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, stateCodedlv);
rs = pstmt.executeQuery();
if( rs.next() )
{
stateCodeDesc = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<state_descr><![CDATA[" ).append( checkNull( stateCodeDesc) ).append( "]]></state_descr>\r\n" );
sql = "select descr from country where count_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, countCodedlv);
rs = pstmt.executeQuery();
if( rs.next() )
{
countCodeDesc = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<country_descr><![CDATA[" ).append( checkNull( countCodeDesc) ).append( "]]></country_descr>\r\n" );
sql = "select tran_name from transporter where tran_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranCode);
rs = pstmt.executeQuery();
if( rs.next() )
{
tranName = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<transporter_tran_name><![CDATA[" ).append( checkNull( tranName) ).append( "]]></transporter_tran_name>\r\n" );
sql = "select c.cust_name from customer c, sorder s where c.cust_code = s.cust_code and s.sale_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
custName = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<consignee_name><![CDATA[" ).append( checkNull( custName) ).append( "]]></consignee_name>\r\n" );
}
//Changed by Manish on 08-07-16 to getting address,state code,station code,country code descriptions from sale_order in item change[End]
valueXmlString.append( "</Detail1>\r\n" ); valueXmlString.append( "</Detail1>\r\n" );
break; 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