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
return input;
}
private String errorType( Connection conn , String errorCode )
private String errorType( Connection conn , String errorCode ) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null ;
......@@ -2155,6 +2155,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex); //Added By Mukesh Chauhan on 05/08/19
}
finally
{
......@@ -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("#### commTable ["+commTable+"]");
......@@ -2795,13 +2796,14 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
{
System.out.println("#### Exception in SalesQuotProposal :: getCommision :"+e);
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
}
System.out.println("##### getCommision :: Commision "+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;
String sql = "";
......@@ -2826,6 +2828,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
}
else
......@@ -2846,6 +2849,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (SQLException e)
{
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
return custIdStrBuff.toString();
}
private int getQuantity(Connection connection, String invoiceId)
private int getQuantity(Connection connection, String invoiceId) throws ITMException
{
PreparedStatement pStmt = null;
ResultSet resultSet = null;
......@@ -2897,12 +2901,13 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException 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;
}
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 = "";
Statement mStmt = null;
......@@ -2941,6 +2946,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
{
columnValue = "";
System.out.println("@@@@ Exception in SalesQuotProposal.getDBColumnValue()");
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
finally
{
......@@ -2990,7 +2996,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
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;
ResultSet resultSet = null;
......@@ -3026,11 +3032,12 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e)
{
System.out.println("@@@@@ Exception SalesQuotProposal.getItemData() : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
return itemDetailMap;
}
private double getCostRate(Connection conn, String itemCode)
private double getCostRate(Connection conn, String itemCode) throws ITMException
{
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
......@@ -3158,12 +3165,13 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e)
{
System.out.println("@@@@ Exception SalesQuotProposal :: getCostRate() : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
return costRate;
}
private double getStockDetails(Connection conn, String itemCode)
private double getStockDetails(Connection conn, String itemCode) throws ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -3185,6 +3193,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception 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())
{
......@@ -3311,7 +3320,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
}
//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 .....");
PreparedStatement pStmt = null;
......@@ -3341,6 +3350,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception 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
System.out.println("######## ListType ["+listType+"]");
......@@ -3491,6 +3501,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
finally
{
......@@ -3510,7 +3521,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
}
//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 .....");
......@@ -3548,6 +3559,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
finally
{
......@@ -3565,7 +3577,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return "1";
}
private String getCommission(String custCode, Connection connection)
private String getCommission(String custCode, Connection connection) throws ITMException
{
PreparedStatement pStmt = null;
ResultSet resultSet = null;
......@@ -3590,6 +3602,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
return commTable;
......@@ -3616,7 +3629,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
return retVal;
}
private String getAdditionalCost(Connection conObj)
private String getAdditionalCost(Connection conObj) throws ITMException
{
String additionalCost = "";
PreparedStatement pstmt = null;
......@@ -3638,6 +3651,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch(Exception e)
{
System.out.println("@@@@@ Exception in getAdditionalCost : "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
return additionalCost;
}
......@@ -4317,13 +4331,14 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (SQLException e)
{
System.out.println("@@@@@ Exception in getRate "+e);
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
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;
PreparedStatement pstmt = null;
......@@ -4346,6 +4361,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
catch (SQLException e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
close(rs,pstmt);
System.out.println("####### SLAB NO "+slabNo);
......@@ -4379,7 +4395,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
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();
......@@ -4543,6 +4559,7 @@ public class SalesQuotProposal extends ValidatorEJB implements SalesQuotProposal
} catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
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