Commit f7431f4e authored by dpawar's avatar dpawar

return proper error message


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97895 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0c4687b7
...@@ -81,12 +81,12 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -81,12 +81,12 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
{ {
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
boolean isDespatchError = false;
//start new //start new
public String confirm(String tranId, String xtraParam, String forcedFlag) throws RemoteException,ITMException public String confirm(String tranId, String xtraParam, String forcedFlag) throws RemoteException,ITMException
{ {
isDespatchError = false;
String errString = ""; String errString = "";
String sql = "",sSQLUpdatSord = ""; String sql = "",sSQLUpdatSord = "";
String refId = "",proNo = "",tranProNo = ""; String refId = "",proNo = "",tranProNo = "";
...@@ -1526,6 +1526,13 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -1526,6 +1526,13 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
pstmtSord.close(); pstmtSord.close();
pstmtSord = null; pstmtSord = null;
} }
//Added by Dadaso pawar on 21/04/15 [Start]
System.out.println("isDespatchError@@----------->>["+isDespatchError+"]");
if(isDespatchError)
{
errString = itmDBAccessLocal.getErrorString("","VTDESPERR","");
}
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -3397,18 +3404,19 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal, ...@@ -3397,18 +3404,19 @@ public class ShipmentConf extends ActionHandlerEJB implements ShipmentConfLocal,
sql = " UPDATE SHIP_DOCS SET DESP_CONFIRMED = ?, ERROR_MSG = ? WHERE REF_ID = ? "; sql = " UPDATE SHIP_DOCS SET DESP_CONFIRMED = ?, ERROR_MSG = ? WHERE REF_ID = ? ";
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
if( "E".equals(error.get("type").toString())) if( "E".equals(error.get("type").toString()))
{ {
pstmt1.setString(1, "N"); pstmt1.setString(1, "N");
pstmt1.setString(2, error.get("description").toString()); pstmt1.setString(2, error.get("description").toString());
pstmt1.setString(3, refId); pstmt1.setString(3, refId);
//Changed by shankra on 16/08/13 //Changed by shankra on 16/08/13
pstmt1.executeUpdate(); pstmt1.executeUpdate();
isDespatchError = true;
} }
else else
{ {
//Changed by sumit on 20/12/12 updating wave_task_det after despatch get confirmed start. //Changed by sumit on 20/12/12 updating wave_task_det after despatch get confirmed start.
//CHnaged by Rohan on 14-08-13 for update wave task det in case of shipment //CHnaged by Rohan on 14-08-13 for update wave task det in case of shipment
if((!"".equalsIgnoreCase(refSer) || refSer != null) && refSer.trim().length() > 0 && "S-DSP".equalsIgnoreCase(refSer.trim())) if((!"".equalsIgnoreCase(refSer) || refSer != null) && refSer.trim().length() > 0 && "S-DSP".equalsIgnoreCase(refSer.trim()))
{ {
sql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y', WAVE_STATUS = 'V' WHERE REF_ID = ? "; sql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y', WAVE_STATUS = 'V' WHERE REF_ID = ? ";
......
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