Commit 4d6bd4fe authored by kpandey's avatar kpandey

Added PREVIOUS_MONTH to show on load of gst dashboard

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191492 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f97fe25b
package ibase.client;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
......@@ -76,10 +77,16 @@ public class GWTDashBoardReport implements EntryPoint
public void getParameterList(JSONObject metaDataJsnObj)
{
Date date = new Date();
//1
SimpleDateFormat simpleDateFormat= new SimpleDateFormat("MMMM");
//Changes done by KAMAL.P start(02/10/2018)
Date prevMonDate = new Date();
int prevMonth = prevMonDate.getMonth() - 1;
prevMonDate.setMonth(prevMonth);
String previousMonth = simpleDateFormat.format(prevMonDate);
//Changes done by KAMAL.P END(02/10/2018)
String currentMonth = simpleDateFormat.format(date);
//1
MetaDataDtl dataDtl = new MetaDataDtl();
filterList =dataDtl.getFilters(metaDataJsnObj);
int year=0;
......@@ -129,6 +136,13 @@ public class GWTDashBoardReport implements EntryPoint
{
parameterList.add(Window.Location.getParameter(filterInfo.getFieldName()) == null ? currentMonth : Window.Location.getParameter(filterInfo.getFieldName()));
}
//Changes done by KAMAL.P start(02/10/2018)
else if(filterInfo.getColId().equals("PREVIOUS_MONTH"))
{
parameterList.add(Window.Location.getParameter(filterInfo.getFieldName()) == null ? previousMonth : Window.Location.getParameter(filterInfo.getFieldName()));
CommonUtils.printOnConsole("to show parameterList for previous month:: "+parameterList);
}
//Changes done by KAMAL.P END(02/10/2018)
else if(filterInfo.getColId().equals("CURRENT_YEAR"))
{
......
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