public Map getReportTableData(final Map targetTableViewMapObj,final List targetTableList,final String tableName,final String filteredSkus, Map scoreCardRollUpSkuMapObj, final List actualWeeksList,final List forecastWeeksList,final String actualWeeksBuffer,final String weeksForMAxWeekBuffer,final String allWeeksBuffer, final String forecastweeksBuffer,final Integer planningCycleId,final String nextFilterVariable,final String selectedTypeValue,final String business, final String whereClauseStr,final Integer week,final Integer year,final Integer range,final Integer firstIndex,final Integer switchForTotalSelectedTypeValues, final String btbValue,final String targetValue,final String selectedPeriod,final Map targetTablecolorRangeMapObj){
try{
logger.debug("Entered into getReportTableData");
Object object = hibernateTemplate.execute(new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException, SQLException {
InputProperties inputPropertiesUsedInQueries = getInputPropertiesUsedInQueries(PropertiesUtility);
try {
List percentageOfTargetsData= new ArrayList();
String businessTypeCriteria= "";
String commonFilterConditionForForecasting = "";
String timePeriod = "";
String queryForGettingActualValues = null;
String queryForGettingForecastValues = null;
List BTBValues = null;
List percentageOfTargetValues = null;
List actualValues = null;
List forecastValues = null;
if(week!=null && year!=null)
checkProductEndOfLife();
if(!ApplicationUtil.isEmptyOrNull(business))
businessTypeCriteria = constructBusinessTypeCriterias();
commonFilterConditionForForecasting = constructCommonFilterConditionForForecasting(selectedTypeValue,productIdColumn,selectedTypeValue,orderWeek,weeksForMAxWeekBuffer,businessColumn,nextFilterVariable);
timePeriod = getTimePeriodInformation(selectedPeriod);
queryForGettingActualValues = constructQueryForGettingActualValues();
if(!ApplicationUtil.isEmptyOrNull(filteredSkus)){
if(tableName.equalsIgnoreCase("ForecastingUnits")){
queryForGettingForecastValues = constructQueryForGettingForecastedUnitsData(commonFilterConditionForForecasting,timePeriod);
} else if (tableName.equalsIgnoreCase("ForecastingASP")){
queryForGettingForecastValues = constructQueryForGettingForecastedASPData(commonFilterConditionForForecasting,timePeriod);
} else if (tableName.equalsIgnoreCase("ForecastingRevenue")){
queryForGettingForecastValues = constructQueryForGettingForecastedRevenueData(commonFilterConditionForForecasting,timePeriod);
} else if (tableName.equalsIgnoreCase("ForecastingESC")){
queryForGettingForecastValues = constructQueryForGettingForecastedESCData(commonFilterConditionForForecasting,timePeriod);
} else {
queryForGettingForecastValues = constructQueryForGettingForecastingProductMarginData(commonFilterConditionForForecasting,timePeriod);
}
}
actualValues = getActualsData(queryForGettingActualValues);
forecastValues = getForecastData(queryForGettingForecastValues);
BTBList = getBTBData(params);
percentageOfTargetValues = getPercentageOfTargetData(params);
targetTableViewMapObj.add("actualValues",actualValues);
targetTableViewMapObj.add("forecastValues",forecastValues);
targetTableViewMapObj.add("percentageOfTargetList",percentageOfTargetValues);
targetTableViewMapObj.add("BTBList",BTBList);
} catch (HibernateException he) {
throw he;
} catch (ApplicationException e1) {
e1.printStackTrace();
}
return targetTableViewMapObj;
}
});
logger.debug("Leaving from getReportTableData");
return (Map) object;
}catch (Exception e) {
logger.error("Exception Occured :" + e + " at Line no :"+e.getStackTrace()[0].getLineNumber()+" in File: "+e.getStackTrace()[0].getFileName());
throw e;
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.