Commit 242e7943 authored by manohar's avatar manohar

java-doc comments added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102126 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 808e89f3
...@@ -23,6 +23,20 @@ import ibase.webitm.ejb.sys.UtilMethods; ...@@ -23,6 +23,20 @@ import ibase.webitm.ejb.sys.UtilMethods;
public class DistCommon public class DistCommon
{ {
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
/**
* Returns String tax_chap, tax_class, tax_env, price_list or price_list__clg
*
* @param siteCodeFrom The code of from site
* @param siteCodeTo The code of to site
* @param itemCode The code of the item
* @param tranType The type of transaction
* @param itemSer The division the item belongs to
* @param caseString This can TAX_CHAP, TAX_CLASS, PRICE_LIST, PRICE_LIST__CLG or TAX_ENV
* @param conn Database connection
* @return tax_chap, tax_class, tax_env, price_list or price_list__clg as string based on the
* caseString argument
* @exception ITMException
*/
public String setPlistTaxClassEnv(String siteCodeFrom,String siteCodeTo,String itemCode,String tranType,String itemSer,String caseString,Connection conn)throws ITMException public String setPlistTaxClassEnv(String siteCodeFrom,String siteCodeTo,String itemCode,String tranType,String itemSer,String caseString,Connection conn)throws ITMException
{ {
System.out.println("--------------[setPlistTaxClassEnv]---------------------------------"); System.out.println("--------------[setPlistTaxClassEnv]---------------------------------");
...@@ -1045,6 +1059,16 @@ public class DistCommon ...@@ -1045,6 +1059,16 @@ public class DistCommon
}// setPlistTaxClassEnv }// setPlistTaxClassEnv
//Culculate the trantype value from disparm //Culculate the trantype value from disparm
/**
* Returns the string of disparm variable if not defined returns "NULLFOUND"
*
* @param prdCode The period code ususaaly "999999" (which means applicable to all period)
* @param varName The name of the variable for which the value is to be obtained
* @param conn JDBC Database connection
* @return the string value of the disparm
* @exception ITMException
* @see
*/
public String getDisparams(String prdCode,String varName,Connection conn) public String getDisparams(String prdCode,String varName,Connection conn)
{ {
String retVal = null; String retVal = null;
...@@ -1076,6 +1100,15 @@ public class DistCommon ...@@ -1076,6 +1100,15 @@ public class DistCommon
} }
return(retVal); return(retVal);
}//End of disparm }//End of disparm
/**
* Returns the price list type as a string
*
* @param priceList The price list for which type is to be identified
* @param conn JDBC Database connection
* @return The price list list type as string
* @exception ITMException
* @see
*/
public String getPriceListType(String priceList,Connection conn)throws ITMException public String getPriceListType(String priceList,Connection conn)throws ITMException
{ {
String listType = ""; String listType = "";
...@@ -1111,6 +1144,19 @@ public class DistCommon ...@@ -1111,6 +1144,19 @@ public class DistCommon
//////////////////////////////manazir this has to be change ///////////////////////////////// //////////////////////////////manazir this has to be change /////////////////////////////////
/**
* Returns the rate as double
*
* @param priceList The price list for which type is to be identified
* @param trDate The date on which the price list to be a valid
* @param itemCode The item code for which the rate is to be obtained
* @param aLotNo The batch/lot number
* @param listType The type of the price list
* @param conn JDBC Database connection
* @return the rate as double
* @exception ITMException
* @see
*/
public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,String listType,Connection conn)throws ITMException public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,String listType,Connection conn)throws ITMException
{ {
//System.out.println("--------------[pickRate]---------------------------------"); //System.out.println("--------------[pickRate]---------------------------------");
...@@ -2066,6 +2112,21 @@ public class DistCommon ...@@ -2066,6 +2112,21 @@ public class DistCommon
}//getTokenList() }//getTokenList()
/**
* Returns the rate as double
*
* @param priceList The price list for which type is to be identified
* @param trDate The date on which the price list to be a valid
* @param itemCode The item code for which the rate is to be obtained
* @param aLotNo The batch/lot number
* @param listType The type of the price list
* @param quantity The quantity for which quantity slab to be applied
* @param aunit The unit of measure for which the rate is spscified
* @param conn JDBC Database connection
* @return the rate as double
* @exception ITMException
* @see
*/
public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,String listType,double quantity,String aunit,Connection conn)throws ITMException public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,String listType,double quantity,String aunit,Connection conn)throws ITMException
{ {
//System.out.println("--------------[pickRate]---------------------------------"); //System.out.println("--------------[pickRate]---------------------------------");
...@@ -3221,6 +3282,20 @@ public class DistCommon ...@@ -3221,6 +3282,20 @@ public class DistCommon
return(rate); return(rate);
}//pickRate() }//pickRate()
/**
* Returns the rate as double
*
* @param priceList The price list for which type is to be identified
* @param trDate The date on which the price list to be a valid
* @param itemCode The item code for which the rate is to be obtained
* @param aLotNo The batch/lot number
* @param listType The type of the price list
* @param quantity The quantity for which quantity slab to be applied
* @param conn JDBC Database connection
* @return The rate as double
* @exception ITMException
* @see
*/
public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,String listType,double quantity,Connection conn)throws ITMException public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,String listType,double quantity,Connection conn)throws ITMException
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -4874,6 +4949,18 @@ public class DistCommon ...@@ -4874,6 +4949,18 @@ public class DistCommon
return(rate); return(rate);
}//pickRateGSM() }//pickRateGSM()
/**
* Returns the conversion factor as double
*
* @param unitFrom The unit of measure from which to convert
* @param unitTo The unit of measure to which to convert
* @param itemCode The item code for the conversion to be done
* @param toConvert The value to be convert
* @param conn JDBC Database connection
* @return the converted double value
* @exception ITMException
* @see
*/
public double convQtyFactor(String unitFrom,String unitTo,String itemCode,double toConvert,Connection conn)throws ITMException public double convQtyFactor(String unitFrom,String unitTo,String itemCode,double toConvert,Connection conn)throws ITMException
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -5036,6 +5123,19 @@ public class DistCommon ...@@ -5036,6 +5123,19 @@ public class DistCommon
} }
return newQty; return newQty;
}//convQtyFactor }//convQtyFactor
/**
* Returns the conversion factor and converted value as an ArrayList(0) conversion factor ArraList(1) converted value
*
* @param unitFrom The unit of measure from which to convert
* @param unitTo The unit of measure to which to convert
* @param itemCode The item code for the conversion to be done
* @param toConvert The value to be convert
* @param fact The conversion factor user inputed
* @param conn JDBC Database connection
* @return The conversion factor and converted value as an ArrayList(0) conversion factor ArraList(1) converted value
* @exception ITMException
* @see
*/
public ArrayList getConvQuantityFact(String frUom, String toUom, String forItem, double toConvert, double fact, Connection connectionObject) public ArrayList getConvQuantityFact(String frUom, String toUom, String forItem, double toConvert, double fact, Connection connectionObject)
{ {
String mRound =""; String mRound ="";
...@@ -5154,6 +5254,15 @@ public class DistCommon ...@@ -5154,6 +5254,15 @@ public class DistCommon
return returnValue; return returnValue;
} }
/**
* Returns the rounded value as double
*
* @param newQty The value to be rounded
* @param round The type of rounding to be done (N - No round, R - Near, X - Next and P - Previous)
* @param roundTo The number of decimal paces the rounding to be done (0.01 - 2 decimal, 0.001 - 3 decimal,...)
* @return The rounded value as double
* @see
*/
public double getRndamt(double newQty, String round, double roundTo) public double getRndamt(double newQty, String round, double roundTo)
{ {
double lcMultiply = 1; double lcMultiply = 1;
...@@ -5227,6 +5336,14 @@ public class DistCommon ...@@ -5227,6 +5336,14 @@ public class DistCommon
return newQty; return newQty;
} }
/**
* Returns the rounded value as double
*
* @param actVal The value to be rounded
* @param prec The the number of decimal places
* @return The rounded values
* @see
*/
public double getRequiredDecimal(double actVal, int prec) public double getRequiredDecimal(double actVal, int prec)
{ {
NumberFormat numberFormat = NumberFormat.getIntegerInstance (); NumberFormat numberFormat = NumberFormat.getIntegerInstance ();
...@@ -5392,6 +5509,19 @@ public class DistCommon ...@@ -5392,6 +5509,19 @@ public class DistCommon
return newQty; return newQty;
}//convQtyFactor */ }//convQtyFactor */
/**
* Returns the conversion factor and converted value as an ArrayList(0) conversion factor ArraList(1) converted value
*
* @param unitFrom The unit of measure from which to convert
* @param unitTo The unit of measure to which to convert
* @param itemCode The item code for the conversion to be done
* @param toConvert The value to be convert
* @param fact The conversion factor user inputed
* @param conn JDBC Database connection
* @return The conversion factor and converted value as an ArrayList(0) conversion factor ArraList(1) converted value
* @exception ITMException
* @see
*/
public ArrayList convQtyFactor(String unitFrom,String unitTo,String itemCode,double toConvert,double fact,Connection conn)throws ITMException public ArrayList convQtyFactor(String unitFrom,String unitTo,String itemCode,double toConvert,double fact,Connection conn)throws ITMException
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -5576,6 +5706,16 @@ public class DistCommon ...@@ -5576,6 +5706,16 @@ public class DistCommon
//return newQty; //return newQty;
} }
/**
* Returns the integral quantity item, site and customer combination as per business logic
*
* @param custCode The customer code
* @param itemCode The item code
* @param siteCode The site code
* @param conn JDBC Database connection
* @return The integral quantity as double
* @see
*/
public double getIntegralQty(String custCode,String itemCode ,String siteCode,Connection conn) public double getIntegralQty(String custCode,String itemCode ,String siteCode,Connection conn)
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -5708,6 +5848,18 @@ public class DistCommon ...@@ -5708,6 +5848,18 @@ public class DistCommon
} }
return ret ; return ret ;
} }
/**
* Returns the item series (division) as String
*
* @param itemCode The item code
* @param siteCode The site code
* @param tranDate The date on which the division to be valid
* @param sudryCode The sundry code
* @param sundryType The sundry type
* @param conn JDBC Database connection
* @return The division as String
* @see
*/
public String getItemSer(String itemCode,String siteCode,Timestamp tranDate,String sudryCode,String sundryType,Connection conn) //Added by pankaj 01/09/2009 to return Itemser public String getItemSer(String itemCode,String siteCode,Timestamp tranDate,String sudryCode,String sundryType,Connection conn) //Added by pankaj 01/09/2009 to return Itemser
{ {
String itemSer = null; String itemSer = null;
...@@ -5845,6 +5997,21 @@ public class DistCommon ...@@ -5845,6 +5997,21 @@ public class DistCommon
//added getNoArt from return ArrayList //added getNoArt from return ArrayList
//add new goArt with retur ArrayList //add new goArt with retur ArrayList
/**
* Returns no. of articles, shipper quantity and integral quantity as an ArrayList
*
* @param siteCode The site code
* @param custCode The customer code
* @param itemCode The item code
* @param packCode The packing code
* @param acQty The quantity
* @param type I - Integral and S - Shipper
* @param acShipperQty
* @param acIntegralQty
* @param conn JDBC Database connection
* @return Number of articles, shipper quantity and integral quantity as an ArrayList
* @see
*/
public ArrayList getNoArtAList(String siteCode,String custCode,String itemCode , String packCode, double acQty , char type , double acShipperQty , double acIntegralQty , Connection conn) public ArrayList getNoArtAList(String siteCode,String custCode,String itemCode , String packCode, double acQty , char type , double acShipperQty , double acIntegralQty , Connection conn)
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -6147,6 +6314,21 @@ public class DistCommon ...@@ -6147,6 +6314,21 @@ public class DistCommon
} // end getNoart() } // end getNoart()
// end of getNoArt // end of getNoArt
//start added by alam on 020209 //start added by alam on 020209
/**
* Returns no. of articles as int
*
* @param siteCode The site code
* @param custCode The customer code
* @param itemCode The item code
* @param packCode The packing code
* @param acQty The quantity
* @param type I - Integral and S - Shipper
* @param acShipperQty
* @param acIntegralQty
* @param conn JDBC Database connection
* @return Number of articles, shipper quantity and integral quantity as an ArrayList
* @see
*/
public int getNoArt(String siteCode,String custCode,String itemCode , String packCode, double acQty , char type , double acShipperQty , double acIntegralQty , Connection conn) // Added by Manazir public int getNoArt(String siteCode,String custCode,String itemCode , String packCode, double acQty , char type , double acShipperQty , double acIntegralQty , Connection conn) // Added by Manazir
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -7401,6 +7583,18 @@ public class DistCommon ...@@ -7401,6 +7583,18 @@ public class DistCommon
} }
// migration of method getTacClass on 07/05/09 // migration of method getTacClass on 07/05/09
/**
* Returns tax_class as String
*
* @param supOrCust Supplier or customer (C/S)
* @param suppCode The supplier or customer code
* @param itemCode The item code
* @param siteCodeShip The site code shippment
* @param conn JDBC Database connection
* @return Teh tax class
* @exception ITMException
* @see
*/
public String getTaxClass(String supOrCust ,String suppCode, String itemCode, String siteCodeShip , Connection conn )throws ITMException public String getTaxClass(String supOrCust ,String suppCode, String itemCode, String siteCodeShip , Connection conn )throws ITMException
{ {
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
...@@ -7536,6 +7730,19 @@ public class DistCommon ...@@ -7536,6 +7730,19 @@ public class DistCommon
//migration of method getTaxEnv() on 07/05/09 //migration of method getTaxEnv() on 07/05/09
// getTaxENV // getTaxENV
/**
* Returns tax_env as String
*
* @param stationFrom Station code from
* @param stationTo Station code to
* @param taxChap Tax chapter
* @param taxClass Tax class
* @param siteCodeShip Site code of shippment
* @param conn JDBC Database connection
* @return The tax environment
* @exception ITMException
* @see
*/
public String getTaxEnv(String stationFrom ,String stationTo, String taxChap, String taxClass,String siteCodeShip, Connection conn )throws ITMException public String getTaxEnv(String stationFrom ,String stationTo, String taxChap, String taxClass,String siteCodeShip, Connection conn )throws ITMException
{ {
SimpleDateFormat sdf=null; SimpleDateFormat sdf=null;
...@@ -7820,6 +8027,16 @@ public class DistCommon ...@@ -7820,6 +8027,16 @@ public class DistCommon
// migration of method getCheckTaxEnvStatus() on 07/05/09 // migration of method getCheckTaxEnvStatus() on 07/05/09
/**
* Returns error code if status of tax environment is closed
*
* @param taxEnv Tax environment
* @param currDateTs Current date
* @param conn JDBC Database connection
* @return check the tax environment status and return error code if closed
* @exception ITMException
* @see
*/
public String getCheckTaxEnvStatus(String taxEnv,Timestamp currDateTs,Connection conn )throws ITMException public String getCheckTaxEnvStatus(String taxEnv,Timestamp currDateTs,Connection conn )throws ITMException
{ {
String errorResturn = "",status=""; String errorResturn = "",status="";
...@@ -7863,6 +8080,18 @@ public class DistCommon ...@@ -7863,6 +8080,18 @@ public class DistCommon
//migration of method getTaxChap() on 07/05/09 //migration of method getTaxChap() on 07/05/09
//get taxchap //get taxchap
/**
* Returns tax_chap as String
*
* @param itemCode Item Code
* @param suppOrCustCode Flag to indicate customer or supplier
* @param custCode Customer Code
* @param siteCodeShip Shipping site code
* @param conn JDBC Database connection
* @return check the tax chanpter status and return error code if closed
* @exception ITMException
* @see
*/
public String getTaxChap(String itemCode,String itemSer, String suppOrCustCode,String custCode,String siteCodeShip ,Connection conn )throws ITMException public String getTaxChap(String itemCode,String itemSer, String suppOrCustCode,String custCode,String siteCodeShip ,Connection conn )throws ITMException
{ {
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
...@@ -8001,6 +8230,15 @@ public class DistCommon ...@@ -8001,6 +8230,15 @@ public class DistCommon
} }
return taxChap ; return taxChap ;
} }
/**
* Returns expiry date
*
* @param date Date from which expiry date to be calculated
* @param shelfLife Shelf life in months
* @return expiry date
* @exception Exception
* @see
*/
public java.sql.Timestamp CalcExpiry(java.sql.Timestamp date, double shelfLife) throws Exception public java.sql.Timestamp CalcExpiry(java.sql.Timestamp date, double shelfLife) throws Exception
{ {
UtilMethods utilMethods = UtilMethods.getInstance(); UtilMethods utilMethods = UtilMethods.getInstance();
...@@ -8029,6 +8267,18 @@ public class DistCommon ...@@ -8029,6 +8267,18 @@ public class DistCommon
// added by cpatil on 10/oct/12 start // added by cpatil on 10/oct/12 start
/**
* Returns the rate as double
*
* @param priceList The price list for which type is to be identified
* @param trDate The date on which the price list to be a valid
* @param itemCode The item code for which the rate is to be obtained
* @param aLotNo The batch/lot number
* @param conn JDBC Database connection
* @return the rate as double
* @exception ITMException
* @see
*/
public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,Connection conn)throws ITMException,SQLException public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,Connection conn)throws ITMException,SQLException
{ {
System.out.println("@@@@@--------------[pickRate]--[(String priceList,String trDate,String itemCode,String aLotNo,Connection conn)]-called------------------------------"); System.out.println("@@@@@--------------[pickRate]--[(String priceList,String trDate,String itemCode,String aLotNo,Connection conn)]-called------------------------------");
...@@ -8872,6 +9122,17 @@ public class DistCommon ...@@ -8872,6 +9122,17 @@ public class DistCommon
return(rate); return(rate);
} }
/**
* Returns the rate as double
*
* @param priceList The price list for which type is to be identified
* @param trDate The date on which the price list to be a valid
* @param itemCode The item code for which the rate is to be obtained
* @param conn JDBC Database connection
* @return the rate as double
* @exception ITMException
* @see
*/
public double pickRate(String priceList,String trDate,String itemCode,Connection conn)throws ITMException,SQLException public double pickRate(String priceList,String trDate,String itemCode,Connection conn)throws ITMException,SQLException
{ {
System.out.println("@@@@@--------------[pickRate]--[(String priceList,String trDate,String itemCode,Connection conn)]-called------------------------------"); System.out.println("@@@@@--------------[pickRate]--[(String priceList,String trDate,String itemCode,Connection conn)]-called------------------------------");
......
...@@ -14,6 +14,14 @@ import java.text.SimpleDateFormat; ...@@ -14,6 +14,14 @@ import java.text.SimpleDateFormat;
public class InvAllocTraceBean public class InvAllocTraceBean
{ {
FileWriter f = null; FileWriter f = null;
/**
* Allocates/deallocates stock
*
* @param invallocTraceMap HashMap with allocation details
* @param conn Database connection
* @return Error code if fails
* @exception ITMException
*/
public String updateInvallocTrace(HashMap invallocTraceMap, Connection conn) throws ITMException,Exception public String updateInvallocTrace(HashMap invallocTraceMap, Connection conn) throws ITMException,Exception
{ {
String fileDest = ""; String fileDest = "";
......
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