Commit 7af411ff authored by mchauhan's avatar mchauhan

Added ITM Exception

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204579 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9995661d
...@@ -67,7 +67,8 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -67,7 +67,8 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{ {
System.out.println("Exception :"+this.getClass().getName()+" :process(String xmlString, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":"); System.out.println("Exception :"+this.getClass().getName()+" :process(String xmlString, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
retStr = e.getMessage(); /*retStr = e.getMessage();*/
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
return retStr; return retStr;
} }
...@@ -231,7 +232,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -231,7 +232,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
return errString; return errString;
}// END OF PROCESS(2) }// END OF PROCESS(2)
private HashMap<String, Integer> getItemDetails(String tranIdParent,String itemSer,Connection conn) private HashMap<String, Integer> getItemDetails(String tranIdParent,String itemSer,Connection conn) throws ITMException
{ {
HashMap<String,Integer> itemMap = new HashMap<String,Integer>(); HashMap<String,Integer> itemMap = new HashMap<String,Integer>();
String sql="",itemCode="",itemSerHd=""; String sql="",itemCode="",itemSerHd="";
...@@ -261,11 +262,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -261,11 +262,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{ {
e.printStackTrace(); e.printStackTrace();
itemMap=null; itemMap=null;
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
return itemMap; return itemMap;
} }
public String getItemSerList(String itemser, Connection conn) public String getItemSerList(String itemser, Connection conn) throws ITMException
{ {
String itemSerGrpValue="",itemSerSplit="",resultItemSer=""; String itemSerGrpValue="",itemSerSplit="",resultItemSer="";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -302,11 +304,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -302,11 +304,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{ {
e.printStackTrace(); e.printStackTrace();
} }
throw new ITMException(exception); //Added By Mukesh Chauhan on 02/08/19
} }
return resultItemSer; return resultItemSer;
} }
private HashMap<String, String> getInvoiceDetails(String tranIdParent,Connection conn) private HashMap<String, String> getInvoiceDetails(String tranIdParent,Connection conn) throws ITMException
{ {
HashMap<String,String> invMap = new HashMap<String,String>(); HashMap<String,String> invMap = new HashMap<String,String>();
String sql="",invoiceId="",dlvFlg=""; String sql="",invoiceId="",dlvFlg="";
...@@ -329,12 +332,13 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -329,12 +332,13 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{ {
e.printStackTrace(); e.printStackTrace();
invMap=null; invMap=null;
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
return invMap; return invMap;
} }
private String awacsGenProcess(String itemSer, String posCode,String custCode, String empCode, String prdCode,String tranIdParent, Date tranDate, String loginSiteCode, private String awacsGenProcess(String itemSer, String posCode,String custCode, String empCode, String prdCode,String tranIdParent, Date tranDate, String loginSiteCode,
String fromDateStr, String toDateStr,HashMap invMap,HashMap itemMap, String chgUser, String chgTerm, String xtraParams,UserInfoBean userInfo, Connection conn) String fromDateStr, String toDateStr,HashMap invMap,HashMap itemMap, String chgUser, String chgTerm, String xtraParams,UserInfoBean userInfo, Connection conn) throws ITMException
{ {
boolean result=false; boolean result=false;
CustStockGWTIC custStockGWTIC =new CustStockGWTIC(); CustStockGWTIC custStockGWTIC =new CustStockGWTIC();
...@@ -586,6 +590,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -586,6 +590,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
e.printStackTrace(); e.printStackTrace();
result=false; result=false;
logList.add(e.getMessage()); logList.add(e.getMessage());
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
finally finally
{ {
...@@ -611,7 +616,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -611,7 +616,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
return errString; return errString;
} }
private void callPstRs(PreparedStatement pstmt, ResultSet rs) { private void callPstRs(PreparedStatement pstmt, ResultSet rs) throws ITMException {
try { try {
if(pstmt!=null) if(pstmt!=null)
{ {
...@@ -673,11 +678,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -673,11 +678,12 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
}catch(Exception e) }catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
return retString; return retString;
} }
private void writeLog(String fileName, ArrayList<String> logList,String logDate) private void writeLog(String fileName, ArrayList<String> logList,String logDate) throws ITMException
{ {
String jBossHome = CommonConstants.JBOSSHOME; String jBossHome = CommonConstants.JBOSSHOME;
FileWriter localFileWriter = null; FileWriter localFileWriter = null;
...@@ -701,10 +707,11 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -701,10 +707,11 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
catch (Exception e) catch (Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
} }
private int isCustExist(String prdCode, String custCode, String itemSer, PreparedStatement pstmt, ResultSet rs, Connection conn) private int isCustExist(String prdCode, String custCode, String itemSer, PreparedStatement pstmt, ResultSet rs, Connection conn) throws ITMException
{ {
String sql=""; String sql="";
int custCntr=0; int custCntr=0;
...@@ -727,6 +734,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -727,6 +734,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
{ {
e.printStackTrace(); e.printStackTrace();
System.out.println("custCnt SQLException"+e); System.out.println("custCnt SQLException"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
finally finally
{ {
...@@ -751,7 +759,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -751,7 +759,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
return custCntr; return custCntr;
} }
private String getTranIdLast(String orderType, String itemSer,String custCode,Connection conn) private String getTranIdLast(String orderType, String itemSer,String custCode,Connection conn) throws ITMException
{ {
String sql="",tranIdLast=""; String sql="",tranIdLast="";
PreparedStatement pstmt=null; PreparedStatement pstmt=null;
...@@ -795,6 +803,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac ...@@ -795,6 +803,7 @@ public class AwacsToES3Prc extends ProcessEJB implements AwacsToES3PrcLocal,Awac
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 02/08/19
} }
finally finally
{ {
......
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