Commit c62ce943 authored by rbhogale's avatar rbhogale

Changed by Rohan on 21-08-13 for revers address order in shipment


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93522 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b9c8ceb9
...@@ -284,6 +284,36 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -284,6 +284,36 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Chnaged by Rohan on 21-08-13 for validating consinee name in case of manual shipment.start
sql = "SELECT CONSIGNEE_NAME,ADDR1,ADDR2,ADDR3 FROM SHIPMENT WHERE SHIPMENT_ID = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if( rs.next() )
{
custName = checkNull(rs.getString("CONSIGNEE_NAME")).trim();
shipAdd1 = checkNull(rs.getString("ADDR3")).trim();
shipAdd2 = checkNull(rs.getString("ADDR2")).trim();
shipAdd3 = checkNull(rs.getString("ADDR1")).trim();
}
if("".equalsIgnoreCase(custName) && custName.trim().length() <= 0)
{
errString = itmDBAccessLocal.getErrorString("","VTINVCONSE","");
return errString;
}
if(("".equalsIgnoreCase(shipAdd1) && shipAdd1.trim().length() <= 0 ) && ("".equalsIgnoreCase(shipAdd2) && shipAdd2.trim().length() <= 0 ) && ("".equalsIgnoreCase(shipAdd3) && shipAdd3.trim().length() <= 0 ))
{
errString = itmDBAccessLocal.getErrorString("","VTINVADDR","");
return errString;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Chnaged by Rohan on 21-08-13 for validating consinee name in case of manual shipment.end
} }
...@@ -1027,7 +1057,10 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1027,7 +1057,10 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
//recipient.setID(custCodeDlv);//Customer Code //recipient.setID(custCodeDlv);//Customer Code
recipient.setID(custName);//Customer Code recipient.setID(custName);//Customer Code
recipient.setContact(custName);//Customer Name recipient.setContact(custName);//Customer Name
recipient.setCompany(custName);//Customer Company Name //Chnaged by Rohan on 20-08-13 for set company blank.
//recipient.setCompany(custName);//Customer Company Name
recipient.setCompany("");//Customer Company Name
//Chnaged by Rohan on 14-07-13 for ship label show address in revers order.start //Chnaged by Rohan on 14-07-13 for ship label show address in revers order.start
/* /*
recipient.setAddress1(shipAdd1);//Customer Adress1 recipient.setAddress1(shipAdd1);//Customer Adress1
...@@ -1035,9 +1068,31 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1035,9 +1068,31 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
recipient.setAddress3(shipAdd3);//Customer Adress3 recipient.setAddress3(shipAdd3);//Customer Adress3
*/ */
//Chnaged by Rohan on 21-08-13 for shipAddrs 3 is blank then set address 2.start
/*
recipient.setAddress1(shipAdd3);//Customer Adress1 recipient.setAddress1(shipAdd3);//Customer Adress1
recipient.setAddress2(shipAdd2);//Customer Adress2 recipient.setAddress2(shipAdd2);//Customer Adress2
recipient.setAddress3(shipAdd1);//Customer Adress3 recipient.setAddress3(shipAdd1);//Customer Adress3
*/
if(!"".equalsIgnoreCase(shipAdd3) && shipAdd3.trim().length() > 0)
{
recipient.setAddress1(shipAdd3);//Customer Adress1
recipient.setAddress2(shipAdd2);//Customer Adress2
recipient.setAddress3(shipAdd1);//Customer Adress3
}
else if(!"".equalsIgnoreCase(shipAdd2) && shipAdd2.trim().length() > 0)
{
recipient.setAddress1(shipAdd2);//Customer Adress1
recipient.setAddress2(shipAdd1);//Customer Adress2
recipient.setAddress3("");
}
else
{
recipient.setAddress1(shipAdd1);//Customer Adress1
recipient.setAddress2("");//Customer Adress2
recipient.setAddress3("");
}
//Chnaged by Rohan on 21-08-13 for shipAddrs 3 is blank then set address 2.end
//Chnaged by Rohan on 14-07-13 for ship label show address in revers order.end //Chnaged by Rohan on 14-07-13 for ship label show address in revers order.end
recipient.setCity(shipCity);//Customer Adress City recipient.setCity(shipCity);//Customer Adress City
sql = "SELECT T.SERVICE_CODE,S.PACK_SIZE FROM SHIPMENT S,TRANSPORTER T WHERE T.TRAN_CODE = S.TRAN_CODE AND" sql = "SELECT T.SERVICE_CODE,S.PACK_SIZE FROM SHIPMENT S,TRANSPORTER T WHERE T.TRAN_CODE = S.TRAN_CODE AND"
......
...@@ -8468,10 +8468,34 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8468,10 +8468,34 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
shipment2.setID(waveId); shipment2.setID(waveId);
recipient.setID(custCodeDlv);//Customer Code recipient.setID(custCodeDlv);//Customer Code
recipient.setContact(custName);//Customer Name recipient.setContact(custName);//Customer Name
recipient.setCompany(custShName);//Customer Company Name //Chnaged by Rohan on 20-08-13 for set company blank.
recipient.setAddress1(shipAdd1);//Customer Adress1 //recipient.setCompany(custShName);//Customer Company Name
recipient.setCompany("");//Customer Company Name
//Chnaged by Rohan on 21-08-13 for shipAddrs 3 is blank then set address 2.start
/*
recipient.setAddress1(shipAdd3);//Customer Adress1
recipient.setAddress2(shipAdd2);//Customer Adress2 recipient.setAddress2(shipAdd2);//Customer Adress2
recipient.setAddress3(shipAdd3);//Customer Adress3 recipient.setAddress3(shipAdd1);//Customer Adress3
*/
if(!"".equalsIgnoreCase(shipAdd3.trim()) && shipAdd3.trim().length() > 0)
{
recipient.setAddress1(shipAdd3);//Customer Adress1
recipient.setAddress2(shipAdd2);//Customer Adress2
recipient.setAddress3(shipAdd1);//Customer Adress3
}
else if(!"".equalsIgnoreCase(shipAdd2.trim()) && shipAdd2.trim().length() > 0)
{
recipient.setAddress1(shipAdd2);//Customer Adress1
recipient.setAddress2(shipAdd1);//Customer Adress2
recipient.setAddress3("");
}
else
{
recipient.setAddress1(shipAdd1);//Customer Adress1
recipient.setAddress2("");//Customer Adress2
recipient.setAddress3("");
}
//Chnaged by Rohan on 21-08-13 for shipAddrs 3 is blank then set address 2.end
recipient.setCity(shipCity);//Customer Adress City recipient.setCity(shipCity);//Customer Adress City
recipient.setState(stateCodeDlv);//Customer Adress State recipient.setState(stateCodeDlv);//Customer Adress State
Country country = soap.getCountry("ISO3", shipCountry).getResponseCountry(); Country country = soap.getCountry("ISO3", shipCountry).getResponseCountry();
......
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