Commit 41c14466 authored by mchauhan's avatar mchauhan

Added ITM Exception

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204662 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d4f1d945
...@@ -2135,7 +2135,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2135,7 +2135,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return input; return input;
} }
private String errorType( Connection conn , String errorCode ) private String errorType( Connection conn , String errorCode ) throws ITMException
{ {
String msgType = ""; String msgType = "";
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
...@@ -2155,6 +2155,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2155,6 +2155,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (Exception ex) catch (Exception ex)
{ {
ex.printStackTrace(); ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 05/08/19
} }
finally finally
{ {
...@@ -2742,7 +2743,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2742,7 +2743,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} }
private double getCommision(String commTable, Timestamp currDate, Connection conn, String itemCode) private double getCommision(String commTable, Timestamp currDate, Connection conn, String itemCode) throws ITMException
{ {
System.out.println("#### In getCommision...."); System.out.println("#### In getCommision....");
System.out.println("#### commTable ["+commTable+"]"); System.out.println("#### commTable ["+commTable+"]");
...@@ -2795,13 +2796,14 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2795,13 +2796,14 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
{ {
System.out.println("#### Exception in SalesQuotProposal :: getCommision :"+e); System.out.println("#### Exception in SalesQuotProposal :: getCommision :"+e);
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
} }
System.out.println("##### getCommision :: Commision "+commision); System.out.println("##### getCommision :: Commision "+commision);
return commision; return commision;
} }
private Timestamp getMaxValidity(Connection conn, String comm,String itemCode) private Timestamp getMaxValidity(Connection conn, String comm,String itemCode) throws ITMException
{ {
Timestamp validDate = null; Timestamp validDate = null;
String sql = ""; String sql = "";
...@@ -2826,6 +2828,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2826,6 +2828,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e) } catch (SQLException e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
} }
else else
...@@ -2846,6 +2849,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2846,6 +2849,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (SQLException e) catch (SQLException e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
} }
...@@ -2876,7 +2880,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2876,7 +2880,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return custIdStrBuff.toString(); return custIdStrBuff.toString();
} }
private int getQuantity(Connection connection, String invoiceId) private int getQuantity(Connection connection, String invoiceId) throws ITMException
{ {
PreparedStatement pStmt = null; PreparedStatement pStmt = null;
ResultSet resultSet = null; ResultSet resultSet = null;
...@@ -2897,12 +2901,13 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2897,12 +2901,13 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e) } catch (SQLException e)
{ {
System.out.println("@@@@@ Exception in getQuantity from invoice_trace : "+e); System.out.println("@@@@@ Exception in getQuantity from invoice_trace : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
return totalQuantity; return totalQuantity;
} }
public String getDBColumnValue(String tableName, String columnName, String condition,Connection mConnection) public String getDBColumnValue(String tableName, String columnName, String condition,Connection mConnection) throws ITMException
{ {
String columnValue = ""; String columnValue = "";
Statement mStmt = null; Statement mStmt = null;
...@@ -2941,6 +2946,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2941,6 +2946,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
{ {
columnValue = ""; columnValue = "";
System.out.println("@@@@ Exception in SalesQuotProposal.getDBColumnValue()"); System.out.println("@@@@ Exception in SalesQuotProposal.getDBColumnValue()");
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
finally finally
{ {
...@@ -2990,7 +2996,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -2990,7 +2996,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return retString; return retString;
} }
private Map<String, String> getItemData(String itemCode, Connection conn) private Map<String, String> getItemData(String itemCode, Connection conn) throws ITMException
{ {
PreparedStatement preparedStatement = null; PreparedStatement preparedStatement = null;
ResultSet resultSet = null; ResultSet resultSet = null;
...@@ -3026,11 +3032,12 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3026,11 +3032,12 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e) catch(Exception e)
{ {
System.out.println("@@@@@ Exception SalesQuotProposal.getItemData() : "+e); System.out.println("@@@@@ Exception SalesQuotProposal.getItemData() : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
return itemDetailMap; return itemDetailMap;
} }
private double getCostRate(Connection conn, String itemCode) private double getCostRate(Connection conn, String itemCode) throws ITMException
{ {
PreparedStatement preparedStatement = null; PreparedStatement preparedStatement = null;
ResultSet resultSet = null; ResultSet resultSet = null;
...@@ -3158,12 +3165,13 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3158,12 +3165,13 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e) catch(Exception e)
{ {
System.out.println("@@@@ Exception SalesQuotProposal :: getCostRate() : "+e); System.out.println("@@@@ Exception SalesQuotProposal :: getCostRate() : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
return costRate; return costRate;
} }
private double getStockDetails(Connection conn, String itemCode) private double getStockDetails(Connection conn, String itemCode) throws ITMException
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
...@@ -3185,6 +3193,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3185,6 +3193,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e) catch(Exception e)
{ {
System.out.println("@@@@ Exception in SalesQuotProposal :: getStockDetails :"+e); System.out.println("@@@@ Exception in SalesQuotProposal :: getStockDetails :"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
if(availblStock.isNaN() || availblStock.isInfinite()) if(availblStock.isNaN() || availblStock.isInfinite())
{ {
...@@ -3311,7 +3320,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3311,7 +3320,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} }
//This method called through workflow //This method called through workflow
private void updatePriceList(String priceList, String itemCode, String revisedRate, String chgTerm, String chgUser, Connection connection, String effDate, String validUpto) private void updatePriceList(String priceList, String itemCode, String revisedRate, String chgTerm, String chgUser, Connection connection, String effDate, String validUpto) throws ITMException
{ {
System.out.println("#### updatePriceList ....."); System.out.println("#### updatePriceList .....");
PreparedStatement pStmt = null; PreparedStatement pStmt = null;
...@@ -3341,6 +3350,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3341,6 +3350,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e) catch(Exception e)
{ {
System.out.println("#### Exxception in updatePriceList :: listTypeSql :"+e); System.out.println("#### Exxception in updatePriceList :: listTypeSql :"+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
//Added by AMOL on 06-11-18 END //Added by AMOL on 06-11-18 END
System.out.println("######## ListType ["+listType+"]"); System.out.println("######## ListType ["+listType+"]");
...@@ -3491,6 +3501,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3491,6 +3501,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e) } catch (SQLException e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
finally finally
{ {
...@@ -3510,7 +3521,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3510,7 +3521,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} }
//WrkFlw... //WrkFlw...
public String rejectRate(String quotNo, String userInfo, String xmlData) public String rejectRate(String quotNo, String userInfo, String xmlData) throws ITMException
{ {
System.out.println("###### New Rate Rejeced ....."); System.out.println("###### New Rate Rejeced .....");
...@@ -3548,6 +3559,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3548,6 +3559,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
finally finally
{ {
...@@ -3565,7 +3577,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3565,7 +3577,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return "1"; return "1";
} }
private String getCommission(String custCode, Connection connection) private String getCommission(String custCode, Connection connection) throws ITMException
{ {
PreparedStatement pStmt = null; PreparedStatement pStmt = null;
ResultSet resultSet = null; ResultSet resultSet = null;
...@@ -3590,6 +3602,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3590,6 +3602,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (SQLException e) catch (SQLException e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
return commTable; return commTable;
...@@ -3616,7 +3629,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3616,7 +3629,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return retVal; return retVal;
} }
private String getAdditionalCost(Connection conObj) private String getAdditionalCost(Connection conObj) throws ITMException
{ {
String additionalCost = ""; String additionalCost = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -3638,6 +3651,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -3638,6 +3651,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e) catch(Exception e)
{ {
System.out.println("@@@@@ Exception in getAdditionalCost : "+e); System.out.println("@@@@@ Exception in getAdditionalCost : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
return additionalCost; return additionalCost;
} }
...@@ -4317,13 +4331,14 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -4317,13 +4331,14 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e) } catch (SQLException e)
{ {
System.out.println("@@@@@ Exception in getRate "+e); System.out.println("@@@@@ Exception in getRate "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
return rate; return rate;
} }
private int getMaxSlabNo(Connection conn, String priceList, String itemCode, String listType) private int getMaxSlabNo(Connection conn, String priceList, String itemCode, String listType) throws ITMException
{ {
int slabNo = 0; int slabNo = 0;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -4346,6 +4361,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -4346,6 +4361,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (SQLException e) catch (SQLException e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
} }
close(rs,pstmt); close(rs,pstmt);
System.out.println("####### SLAB NO "+slabNo); System.out.println("####### SLAB NO "+slabNo);
...@@ -4379,7 +4395,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -4379,7 +4395,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
private JSONObject finalSummaryProfitMap = null; private JSONObject finalSummaryProfitMap = null;
public JSONObject getGoodsMap(String custCode, String fromDateStr, String toDateStr) public JSONObject getGoodsMap(String custCode, String fromDateStr, String toDateStr) throws ITMException
{ {
// //
srNoSet = new HashSet(); srNoSet = new HashSet();
...@@ -4543,6 +4559,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal ...@@ -4543,6 +4559,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (Exception e) } catch (Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/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