Commit 199c44d2 authored by CORP\priyanka.borate's avatar CORP\priyanka.borate

Updated changes for default period code

parent a1827a2a
......@@ -36,6 +36,9 @@ import ibase.utility.UserInfoBean;
import ibase.webitm.ejb.DBAccessEJB;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.text.*;
public class DashboardUtil
{
private String userTranDB = "DEFAULT";
......@@ -968,6 +971,10 @@ public class DashboardUtil
String colName=filterObj.optString("col_name");
String modName=filterObj.optString("mod_name");
String type=filterObj.optString("type");
DateFormat dateFormat = new SimpleDateFormat("yyyyMM");
Date date = new Date();
String prd_code=dateFormat.format(date);
System.out.println("prd_code "+prd_code);
Object defaultValue=filterObj.opt("default_value");
System.out.println("defaultValue::::"+defaultValue);
......@@ -989,6 +996,19 @@ public class DashboardUtil
filterObj.put("default_value",checkNull(empCode).trim()+",");
System.out.println("toget user emp_code => "+filterObj);
}
//TO FETCH PERIOD CODE OF USER LOGGED IN
else if(defaultValue !=null && "CURRENT_PERIOD".equalsIgnoreCase(defaultValue.toString())) {
filterObj.put("default_value",checkNull(prd_code).trim()+",");
System.out.println("toget user prd_codeprd_code => "+filterObj);
}
//TO FETCH EMPCODE CODE OF USER LOGGED IN
else if(defaultValue !=null && "EMP_CODE".equalsIgnoreCase(defaultValue.toString())) {
filterObj.put("default_value",checkNull(empCode).trim()+",");
System.out.println("toget user emp_code => "+filterObj);
}
else if(defaultValue !=null && "LOGIN_CODE".equalsIgnoreCase(defaultValue.toString()))
{
System.out.println("LOGIN_CODE for column value in hcp Cals => "+this.loginCode);
......
......@@ -2,7 +2,7 @@
<Root>
<filters display="Y">
<filter type="1">
<default_value><![CDATA[202002]]></default_value>
<default_value><![CDATA[CURRENT_PERIOD]]></default_value>
<col_name><![CDATA[PRD_CODE]]></col_name>
<col_descr><![CDATA[Period Code]]></col_descr>
<col_id><![CDATA[prdCode]]></col_id>
......
......@@ -12,7 +12,7 @@
<mandatory><![CDATA[Y]]></mandatory>
</filter>
<filter type="1">
<default_value><![CDATA[202002]]></default_value>
<default_value><![CDATA[CURRENT_PERIOD]]></default_value>
<col_name><![CDATA[PRD_CODE]]></col_name>
<col_descr><![CDATA[Period Code]]></col_descr>
<col_id><![CDATA[prdCode]]></col_id>
......
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