con733_g_result_queryfields.js 2.33 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7
var override_queryfields = [
		{
			name : 'bp_id',
			queryexpression : "t1.bp_id_tenant=${@bp_id}"
		},
		{
			name : 'bp_name',
stone's avatar
stone committed
8
			queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_tenant and hr.bp_name like '%'||${@bp_name}||'%')"
9 10
		},{
			name : 'bp_id_agent_level1_n',
stone's avatar
stone committed
11
			queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_agent_level1 and hr.bp_name like '%'||${@bp_id_agent_level1_n}||'%')"
Spencer Chang's avatar
Spencer Chang committed
12 13 14 15 16 17 18 19
		},
		{
			name : 'lease_start_date_from',
			queryexpression : "t1.lease_start_date between to_date(${@lease_start_date_from},'yyyy-mm-dd') and nvl(to_date(${@lease_start_date_to},'yyyy-mm-dd'),t1.lease_start_date)"
		},
		{
			name : 'lease_start_date_to',
			queryexpression : "t1.lease_start_date between nvl(to_date(${@lease_start_date_from},'yyyy-mm-dd'),t1.lease_start_date) and to_date(${@lease_start_date_to},'yyyy-mm-dd')"
20 21 22 23 24 25 26 27
		},
		{
			name : 'inception_of_lease_from',
			queryexpression : "t1.inception_of_lease between to_date(${@inception_of_lease_from},'yyyy-mm-dd') and nvl(to_date(${@inception_of_lease_to},'yyyy-mm-dd'),t1.inception_of_lease)"
		},
		{
			name : 'inception_of_lease_to',
			queryexpression : "t1.inception_of_lease between nvl(to_date(${@inception_of_lease_from},'yyyy-mm-dd'),t1.inception_of_lease) and to_date(${@inception_of_lease_to},'yyyy-mm-dd')"
Spencer Chang's avatar
Spencer Chang committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41
		}, {
			field : 'project_id',
			queryoperator : "="
		}, {
			field : 'employee_id',
			queryoperator : "="
		}, {
			field : 'lease_organization',
			queryoperator : "="
		}, {
			field : 'contract_id',
			queryoperator : "="
		}, {
			name : 'contract_number',
stone's avatar
stone committed
42
			queryexpression : "t1.contract_number  like  '%'||${@contract_number}||'%'"
Spencer Chang's avatar
Spencer Chang committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
		}, {
			field : 'lease_channel',
			queryoperator : "="
		}, {
			field : 'document_type',
			queryoperator : "="
		}, {
			field : 'lease_channel',
			queryoperator : "="
		}, {
			field : 'document_type',
			queryoperator : "="
		}, {
			field : 'business_type',
			queryoperator : "="
		}, {
			field : 'contract_status',
			queryoperator : "="
		}, {
			field : 'division',
			queryoperator : "="
stone's avatar
stone committed
64 65 66 67
		}, {
		name : 'contract_name',
		queryexpression : "t1.contract_name  like  '%'||${@contract_name}||'%'"
	    }
Spencer Chang's avatar
Spencer Chang committed
68 69

];
70 71 72 73 74 75
var add_datafilters = [
    {
        name : "con_status",
        expression : "t1.contract_status in ('INCEPT','NEW') "
    }
    ];
Spencer Chang's avatar
Spencer Chang committed
76 77

override();
78
add_datafilter();