Commit fb87419b authored by panhong18943's avatar panhong18943

Merge remote-tracking branch 'origin/master'

parents 0d4cfabe 3264cd1e
......@@ -22,6 +22,9 @@ values ('CONTRACT', 'CON_CONTRACT_REPO_MODIFY_LV', 'VIEW', -1, sysdate, -1, sysd
insert into HLS_DOC_CATEGORY_DB_OBJECT (DOCUMENT_CATEGORY, OBJECT_NAME, OBJECT_TYPE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
values ('CONTRACT', 'CON_CONTRACT_CCR_Q_LV', 'VIEW', -1, sysdate, -1, sysdate);
insert into HLS_DOC_CATEGORY_DB_OBJECT (DOCUMENT_CATEGORY, OBJECT_NAME, OBJECT_TYPE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE)
values ('CONTRACT', 'con_contract_history_lv', 'VIEW', -1, sysdate, -1, sysdate);
end;
/
commit;
......
......@@ -9,6 +9,9 @@ set define off
begin
sys_function_assign_pkg.func_bm_load('ZJWFL5110','zjwfl.ZJWFL5110.cus_zj_wfl_instance_node_recipient');
sys_function_assign_pkg.func_bm_load('ZJWFL5110','basic.hls_bp_master_v_for_agent_lov');
sys_function_assign_pkg.func_bm_load('acr.ACR515.acr515_invoice_hd_v','acr.ACR515.acr515_invoice_hd_v');
end;
/
......
......@@ -4,7 +4,7 @@
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
SELECT vv.*,(select v.code_value_name value_name from sys_code_values_v v where v.code ='YES_NO' and v.code_value = vv.rl_flag) rl_flag_n
FROM (select t2.journal_line_id,
t2.journal_header_id,
cc.company_id,
......@@ -78,7 +78,19 @@
cc.termination_date,
cc.lease_channel,
t2.cf_direction,
t2.billing_status,
nvl(t2.billing_status,'NOT') billing_status,
(select v.code_value_name value_name from sys_code_values_v v where v.code ='CON_BILLING_STATUS' and v.code_value = nvl(t2.billing_status,'NOT')) billing_status_n,
case when acr_invoice_pkg.check_rl_cf_flag(cc.contract_id,t2.cf_item,t2.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'Y'
then
'Y'
when acr_invoice_pkg.check_rl_cf_flag(cc.contract_id,t2.cf_item,t2.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'N'
then
'N'
else
''
end rl_flag,
t2.cf_status,
cc.business_type,
(SELECT bt.description
......@@ -132,7 +144,7 @@
trunc(t2.due_date) < trunc(cc.CCR_LEASE_DATE))
--合同状态为解约回购中、解约回购完成的合同
or (cc.contract_status in ('REPUR', 'REPURING') and(
trunc(t2.due_date) < trunc(cc.REPURCHASE_DATE) or t2.je_transaction_code='CON_REPURCHASE' ) )
trunc(t2.due_date) < trunc(cc.REPURCHASE_DATE) or t2.je_transaction_code='CON_REPURCHASE') or (t2.document_type = 'REPUR_CHAG'and t2.write_off_flag = 'FULL' ) ) --update by xsh35973 添加解约回购提前结清完全核销数据
--合同状态为起租→开票对象:非深圳美鹏HCS小规模纳税人(自然人)→暂不开票→按季度展示未开票现金流
or
(cc.contract_status = 'INCEPT' and
......@@ -324,7 +336,8 @@
<bm:query-field name="invoice_method" queryExpression="vv.invoice_method = ${@invoice_method}"/>
<bm:query-field name="division" queryExpression="vv.division = ${@division}"/>
<bm:query-field name="invoice_type" queryExpression="vv.invoice_type = ${@invoice_type}"/>
<bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/>
<bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/>
......
......@@ -37,9 +37,10 @@
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="cf_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="rl_flag"/>
<bm:field name="business_type" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -56,12 +57,13 @@
where m.bp_id =t.bp_id) billing_object_name,
t.due_amount,
-- t.billing_amount,
/*-- t.billing_amount,
(case when cf.cf_item= 1 and cf.cf_status='BLOCK' then
t.received_amount-nvl(t.cf_billing_amount,0)
else
t.due_amount-nvl(t.cf_billing_amount,0)
end )billing_amount,
end )billing_amount,*/
t.billing_amount,
t.cf_billing_amount,
t.received_amount,
t.contract_id,
......@@ -101,6 +103,18 @@
from sys_code_values_v v
where v.code = 'ACR512_INVOICE_KIND_TYPE'
and v.code_value = t.invoice_kind_type) invoice_kind_type_n
, case when acr_invoice_pkg.check_rl_cf_flag(con.contract_id,cf.cf_item,cf.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(con.contract_id) = 'Y'
then
'Y'
when acr_invoice_pkg.check_rl_cf_flag(con.contract_id,cf.cf_item,cf.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(con.contract_id) = 'N'
then
'N'
else
''
end rl_flag,
con.business_type
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf,
......
......@@ -37,14 +37,14 @@
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
and PARENT_UNIT_ID <> 1544
AND v.code_value IN ('10', '20', '30', '40','50','70','80'))
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'DIVISION'
AND v.code_value IN ('10', '20', '30', '40','50','70','80')
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90')
AND NOT EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
......
......@@ -3,39 +3,59 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t
WHERE t.record_id = ${/parameter/@record_id}
AND t.invoice_type = 'PAPER'
AND v.code_value IN ('PAPER_GENERAL','PAPER_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS (SELECT 1
FROM acr_invoice_create_tmp t
WHERE t.record_id = ${/parameter/@record_id}
AND t.invoice_type = 'ECT'
AND v.code_value IN ('ELECTRONIC_GENERAL','ELECTRONIC_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS (SELECT 1
FROM acr_invoice_create_tmp t
WHERE t.record_id = ${/parameter/@record_id}
AND t.invoice_type not in('PAPER','ECT')
AND v.code_value IN ('RECEIPT'))
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
and cc.contract_id=t.contract_id
AND cc.business_type !='LEASEBACK'
AND t.invoice_type = 'PAPER'
AND v.code_value IN ('PAPER_GENERAL', 'PAPER_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
AND cc.business_type !='LEASEBACK'
AND t.invoice_type = 'ECT'
and cc.contract_id=t.contract_id
AND v.code_value IN ('ELECTRONIC_GENERAL','ELECTRONIC_SPECIAL'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS (SELECT 1
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
AND cc.business_type !='LEASEBACK'
AND t.invoice_type not in ('PAPER', 'ECT')
and cc.contract_id=t.contract_id
AND v.code_value IN ('RECEIPT'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'ACR512_INVOICE_KIND_TYPE'
AND EXISTS
(SELECT 1
FROM acr_invoice_create_tmp t,con_contract cc
WHERE t.record_id = ${/parameter/@record_id}
and cc.contract_id=t.contract_id
AND cc.business_type='LEASEBACK'
AND v.code_value IN ('PAPER_GENERAL','ELECTRONIC_GENERAL'))
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lijingjing
$Date: 2018-11_03 上午11:00:06
$Revision: 3.0
$Purpose:
-->
<!--
$Author: lijingjing
$Date: 2018-11_03 上午11:00:06
$Revision: 3.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_check_pkg.check_prj_lease_item(
p_project_id =>${@project_id},
p_machine_number =>${@machine_number},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operation>
</bm:operations>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
contract_phone_change.phone_commit(p_contract_id => ${@contract_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select v.user_id,
v.user_name,
v.description authorized_user_desc,
v.employee_code,
v.employee_name
from sys_user_v v
where
v.user_id = ${/session/@user_id}
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
business_daily_pkg.business_daily_bmp(
p_file_path =>${@p_file_path},
p_file_name =>${@p_file_name},
p_file_size =>${@p_file_size},
p_user_id =>${@p_user_id}
);
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" dataSourceName="u8" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select v.parameter_value
from sys_parameter_values v,sys_parameters p
where v.module_id = p.module_id
and p.parameter_code ='${:@parameter_code}'
and v.parameter_id = p.parameter_id
and v.level_id = 101
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select v.parameter_value
from sys_parameter_values v,sys_parameters p
where v.module_id = p.module_id
and p.parameter_code ='${:@parameter_code}'
and v.parameter_id = p.parameter_id
and v.level_id = 101
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="parameter_value"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select (select nvl(sum(nvl(ci.set_number, 1)), 0)
from con_contract cc, con_contract_lease_item ci
where cc.lease_start_date = TRUNC(sysdate )
and ci.contract_id = cc.contract_id
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL') day_num, --日台数
nvl((select to_char(round(sum(nvl(cc.total_rental, 0)) +
sum(nvl(cc.residual_value, 0)),2),'fm99999999999990.00')
from con_contract cc
where cc.lease_start_date = TRUNC(sysdate )
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL'),
0) day_money, --日金额
(select nvl(sum(nvl(ci.set_number, 1)),0)
from con_contract cc, con_contract_lease_item ci
where cc.lease_start_date between trunc(sysdate, 'mm') and
trunc(sysdate)
and ci.contract_id = cc.contract_id
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL') month_num, --月数量
nvl((select to_char(round(sum(nvl(cc.total_rental, 0)) +
sum(nvl(cc.residual_value, 0)),2),'fm99999999999990.00')
from con_contract cc
where cc.lease_start_date between trunc(sysdate, 'mm') and
trunc(sysdate)
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL'),
0) month_money, --月金额
case
when trunc(sysdate) >
to_date(to_char(sysdate, 'yyyy') || '0331', 'yyyymmdd') then
(select sum(nvl(ci.set_number, 1))
from con_contract cc, con_contract_lease_item ci
where cc.lease_start_date between
to_date(to_char(sysdate, 'yyyy') || '0401', 'yyyymmdd') and
to_date(to_char(add_months(sysdate, 12), 'yyyy') || '0331',
'yyyymmdd')
and ci.contract_id = cc.contract_id
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL')
else
(select sum(nvl(ci.set_number, 1))
from con_contract cc, con_contract_lease_item ci
where cc.lease_start_date between
to_date(to_char(add_months(sysdate, -12), 'yyyy') ||
'0401',
'yyyymmdd') and
to_date(to_char(sysdate, 'yyyy') || '0331', 'yyyymmdd')
and cc.contract_status = 'INCEPT'
and ci.contract_id = cc.contract_id
and cc.data_class = 'NORMAL')
end as year_num, --年台数
(case
when trunc(sysdate) >
to_date(to_char(sysdate, 'yyyy') || '0331', 'yyyymmdd') then
(select to_char(round(sum(nvl(cc.total_rental, 0)) +
sum(nvl(cc.residual_value, 0)),2),'fm99999999999990.00')
from con_contract cc
where cc.lease_start_date between
to_date(to_char(sysdate, 'yyyy') || '0401', 'yyyymmdd') and
to_date(to_char(add_months(sysdate, 12), 'yyyy') || '0331',
'yyyymmdd')
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL')
else
(select to_char(round(sum(nvl(cc.total_rental, 0)) +
sum(nvl(cc.residual_value, 0)),2),'fm99999999999990.00')
from con_contract cc
where cc.lease_start_date between
to_date(to_char(add_months(sysdate, -12), 'yyyy') ||
'0401',
'yyyymmdd') and
to_date(to_char(sysdate, 'yyyy') || '0331', 'yyyymmdd')
and cc.contract_status = 'INCEPT'
and cc.data_class = 'NORMAL')
end) year_money, --年金额
(select nvl(sum(nvl(ci.set_number, 1)), 0)
from con_contract cc, con_contract_lease_item ci
where (cc.contract_status in ('INCEPT', 'REPURING', 'ETING') or
(cc.contract_status = 'PENDING' and cc.project_id is not null and
exists
(select 1
from zj_wfl_workflow_instance_v zw,
ZJ_WFL_WORKFLOW_INSTANCE_PARA zi,
zj_wfl_workflow_type_parameter zp
where zw.workflow_code = 'CONTRACT_INCEPT_WFL'
and zw.instance_status = '10'
and zi.workflow_type_para_id = zp.workflow_type_para_id
and zp.parameter_code = 'CONTRACT_ID'
and zw.instance_id = zi.instance_id
and to_char(cc.contract_id) = zi.parameter_value))or
(cc.contract_status = 'PENDING' and
cc.project_id is null))
and ci.contract_id = cc.contract_id
and cc.lease_start_date <= TRUNC(sysdate )
and cc.data_class = 'NORMAL') all_num, --昨日资产台数
nvl((select to_char(round(sum(ccc.due_amount) - sum(nvl(ccc.received_amount, 0)),2),'fm99999999999990.00')
from con_contract_cashflow ccc
where ccc.contract_id in
(select cc.contract_id
from con_contract cc
where (cc.contract_status in
('INCEPT', 'REPURING', 'ETING') or
(cc.contract_status = 'PENDING' and
cc.project_id is not null and exists
(select 1
from zj_wfl_workflow_instance_v zw,
ZJ_WFL_WORKFLOW_INSTANCE_PARA zi,
zj_wfl_workflow_type_parameter zp
where zw.workflow_code = 'CONTRACT_INCEPT_WFL'
and zw.instance_status = '10'
and zi.workflow_type_para_id =
zp.workflow_type_para_id
and zp.parameter_code = 'CONTRACT_ID'
and zw.instance_id = zi.instance_id
and to_char(cc.contract_id) =
zi.parameter_value))or
(cc.contract_status = 'PENDING' and
cc.project_id is null))
and cc.lease_start_date <= TRUNC(sysdate)
and cc.data_class = 'NORMAL')
and ccc.cf_status = 'RELEASE'
and ccc.cf_item in (1, 8, 9,250,200,11)),
0) all_money --昨日资产金额
from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select to_char(t.bp_birth, 'yyyy-mm-dd') bp_birth,
t.BP_MARRIAGE,
bp_marriage_n,
t.BP_HEALTH,
t.BP_HEALTH_n,
t.BP_BORN,
t.BP_BORN_n,
t.PROPERTY_BELONG,
t.PROPERTY_BELONG_n,
t.OWN_PROPERTY_ADDRESS,
t.HOUSE_AREA,
t.HOUSE_VALUE,
t.OWN_MONEY,
t.BANK_CREDIT_APPROVAL,
t.BANK_CREDIT_APPROVAL_n,
t.OTHER_OWN_ASSETS,
t.FAMILY_SOURCE_INCOME,
t.FAMILY_AVG_INCOME,
t.FAMILY_MONTH_AVG_OUTCOME,
t.BANK_LOAN,
t.OTHER_LOAN,
t.FIXED_ASSETS,
t.CAPITAL,
t.CAPITAL_PLACE,
t.CAR_TYPE,
t.CAR_BRAND,
t.CAR_NUM,
t.CAR_BUY_DATE,
t.CAR_BUY_MONEY,
t.WORK_EXPERIENCE,
t.WORK_EXPERIENCE_n,
t.WORK_OPERATOR,
t.WORK_OPERATOR_n,
t.WORK_TYPE,
t.WORK_TYPE_n,
t.WORK_AVG_MONTH_INCOME,
t.WORK_AVG_MONTH_OUTCOME,
t.OTHER_DESCRIPTION,
t.PAYMENT_SOURCE,
t.E_PLACE,
t.E_CONTRACT_AMOUNT,
t.CONTRACT_COPY,
t.CONTRACT_COPY_n,
t.E_CON_AUTHENTICITY,
t.E_CON_AUTHENTICITY_n,
t.SURVEY_FIT,
t.SURVEY_FIT_n,
t.DAILY_CREDIT,
t.DAILY_CREDIT_n,
t.BORROW_SITUATION,
t.BORROW_SITUATION_n,
t.RENT_REPAYMENT,
t.RENTAL_BALANCE,
t.LIQUIDATED_DAMAGES,
t.GUAR_MORTGAGE_STATUS,
t.GUAR_MORTGAGE_STATUS_n,
t.PAST_CONT_EXE_STATUS,
t.PAST_CONT_EXE_STATUS_n,
t.INDUSTRY_JUDGEMENT,
t.INDUSTRY_JUDGEMENT_n,
t.THIRD_PARTY_GUARANTEE,
t.THIRD_PARTY_GUARANTEE_n,
t.THIRD_PARTY_CREDIBILITY,
t.THIRD_PARTY_CREDIBILITY_n,
t.E_PLACE_n,
t.BP_AGE,
t.score_name,
t.third_guar_score
from (select a.*
from (select t1.bp_birth,
t1.BP_MARRIAGE,
t1.bp_marriage_n,
t1.BP_HEALTH,
t1.BP_HEALTH_n,
t1.BP_BORN,
t1.BP_BORN_n,
t1.PROPERTY_BELONG,
t1.PROPERTY_BELONG_n,
t1.OWN_PROPERTY_ADDRESS,
t1.HOUSE_AREA,
t1.HOUSE_VALUE,
t1.OWN_MONEY,
t1.BANK_CREDIT_APPROVAL,
t1.BANK_CREDIT_APPROVAL_n,
t1.OTHER_OWN_ASSETS,
t1.FAMILY_SOURCE_INCOME,
t1.FAMILY_AVG_INCOME,
t1.FAMILY_MONTH_AVG_OUTCOME,
t1.BANK_LOAN,
t1.OTHER_LOAN,
t1.FIXED_ASSETS,
t1.CAPITAL,
t1.CAPITAL_PLACE,
t1.CAR_TYPE,
t1.CAR_BRAND,
t1.CAR_NUM,
t1.CAR_BUY_DATE,
t1.CAR_BUY_MONEY,
t1.WORK_EXPERIENCE,
t1.WORK_EXPERIENCE_n,
t1.WORK_OPERATOR,
t1.WORK_OPERATOR_n,
t1.WORK_TYPE,
t1.WORK_TYPE_n,
t1.WORK_AVG_MONTH_INCOME,
t1.WORK_AVG_MONTH_OUTCOME,
t1.OTHER_DESCRIPTION,
t1.PAYMENT_SOURCE,
t1.E_PLACE,
t1.E_CONTRACT_AMOUNT,
t1.CONTRACT_COPY,
t1.CONTRACT_COPY_n,
t1.E_CON_AUTHENTICITY,
t1.E_CON_AUTHENTICITY_n,
t1.SURVEY_FIT,
t1.SURVEY_FIT_n,
t1.DAILY_CREDIT,
t1.DAILY_CREDIT_n,
t1.BORROW_SITUATION,
t1.BORROW_SITUATION_n,
t1.RENT_REPAYMENT,
t1.RENTAL_BALANCE,
t1.LIQUIDATED_DAMAGES,
t1.GUAR_MORTGAGE_STATUS,
t1.GUAR_MORTGAGE_STATUS_n,
t1.PAST_CONT_EXE_STATUS,
t1.PAST_CONT_EXE_STATUS_n,
t1.INDUSTRY_JUDGEMENT,
t1.INDUSTRY_JUDGEMENT_n,
t1.THIRD_PARTY_GUARANTEE,
t1.THIRD_PARTY_GUARANTEE_n,
t1.THIRD_PARTY_CREDIBILITY,
t1.THIRD_PARTY_CREDIBILITY_n,
t1.E_PLACE_n,
t1.BP_AGE,
t1.score_name,
t1.third_guar_score,
t1.tj_score
from bp_tenant_rate_detail_v t1
where exists
(select 1
from prj_project p
where p.project_id = t1.PROJECT_ID
and p.bp_id_tenant = ${@bp_id}
and p.project_status not in ('CLOSED'))
order by t1.project_id desc) a
where rownum = 1
union
SELECT h.date_of_birth bp_birth,
h.marital_status bp_marriage,
(SELECT code_value_name
FROM sys_code_values_v
WHERE code LIKE 'MARITAL_STATUS'
AND code_value_enabled_flag = 'Y'
AND code_value = h.marital_status) bp_marriage_n,
null BP_HEALTH,
null BP_HEALTH_n,
null BP_BORN,
null BP_BORN_n,
null PROPERTY_BELONG,
null PROPERTY_BELONG_n,
null OWN_PROPERTY_ADDRESS,
null HOUSE_AREA,
null HOUSE_VALUE,
null OWN_MONEY,
null BANK_CREDIT_APPROVAL,
null BANK_CREDIT_APPROVAL_n,
null OTHER_OWN_ASSETS,
null FAMILY_SOURCE_INCOME,
null FAMILY_AVG_INCOME,
null FAMILY_MONTH_AVG_OUTCOME,
null BANK_LOAN,
null OTHER_LOAN,
null FIXED_ASSETS,
null CAPITAL,
null CAPITAL_PLACE,
null CAR_TYPE,
null CAR_BRAND,
null CAR_NUM,
null CAR_BUY_DATE,
null CAR_BUY_MONEY,
null WORK_EXPERIENCE,
null WORK_EXPERIENCE_n,
null WORK_OPERATOR,
null WORK_OPERATOR_n,
h.industry work_type,
(SELECT code_value_name
FROM sys_code_values_v
WHERE code LIKE 'INDUSTRY_HL'
AND code_value_enabled_flag = 'Y'
AND code_value = h.industry) WORK_TYPE_n,
null WORK_AVG_MONTH_INCOME,
null WORK_AVG_MONTH_OUTCOME,
null OTHER_DESCRIPTION,
null PAYMENT_SOURCE,
null E_PLACE,
null E_CONTRACT_AMOUNT,
null CONTRACT_COPY,
null CONTRACT_COPY_n,
null E_CON_AUTHENTICITY,
null E_CON_AUTHENTICITY_n,
null SURVEY_FIT,
null SURVEY_FIT_n,
null DAILY_CREDIT,
null DAILY_CREDIT_n,
null BORROW_SITUATION,
null BORROW_SITUATION_n,
null RENT_REPAYMENT,
null RENTAL_BALANCE,
null LIQUIDATED_DAMAGES,
null GUAR_MORTGAGE_STATUS,
null GUAR_MORTGAGE_STATUS_n,
null PAST_CONT_EXE_STATUS,
null PAST_CONT_EXE_STATUS_n,
null INDUSTRY_JUDGEMENT,
null INDUSTRY_JUDGEMENT_n,
null THIRD_PARTY_GUARANTEE,
null THIRD_PARTY_GUARANTEE_n,
null THIRD_PARTY_CREDIBILITY,
null THIRD_PARTY_CREDIBILITY_n,
null E_PLACE_n,
null BP_AGE,
DECODE(h.bp_class, 'NP',h.bp_name, 'ORG', h.legal_person) score_name,
null third_guar_score,
null tj_score
FROM hls_bp_master h
where h.bp_id = ${@bp_id}) t
where rownum = 1
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -150,10 +150,25 @@
WHERE
t.bp_id_tenant = b.bp_id(+) AND
t.contract_status = 'INCEPT' AND
t.contract_status in ('INCEPT','REPURING') AND
t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type
and (t.bp_id_agent_level1 = (select t.bp_id from sys_user s, exp_employees e, exp_employee_assigns a, exp_org_position pp,hls_bp_master t
where a.position_id = pp.position_id
and a.employee_id = e.employee_id
and s.employee_id = e.employee_id
and pp.unit_id = t.unit_id
and a.enabled_flag = 'Y'
and e.enabled_flag = 'Y'
and a.primary_position_flag = 'Y'
and pp.enabled_flag = 'Y'
and t.bp_type = 'AGENT'
and s.user_id = ${/session/@user_id}) or not exists (select 1
from sys_user_role_groups g, sys_role r
where g.role_id = r.role_id
and g.user_id = ${/session/@user_id}
and r.role_code in ('0018','0019')
and trunc(sysdate) <= nvl(g.end_date, trunc(sysdate))))
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
@Author: xsh 35973
@Date: 2022/6/13 13:59
@Revision: 1.0
@Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="contract_status"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select contract_status from con_contract t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
cus_con_et_pkg.check_cashflow_write_off(p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="contract_id"/>
<bm:field name="contract_number" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NUMBER"/>
<bm:field name="contract_name" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NAME" displayWidth="350"/>
<bm:field name="bp_id_tenant"/>
<bm:field name="bp_name"/>
<bm:field name="bp_id_agent_level1"/>
<bm:field name="bp_id_agent_level1_n"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select cc.contract_id,
cc.contract_number,
cc.contract_name,
cc.bp_id_agent_level1,
(SELECT hb.bp_name
FROM hls_bp_master hb
WHERE hb.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(SELECT hb.bp_name
FROM hls_bp_master hb
WHERE hb.bp_id = cc.bp_id_tenant) bp_name
from con_contract cc
where cc.data_class = 'NORMAL'
and acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'Y') t1
#WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field field="contract_number" queryOperator="like"/>
<!--<bm:query-field name="bp_id_agent_level1" queryExpression="((t1.bp_id_agent_level1=${@bp_id_agent_level1}) or exists (select 1 from con_contract_lease_item ccli,hls_lease_item hli where ccli.lease_item_id=hli.lease_item_id and hli.vender_id=${@bp_id_agent_level1} and t1.contract_id=ccli.contract_id))"/>-->
<bm:query-field field="bp_id_tenant" queryExpression="t1.bp_id_tenant=${@bp_id_tenant}" />
<bm:query-field name="contract_name" queryExpression="t1.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -100,6 +100,13 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type = 'REFUND_ENTRY' and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:field name="return_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from hls_journal_header h,csh_transaction ct where h.source_table = 'CSH_TRANSACTION' and h.source_id = ct.transaction_id and ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:field name="tenant_account_id" forInsert="false" forUpdate="false" expression="(select cc.bank_account_id from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="tenant_account_num" forInsert="false" forUpdate="false" expression="(select ha.bank_account_num from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_account_name" forInsert="false" forUpdate="false" expression="(select ha.bank_account_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_bank_name" forInsert="false" forUpdate="false" expression="(select ha.bank_full_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="return_date" forInsert="false" forUpdate="false" expression="(select listagg(to_char(ct.transaction_date,'yyyy-mm-dd'), ',') WITHIN group(order by ct.transaction_date) from csh_transaction ct where ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -109,7 +116,7 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} and t1.posted_flag=&apos;Y&apos; and t1.reversed_flag=&apos;N&apos; and returned_flag not in ( &apos;RETURN&apos;) and t1.transaction_type in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;) and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)&lt;=t1.transaction_amount)) "/>
<!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<!-- <bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;) and t1.write_off_flag in(&apos;NOT&apos;,&apos;PARTIAL&apos;))"/>-->
<bm:data-filter name="query" expression="(t1.confirmed_flag not in (&apos;ACCAUDITING&apos;,&apos;NEW&apos;,&apos;CT_REJECTED&apos;))"/>
</bm:data-filters>
<bm:query-fields>
......
......@@ -17,7 +17,22 @@
(select u.employee_name
from sys_user_v u
where u.user_id = r.created_by) user_desc,
t.transaction_num
t.transaction_num,
(SELECT listagg(h.sbo_num,',') within group (order by h.source_id)
from hls_journal_header h
WHERE r.return_transaction_id = h.source_id
and h.source_table = 'CSH_TRANSACTION') sbo_num,
(SELECT h.sbo_num
from csh_transaction ct, csh_write_off cw, hls_journal_header h
WHERE r.transaction_id = ct.transaction_id
and ct.source_doc_type = cw.write_off_type
and ct.source_doc_id = cw.write_off_id
and h.source_table = 'CSH_TRANSACTION'
and h.source_id = cw.csh_transaction_id
and exists (select 1
from hls_journal_detail d
where h.journal_header_id = d.journal_header_id
and cw.write_off_id = d.cashflow_id)) receipt_sbo_num
FROM csh_transaction_return r,
csh_transaction t
--hls_bp_master_bank_account v
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-24 下午2:19:04
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t.*
from exp_org_position_vl t
WHERE t.POSITION_ID in
(SELECT t.POSITION_ID
FROM exp_employee_assigns t
where t.employee_id =
(SELECT t.employee_id FROM sys_user t where t.user_id = ${/session/@user_id}))
and t.position_code='012'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select count(1) trans_review_number
from csh_transaction_contemp t,con_contract cc
where (t.trans_review_status ='REVIEWING'
or t.trans_review_status ='REVIEWING1')
and cc.contract_id = t.source_contract_id
and cc.data_class = 'NORMAL'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="trans_review_number"></bm:field>
</bm:fields>
</bm:model>
......@@ -174,5 +174,6 @@
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
<bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -108,7 +108,7 @@ end;
<bm:field name="unreceived_amount" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="left_principal" expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="left_interest" expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="unreceived_penalty" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9)" forInsert="false" forUpdate="false"/>
<bm:field name="unreceived_penalty" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9 and cf_status = 'RELEASE')" forInsert="false" forUpdate="false"/>
<bm:field name="agent_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="agent_id_desc" expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)" forUpdate="false" forInsert="false"/>
<bm:field name="write_off_classification" lookupField="write_off_classification_desc" lookupCode="DS_CSH_WRITE_OFF_CLASSIFICATION" databaseType="VARCHAR2" datatype="java.lang.String" />
......
......@@ -53,7 +53,15 @@
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="CSH511.CSH_TRANSACTION.GLD_INTERFACE_FLAG"/>
<bm:field name="bp_code" expression="(select d.bp_code from hls_bp_master_v d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" expression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="bp_name" expression="(select d.bp_name
from hls_bp_master_v d
where d.bp_id = (case
when ( SELECT c.division
FROM con_contract c
WHERE c.contract_id = t1.ref_contract_id) = '70' then
(SELECT cc.bp_id_agent_level1
FROM con_contract cc
WHERE cc.contract_id = t1.ref_contract_id) else t1.bp_id end))" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="unit_id" expression="(select d.unit_id from hls_bp_master d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false"/>
<bm:field name="payment_method_display" expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)" forInsert="false" forUpdate="false" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="currency_name" expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)" forInsert="false" forUpdate="false" prompt="HLS.CURRENCY"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WW
$Date: 2014-11-13 下午5:36:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t1.user_id,t1.user_name FROM sys_user t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t1.user_id=${@user_id}"/>
</bm:query-fields>
</bm:model>
......@@ -109,7 +109,16 @@
}
}
}
function remove_query_field(name) {
importClass(Packages.uncertain.composite.CompositeUtil);
var qf_root = $this.getObjectContext().getChild("query-fields");
var query_field = CompositeUtil.findChild(qf_root, "query-field", "field", name);
if (query_field) {
qf_root.removeChild(query_field);
}
}
function import_server_bm_tplt() {
var cx = Packages.leaf.javascript.Context.getCurrentContext();
try {
......
......@@ -92,6 +92,9 @@
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
FROM hls_bp_master h)
ORDER BY bp_detail_id DESC) t1
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022年6月14日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select count(1) bp_number
from hls_bp_master_address t
where t.bp_id = ${@bp_id_tenant}
and t.address_type = 'HOUSE_ADDRESS'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_number"></bm:field>
</bm:fields>
</bm:model>
......@@ -642,7 +642,7 @@
AND cf_status = 'RELEASE'
AND cf_item = 8) residual_date,
-- 合同终了
(CASE
/*(CASE
WHEN ct.contract_status IN ('INCEPT', 'ETING', 'TERMINATE', 'ET') THEN
(SELECT to_char(MAX(cc.last_received_date),'yyyy-mm-dd')
FROM con_contract_cashflow cc
......@@ -657,7 +657,8 @@
AND cf_item = 250)
ELSE
''
END) terminate_date,
END) terminate_date,*/
to_char(ct.et_date, 'yyyy-mm-dd') terminate_date,
ct.is_buyout,
(SELECT v.code_value_name
FROM sys_code_values_v v
......@@ -681,7 +682,85 @@
WHERE v.code = 'BRANCH_CODE_SZMP'
AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code_value = ct.branch_code) branch_code_n
AND v.code_value = ct.branch_code) branch_code_n,
(select decode(bp.bp_class, 'NP', '自然人', '法人')
from con_contract_bp bp
where bp.contract_id = ct.contract_id
and bp.bp_category = 'TENANT') bp_class_n,
(select b.description
from hls_business_type b
where b.business_type = ct.business_type) business_type_n,
NVL((Select h1.code_value_name value_name
From sys_code_values_v h1
Where h1.code = 'SECONDARY_LEASE'
And h1.code_enabled_flag = 'Y'
And h1.code_value_enabled_flag = 'Y'
AND H1.code_value = CT.SECONDARY_LEASE),
'否') SECONDARY_LEASE_N,
(select d.description from hls_division d where d.division = ct.division) division_n,
nvl((select '是'
from con_contract_change_req ccr
where ccr.contract_id = ct.contract_id
and ccr.req_status = 'APPROVED'
and ccr.document_type = 'LEASE_CHAG'
and rownum = 1),
'否') tenant_change_flag_n,
nvl((select '是'
from dual
where not exists (select 1
from con_contract_cashflow ccc
where ccc.cf_item = 1
and ccc.times <= 12
and ccc.contract_id = ct.contract_id
and ccc.write_off_flag != 'FULL'
and ccc.cf_direction = 'INFLOW')
and exists (select 1
from con_contract_cashflow ccc
where ccc.cf_item = 1
and ccc.times = 12
and ccc.contract_id = ct.contract_id
and ccc.write_off_flag = 'FULL'
and ccc.cf_direction = 'INFLOW')),
'否') rental_12_pay_flag,
nvl((select '是'
from con_contract_cashflow ccc
where ccc.cf_item = 9
and ccc.cf_direction = 'INFLOW'
and ccc.contract_id = ct.contract_id
and (ccc.due_amount > 0 or exists
(select 1
from CON_CONTRACT_CASE_RECORD cr,
CON_CONTRACT_PENALTY_REDUCE pr,
CON_CONTRACT_PENALTY_INFO pi
where cr.record_id = pr.record_id
and pr.penalty_reduce_id = pi.penalty_reduce_id
and pr.contract_id = ccc.contract_id
and pi.penalty_reduce_amount > 0
and cr.status = 'APPROVED'))
and rownum = 1),
'否') cf_9_exists_flag,
nvl((select '是'
from con_contract_cashflow ccc
where ccc.cf_item = 9
and ccc.cf_direction = 'INFLOW'
and ccc.contract_id = ct.contract_id
and (ccc.due_amount > 0 or exists
(select 1
from CON_CONTRACT_CASE_RECORD cr,
CON_CONTRACT_PENALTY_REDUCE pr,
CON_CONTRACT_PENALTY_INFO pi,
con_contract_cashflow cf
where cr.record_id = pr.record_id
and pr.penalty_reduce_id = pi.penalty_reduce_id
and pr.contract_id = ccc.contract_id
and pi.penalty_reduce_amount > 0
and cr.status = 'APPROVED'
and pi.cashflow_id = cf.cashflow_id
and cf.times > 1))
and ccc.times > 1
and rownum = 1),
'否') cf_9_notfirsttime_exists_flag
,decode(acr_invoice_pkg.check_rl_flag(ct.contract_id), 'N', '否', 'Y', '是') rl_flag_n
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
......@@ -753,7 +832,15 @@
<bm:field name="residual_date"/>
<bm:field name="terminate_date"/>
<bm:field name="is_buyout_n"/>
<bm:field name="bp_class_n"/>
<bm:field name="business_type_n"/>
<bm:field name="division_n"/>
<bm:field name="tenant_change_flag_n"/>
<bm:field name="rental_12_pay_flag"/>
<bm:field name="cf_9_exists_flag"/>
<bm:field name="cf_9_notfirsttime_exists_flag"/>
<bm:field name="secondary_lease_n"/>
<bm:field name="rl_flag_n"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2015-1-21 下午3:09:38
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (
SELECT t.contract_id,
t.invoice_hd_id,
t.invoice_line_id,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'ACR510_INVOICE_KIND'
AND v.code_value = t.invoice_kind)invoice_kind_n,
t.cashflow_id,
t.tax_apply_month invoice_month,
t.invoice_date,
t.invoice_number,
t.invoice_tax_amount total_amount,
t.apply_flag for_invoice_flag,
t.tenant_name bp_name,
t.contract_number,
t.acr_tax_amount return_tax_amount,
t.journal_tax_amount amount_cr,
t.journal_month je_month,
t.journal_date je_date,
t.journal_num,
t.times,
t.due_date,
t.due_amount,
t.principal,
t.interest,
t.tax_amount vat_due_amount,
t.created_by,
t.creation_date,
t.last_updated_by,
t.last_update_date
FROM vat_account_tmp t
WHERE t.session_id=${/session/@session_id}
) t1
#WHERE_CLAUSE#
order by invoice_hd_id,due_date ASC,invoice_number asc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
acr_invoice_pkg.vat_account_data_process(p_base_period => ${@base_period},
p_session_id => ${/session/@session_id},
p_user_id => ${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="to_char(t1.invoice_date,'yyyymm') = ${@base_period}"/>-->
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="bp_name" queryExpression="t1.bp_name = ${@bp_name}"/>
<!-- <bm:query-field name="journal_date" queryExpression="to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"/>-->
<bm:query-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2015-1-21 下午3:09:38
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (
SELECT t.contract_id,
t.invoice_hd_id,
t.invoice_line_id,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'ACR510_INVOICE_KIND'
AND v.code_value = t.invoice_kind)invoice_kind_n,
t.cashflow_id,
t.tax_apply_month invoice_month,
t.invoice_date,
t.invoice_number,
t.invoice_tax_amount total_amount,
t.apply_flag for_invoice_flag,
t.tenant_name bp_name,
t.contract_number,
t.acr_tax_amount return_tax_amount,
t.journal_tax_amount amount_cr,
t.journal_month je_month,
t.journal_date je_date,
t.journal_num,
t.times,
t.due_date,
t.due_amount,
t.principal,
t.interest,
t.tax_amount vat_due_amount,
t.created_by,
t.creation_date,
t.last_updated_by,
t.last_update_date,
t.tax_type_rate
FROM vat_account_tmp t
WHERE t.session_id=${/session/@session_id}
) t1
#WHERE_CLAUSE#
--order by invoice_hd_id,due_date ASC,invoice_line_id asc
order by invoice_hd_id, invoice_number asc, due_date ASC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hl_cm_vat_report_pkg.vat_account_data_process(p_base_period => ${@base_period},
p_session_id => ${/session/@session_id},
p_user_id => ${/session/@user_id} );
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="to_char(t1.invoice_date,'yyyymm') = ${@base_period}"/>-->
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="bp_name" queryExpression="t1.bp_name = ${@bp_name}"/>
<!-- <bm:query-field name="journal_date" queryExpression="to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"/>-->
<bm:query-field name="invoice_date" queryExpression="to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="vat_6_flag" queryExpression="((${@vat_6_flag}='Y' and t1.tax_type_rate=0.06) or(${@vat_6_flag}!='Y' and t1.tax_type_rate!=0.06))"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
contract_sign_message_pkg.send_mobile_remind_info(p_user_id =>${/session/@user_id}, p_batch_id =>${@batch_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="batch_id" dataType="java.lang.Long" input="true" output="true"
outputPath="/parameter/@batch_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_SMS_LIST" needAccessControl="false">
<bm:fields>
<bm:field name="sms_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SMS_ID" prompt="SYS_SMS_LIST.SMS_ID"/>
<bm:field name="sms_date" databaseType="DATE" datatype="java.util.Date" physicalName="SMS_DATE" prompt="SYS_SMS_LIST.SMS_DATE"/>
<bm:field name="priority" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRIORITY" prompt="SYS_SMS_LIST.PRIORITY"/>
<bm:field name="phone_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE_NUMBER" prompt="SYS_SMS_LIST.PHONE_NUMBER"/>
<bm:field name="text" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TEXT" prompt="SYS_SMS_LIST.TEXT"/>
<bm:field name="error_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_STATUS" prompt="SYS_SMS_LIST.ERROR_STATUS"/>
<bm:field name="error_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_MSG" prompt="SYS_SMS_LIST.ERROR_MSG"/>
<bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="SYS_SMS_LIST.STATUS"/>
<bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="SYS_SMS_LIST.PROJECT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="SYS_SMS_LIST.CONTRACT_NUMBER"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="SYS_SMS_LIST.BP_NAME"/>
<bm:field name="sms_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SMS_TYPE" prompt="SYS_SMS_LIST.SMS_TYPE"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="SYS_SMS_LIST.CONTRACT_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="SYS_SMS_LIST.BATCH_ID"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="sms_id"/>
</bm:primary-key>
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hls_payment_msm_send_pkg.after_sys_sms_send_loop(p_sms_id =>${@sms_id},
p_send_result =>${@result},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" enforceOperations="query" expression="t1.status = &apos;NEW&apos; and t1.batch_id=${@batch_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-12-26 下午3:25:40
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_SMS_SERVER" needAccessControl="false">
<bm:fields>
<bm:field name="server_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SERVER_ID" prompt="SYS_SMS_SERVER.SERVER_ID"/>
<bm:field name="account_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ACCOUNT_ID" prompt="SYS_SMS_SERVER.ACCOUNT_ID"/>
<bm:field name="password" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PASSWORD" prompt="SYS_SMS_SERVER.PASSWORD"/>
<bm:field name="serviceid" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERVICEID" prompt="SYS_SMS_SERVER.SERVICEID"/>
<bm:field name="server_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERVER_CODE" prompt="SYS_SMS_SERVER.SERVER_CODE"/>
<bm:field name="server_url" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERVER_URL" prompt="SYS_SMS_SERVER.SERVER_URL"/>
<bm:field name="subcode" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="sign" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="server_id"/>
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="t1.server_code = &apos;HLCM_SMS&apos;"/>
</bm:data-filters>
</bm:model>
......@@ -24,10 +24,13 @@
(select hm.id_card_no_leg
from hls_bp_master hm
where hm.bp_id = t1.bp_id_agent_level1) id_card_no_agent,
(SELECT i.machine_number
decode(t1.division,70,(SELECT i.machine_number_70
FROM con_contract_lease_item i
WHERE i.contract_id = t1.contract_id
AND i.equipment_type = 'MAIN'),(SELECT i.machine_number
FROM con_contract_lease_item i
WHERE i.contract_id = t1.contract_id
AND i.equipment_type = 'MAIN') machine_number, --机号
AND i.equipment_type = 'MAIN')) machine_number, --机号
t1.contract_status,
(select v.code_value_name
from sys_code_values_v v
......
......@@ -36,22 +36,27 @@ select *
from con_contract_lease_item ci
where ci.contract_id = t1.contract_id
and ci.equipment_type = 'MAIN') brand_id,
NVL((SELECT a.description
decode(t1.division,70,(select a.brand_value --update by xsh35973 20220323
from CON_CONTRACT_LEASE_ITEM a
where a.contract_id = t1.contract_id),NVL((SELECT a.description
FROM hls_car_brands_vl a
WHERE a.brand_id =
(select ci.brand_id
from con_contract_lease_item ci
where ci.contract_id = t1.contract_id
and ci.equipment_type = 'MAIN')),
'日立') brand_id_n,
'日立')) brand_id_n,
(select ci.modelcd
from con_contract_lease_item ci
where ci.contract_id = t1.contract_id
and ci.equipment_type = 'MAIN') modelcd, --机型
(SELECT i.machine_number
decode(t1.division,70,(SELECT i.machine_number_70 --update by xsh35973 20220323
FROM con_contract_lease_item i
WHERE i.contract_id = t1.contract_id
AND i.equipment_type = 'MAIN') machine_number, --机号
AND i.equipment_type = 'MAIN'),(SELECT i.machine_number
FROM con_contract_lease_item i
WHERE i.contract_id = t1.contract_id
AND i.equipment_type = 'MAIN')) machine_number, --机号
t1.lease_times, --期数
t1.lease_start_date, --起租日
(NVL(t1.down_payment, 0) + NVL(t1.residual_value, 0) +
......
......@@ -44,7 +44,21 @@ select fa.file_name,fa.file_path,fa.attachment_id
'S_LEASE_SURE_BUS_OEC','GUARANTEE_LETTER_OEC',
'S_LEASE_ORDER_OEC','ITEM_TRAN_NOTICE',
'S_LEASE_PAY_REQ_OEC','PAYMENT_REQ',
'S_LEASE_MOR_OEC','MORT_CONTRACT')
'S_LEASE_MOR_OEC','MORT_CONTRACT',
'FINANCE_LEASE_CONTRACT_TJ_S_E', --update by xsh35973 铁甲电子签约
'FINANCE_LEASE_CONTRACT_TJ_S_E',
'FINANCE_LEASE_CONTRACT_TJ_E',
'FINANCE_LEASE_CONTRACT_TJ_E',
'CON_COLLECTION_PAYMENT_TJ_E',
'CON_COLLECTION_PAYMENT_TJ_E',
'CON_CONTRACT_MORTGAGE_TJ_E',
'CON_CONTRACT_MORTGAGE_TJ_E',
'PERSONAL_CREDIT',
'PERSONAL_CREDIT',
'FINANCE_LEASE_CONTRACT_TJ_FR_E',
'FINANCE_LEASE_CONTRACT_TJ_FR_E',
'CON_GUR_NP',
'CON_GUR_NP')
from con_ele_signer_file cf, con_contract_ele_signer cs
where cf.con_ele_signer_id = cs.con_ele_signer_id
and cs.contract_id = ${@contract_id}
......
......@@ -35,6 +35,8 @@
<bm:field name="wfl_show_all_approve_ht" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WFL_SHOW_ALL_APPROVE_HT" prompt="ZJ_WFL_APPROVE_HISTORY_V.WFL_SHOW_ALL_APPROVE_HT"/>
<bm:field name="attach_count" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACH_COUNT" prompt="ATTACH_COUNT"/>
<bm:field name="agent_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AGENT_FLAG" prompt="AGENT_FLAG"/>
<bm:field name="instance_status"/>
<bm:field name="role_code"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -89,7 +91,10 @@
) attach_count,
(select u.bp_category
from sys_user u
where u.user_id = ${/session/@user_id}) bp_category
where u.user_id = ${/session/@user_id}) bp_category,
(select zi.status from zj_wfl_workflow_instance zi
where zi.instance_id = t1.instance_id) instance_status,
(select sr.role_code from sys_role sr where sr.role_id = ${/session/@role_id}) role_code
FROM
zj_wfl_approve_history_v t1
WHERE
......@@ -144,7 +149,10 @@
) attach_count,
(select u.bp_category
from sys_user u
where u.user_id = ${/session/@user_id}) bp_category
where u.user_id = ${/session/@user_id}) bp_category,
(select zi.status from zj_wfl_workflow_instance zi
where zi.instance_id = t1.instance_id) instance_status,
(select sr.role_code from sys_role sr where sr.role_id = ${/session/@role_id}) role_code
FROM
zj_wfl_approve_history_v t1
WHERE
......@@ -184,7 +192,9 @@
NULL AS wfl_show_approve_ht,
NULL AS wfl_show_all_approve_ht,
NULL AS attach_count,
NULL AS bp_category
NULL AS bp_category,
zw.STATUS instance_status,
(select sr.role_code from sys_role sr where sr.role_id = ${/session/@role_id}) role_code
FROM zj_wfl_workflow_instance zw
WHERE zw.instance_id = ${@instance_id}
......
......@@ -44,7 +44,8 @@
a1.service_name,
a1.service_desc,
a1.node_action_desc,
nvl(a1.node_action_prompt,'您确认吗?') as node_action_prompt,
--nvl(a1.node_action_prompt,'您确认吗?') as node_action_prompt,
prj_project_workflow_pkg.get_node_action_prompt(a1.node_action_id,${/parameter/@instance_id}) node_action_prompt,
a1.default_action_flag
from zj_wfl_workflow_node_action_v a1
where not exists
......
var override_queryfields = [
];
var add_datafilters=[{
name:'authority_flag',
expression : "exists (select 1 from sys_user su where ((exists (select 1 from exp_employees ee,exp_employee_types et where ee.employee_id = su.employee_id and ee.employee_type_id = et.employee_type_id and et.employee_type_code = 'STAFF')) or t1.owner_user_id = su.user_id) and su.user_id = ${/session/@user_id})"
},
{ name:'contract_status',
expression :" t1.contract_status not in ('NEW','INCEPTING','INCEPT_RETURN') "
}
];
add_datafilter();
override();
//
\ No newline at end of file
var override_queryfields = [
{
name: 'contract_number',
queryexpression: "t1.contract_number = ${@contract_number}"
},
{
name: 'bp_name',
queryexpression: "t1.bp_name = ${@bp_name}"
},
{
name: 'journal_date',
queryexpression: "to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"
},
{
name: 'base_period',
queryexpression: "to_char(t1.journal_date,'yyyymm') < ${@base_period}"
}
];
var add_datafilters = [{
name: 'base_period',
expression: "t1.journal_date <= add_months(last_day(to_date(${@base_period},'yyyymm')),-1) and (t1.invoice_date is null or t1.invoice_date >= TRUNC(to_date(${@base_period},'yyyymm'),'dd'))"
}];
override();
add_datafilter();
\ No newline at end of file
var override_queryfields = [
{
name: 'contract_number',
queryexpression: "t1.contract_number = ${@contract_number}"
},
{
name: 'bp_name',
queryexpression: "t1.bp_name = ${@bp_name}"
},
{
name: 'journal_date',
queryexpression: "to_char(t1.journal_date,'yyyy-mm-dd') = ${@journal_date}"
},
{
name: 'base_period',
queryexpression: "to_char(t1.journal_date,'yyyymm') = ${@base_period}"
}
];
var add_datafilters = [{
name: 'base_period',
expression: " to_char(t1.journal_date,'yyyymm') = ${@base_period} and (t1.invoice_date is null or to_char(t1.invoice_date,'yyyymm') < ${@base_period})"
}];
override();
add_datafilter();
\ No newline at end of file
var override_queryfields = [
{
name: 'invoice_kind',
queryexpression: "t1.invoice_kind = ${@invoice_kind}"
},
{
name: 'contract_number',
queryexpression: "t1.contract_number = ${@contract_number}"
},
{
name: 'bp_name',
queryexpression: "t1.bp_name = ${@bp_name}"
},
{
name: 'journal_date',
queryexpression: "to_char(t1.je_date,'yyyy-mm-dd') = ${@journal_date}"
},
{
name: 'invoice_date',
queryexpression: "to_char(t1.invoice_date,'yyyy-mm-dd') = ${@invoice_date}"
},
{
name: 'base_period',
queryexpression: "to_char(t1.je_date,'yyyymm') <= ${@base_period}"
}
];
var add_datafilters = [{
name: 'base_period',
expression: "to_char(t1.invoice_date,'yyyymm') = ${@base_period}"
}];
override();
add_datafilter();
\ No newline at end of file
remove_query_field('CONTRACT_ID');
remove_datafilter('contract_id');
var add_datafilters=[
{
name:'bp_id',
expression:'(t1.bp_id = ${@bp_id})'
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters=[{
name: 'authority_flag',
expression: "((CF_ITEM_N !='会计核销违约金' and exists (SELECT 1 FROM sys_role sr\n" +
"where (sr.role_code ='0018' \n" +
"or sr.role_code = '0019')\n" +
"and sr.role_id=${/session/@role_id})) or ( not exists (SELECT 1 FROM sys_role sr\n" +
"where (sr.role_code ='0018' \n" +
"or sr.role_code = '0019')\n" +
"and sr.role_id=${/session/@role_id})))"
}];
add_datafilter();
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
<session-descriptor>
<cookie-name>JSESSIONID1</cookie-name>
<persistent-store-type>replicated_if_clustered</persistent-store-type>
</session-descriptor>
<container-descriptor>
<!--<prefer-web-inf-classes>true</prefer-web-inf-classes>-->
<prefer-application-packages>
<package-name>oracle.*</package-name>
</prefer-application-packages>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
<virtual-directory-mapping>
<local-path>/u01</local-path>
<url-pattern>/hls_file/*</url-pattern>
</virtual-directory-mapping>
</weblogic-web-app>
\ No newline at end of file
......@@ -43,7 +43,7 @@
function createScreen_create()
{
debugger;
var message_flag =false;
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
if(!ds.validate(true))
......@@ -54,6 +54,7 @@
//判断本次开票金额是否为租金,本金,和利息之中某一个
var selectedDs=$('selectedDs').getAll();
for(var i=0;i<selectedDs.length;i++){
debugger;
var billing_amount=selectedDs[i].get('billing_amount');
var due_amount=selectedDs[i].get('due_amount');
var principal=selectedDs[i].get('principal');
......@@ -70,18 +71,33 @@
$L.showErrorMessage("提示","该金额已经开票过!");
return;
}
//add by gzj 售后回租只能开普票
var business_type= selectedDs[i].get('business_type');
var kind_type=selectedDs[i].get('invoice_kind_type');
if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL')){
Leaf.showMessage("提示","售后回租只能开普通发票!");
return;
}
if(business_type=='LEASEBACK'&&kind_type!='ELECTRONIC_GENERAL'){
message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!");
}
if(received_amount<plus(cf_billing_amount,billing_amount)&&selectedDs[i].get('cf_item')==1&&selectedDs[i].get('cf_status')=='BLOCK'&&selectedDs[i].get('contract_status')=='REPURING'){
$L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!");
return;
}
}
var datas = ds.getJsonData();
Leaf.showConfirm('${l:HLS.PROMPT}','是否确认开票?',function()
var message_info;
if(message_flag==false){
message_info= '是否确认开票?';
}else {
message_info= "回租建议选择增值税电子普票!是否确认开票?";
}
Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function()
{
Leaf.Masker.mask(Ext.getBody(),'${l:HLS.EXECUTING}');
Leaf.request({
......@@ -100,7 +116,8 @@
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
scope: this,
sync: true
});
},function (){
Leaf.Masker.unmask(Ext.getBody());
......@@ -109,6 +126,8 @@
}
function unSelect_selectedDs(ds,record){
record.dirty = false;
}
......@@ -143,6 +162,13 @@
};
function onUpdate_selectedDs(ds,record,name,value,oldvalue){
if(name == 'billing_amount' && record.get('rl_flag') == 'Y'){
Leaf.showConfirm('提示', '此现金流为日立返还金现金流,请确认是否修改?', null, function() {
//record.set('billing_amount', oldvalue);
}, 400);
}
}
]]></script>
<style><![CDATA[
.item-radio-option {
......@@ -182,6 +208,7 @@
<a:event name="load" handler="onLoad_selectedDs"/>
<a:event name="select" handler="onSelect_selectedDs"/>
<a:event name="unselect" handler="unSelect_selectedDs"/>
<a:event name="update" handler="onUpdate_selectedDs"/>
</a:events>
</a:dataSet>
</a:dataSets>
......
......@@ -54,7 +54,8 @@
}
function contractDs_grid_add() {
$('contractDs_grid').showEditorByRecord($('ar510n_cashflow_ds').create());
$('contractDs_grid').showEditorByRecord($('ar510n_cashflow_ds')
.create());
}
function invoiceHd_close() {
......@@ -239,6 +240,7 @@
]]></script>
<a:dataSets>
<a:dataSet id="billing_status_ds" lookupCode="CON_BILLING_STATUS"/>
<a:dataSet id="acr510_bp_class" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="taxpayer_type_ds" lookupCode="HLS211_TAXPAYER_TYPE"/>
<a:dataSet id="acr510_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
......@@ -293,6 +295,8 @@
<a:record code_value="30" code_value_name="高空作业车"/>
<a:record code_value="40" code_value_name="其它"/>
<a:record code_value="50" code_value_name="星邦高空作业车"/>
<a:record code_value="90" code_value_name="租赁二手机"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr510n_invoice_method_ds">
......@@ -438,7 +442,12 @@
</a:mapping>
</a:field>
<a:field name="bp_id_agent_level1"/>
<a:field name="rl_flag"/>
<a:field name="rl_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="rl_flag" valueField="code_value"/>
<a:field name="billing_status"/>
<a:field name="billing_status_n" displayField="code_value_name" options="billing_status_ds"
returnField="billing_status" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="queryUpdateFunction"/>
......@@ -510,6 +519,10 @@
<a:comboBox bindTarget="allConditionDs" name="invoice_method_n" prompt="开票方式"/>
<a:comboBox bindTarget="allConditionDs" name="division_n" prompt="租赁物"/>
<a:comboBox bindTarget="allConditionDs" name="invoice_type_n" prompt="开票类型"/>
<a:comboBox bindTarget="allConditionDs" name="rl_flag_n" prompt="是否日立返还金"/>
</a:hBox>
<a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/>
</a:hBox>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
......@@ -577,7 +590,8 @@
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="division_n" prompt="租赁物" width="100"/>
<a:column name="write_off_flag_desc" width="100" align="center" prompt="核销标记" />
<a:column name="rl_flag_n" width="100" align="center" prompt="是否日立返还金" />
<a:column name="billing_status_n" width="100" align="center" prompt="开票状态" />
</a:columns>
</a:grid>
</a:tab>
......@@ -589,7 +603,8 @@
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="contract_status_desc" prompt="合同状态" align="center" width="80"/>
<a:column name="billing_method_desc" prompt="开票规则" width="155"/>
<a:column name="billing_method_desc" prompt="开票规则"
width="155"/>
<a:column name="billing_object_name" autoAdjust="false"
editor="contractDs_grid_editor_lov" prompt="开票对象名称"
renderer="render_contractDs_grid" showTitle="true" width="200"/>
......
......@@ -359,7 +359,7 @@
<a:datas dataSource="/model/acr515_currency_list"/>
</a:dataSet>
<a:dataSet id="acr515_invoiceVatParaDs" autoCreate="true" model="acr.acr_invoice_hd_v">
<a:dataSet id="acr515_invoiceVatParaDs" autoCreate="true" model="acr.ACR515.acr515_invoice_hd_v">
<a:fields>
<a:field name="currency_desc" displayField="currency_name" options="acr515_currencyDs"
returnField="currency" valueField="currency_code"/>
......@@ -443,7 +443,7 @@
<a:event name="update" handler="onUpdate_acr515_invoiceVatParaDs"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr515_invoiceVatDs" autoPageSize="true" maxPageSize="10000" model="acr.acr_invoice_hd_v"
<a:dataSet id="acr515_invoiceVatDs" autoPageSize="true" maxPageSize="10000" model="acr.ACR515.acr515_invoice_hd_v"
queryDataSet="acr515_invoiceVatParaDs" selectable="true">
<a:fields><![CDATA[
]]></a:fields>
......
......@@ -165,6 +165,7 @@
<a:datas>
<!-- <a:record code_value="AGRI_THREE" code_value_name="农行扣款(三方)"/>-->
<a:record code_value="CCB_THREE" code_value_name="建行扣款(三方)"/>
<a:record code_value="CCB_TWO" code_value_name="建行扣款(两方)"/>
<!-- <a:record code_value="AGRI_TWO" code_value_name="农行扣款(两方)"/>-->
</a:datas>
</a:dataSet>
......@@ -192,7 +193,7 @@
</a:field>
<a:field name="bp_id_agent" />
<a:field name="bp_id_tenant"/>
<a:field name="contract_number" lovGridHeight="350" lovHeight="500" lovService="ccb.CCB600.con_contract_lov?pay_method=CCB_THREE" lovWidth="470" title="合同">
<a:field name="contract_number" lovGridHeight="350" lovHeight="500" lovService="ccb.CCB600.con_contract_lov?pay_method=${@pay_method}" lovWidth="470" title="合同">
<a:mapping>
<a:map from="contract_id" to="contract_id"/>
<a:map from="contract_number" to="contract_number"/>
......@@ -226,8 +227,8 @@
</a:mapping>
</a:field>
<a:field name="currency_name" readOnly="true"/>
<a:field name="pay_method_desc" defaultValue="建行扣款(三方)" required="true" prompt="支付方式" displayField="code_value_name" options="pay_methods_ds" returnField="pay_method" valueField="code_value"/>
<a:field name="pay_method" defaultValue="CCB_THREE"/>
<a:field name="pay_method_desc" required="true" prompt="支付方式" displayField="code_value_name" options="pay_methods_ds" returnField="pay_method" valueField="code_value"/>
<a:field name="pay_method" />
<a:field name="bank_account_name" readOnly="true"/>
<a:field name="bank_name" readOnly="true"/>
<a:field name="currency" readOnly="true"/>
......@@ -245,7 +246,7 @@
selectable="true">
</a:dataSet>
<a:dataSet id="hls_ccb_grid_ln_ds" fetchAll="true" queryDataSet="hls_ccb_form_query_ds" model="ccb.CCB600.hls_ebank_batch_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.con_contract_cashflow_query/query?pay_method=CCB_THREE">
<a:dataSet id="hls_ccb_grid_ln_ds" fetchAll="true" queryDataSet="hls_ccb_form_query_ds" model="ccb.CCB600.hls_ebank_batch_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.con_contract_cashflow_query/query?pay_method=${@pay_method}">
<a:fields>
<a:field name="cashflow_id"/>
<a:field name="bp_tenant_name" readOnly="true"/>
......
......@@ -253,7 +253,7 @@
function export_batch() {
var r = $('hls_ccb_batch_result_ds').getCurrentRecord();
if (r) {
if (r.get('pay_method') == 'CCB_THREE') {//建行
if (r.get('pay_method') == 'CCB_THREE'||r.get('pay_method') == 'CCB_TWO') {//建行
$('hls_ccb_batch_merge_result_grid')._export();
} else if (r.get('pay_method') == 'AGRI_TWO' || r.get('pay_method') == 'AGRI_THREE') {
$('hls_abc_batch_merge_result_grid')._export();
......@@ -272,7 +272,7 @@
var pay_method = record.get('pay_method');
var due_date_to = new Date(record.get('due_date')).format('yyyy-mm-dd').toString();
var bank_type;
if (pay_method == 'CCB_THREE') {
if (pay_method == 'CCB_THREE'||pay_method == 'CCB_TWO') {
bank_type = 'CCB';
str = '建行';
} else if (pay_method == 'AGRI_TWO' || pay_method == 'AGRI_THREE') {
......@@ -372,6 +372,7 @@
width="100"/>
<a:column name="total_success_count" align="right" prompt="扣款成功账号数" width="100"/>
<a:column name="message" align="right" prompt="错误消息" width="150"/>
<a:column name="pay_method_desc" align="center" prompt="支付方式" width="120"/>
</a:columns>
</a:grid>
<a:grid hidden="true" width="1" height="1" id="hls_ccb_batch_merge_result_grid"
......@@ -390,23 +391,23 @@
<a:column prompt="备注(选填)"/>
</a:columns>
</a:grid>
<!-- <a:grid hidden="true" width="1" height="1" id="hls_abc_batch_merge_result_grid"-->
<!-- bindTarget="hls_ccb_batch_merge_result_ds">-->
<!-- <a:columns>-->
<!-- <a:column name="abc_sequence_num" prompt="serial-no"/>-->
<!-- <a:column name="abc_pay_type" prompt="pay-type"/>-->
<!-- <a:column name="abc_transaction_type" prompt="transaction-type"/>-->
<!-- <a:column name="csh_bank_account_num" prompt="account-no"/>-->
<!-- <a:column name="csh_bank_account_name" prompt="account-name"/>-->
<!-- <a:column name="bank_account_num" prompt="payee-account-to"/>-->
<!-- <a:column name="bank_account_name" prompt="payee-name"/>-->
<!-- <a:column name="abc_payee_bank" prompt="payee-bank"/>-->
<!-- <a:column name="abc_usage" prompt="usage"/>-->
<!-- <a:column name="abc_fen_code" prompt="fen-code"/>-->
<!-- <a:column name="abc_curr_flag" prompt="curr-flag"/>-->
<!-- <a:column name="actual_amount" align="right" renderer="Leaf.formatMoney" prompt="amount"/>-->
<!-- </a:columns>-->
<!-- </a:grid>-->
<!-- <a:grid hidden="true" width="1" height="1" id="hls_abc_batch_merge_result_grid"-->
<!-- bindTarget="hls_ccb_batch_merge_result_ds">-->
<!-- <a:columns>-->
<!-- <a:column name="abc_sequence_num" prompt="serial-no"/>-->
<!-- <a:column name="abc_pay_type" prompt="pay-type"/>-->
<!-- <a:column name="abc_transaction_type" prompt="transaction-type"/>-->
<!-- <a:column name="csh_bank_account_num" prompt="account-no"/>-->
<!-- <a:column name="csh_bank_account_name" prompt="account-name"/>-->
<!-- <a:column name="bank_account_num" prompt="payee-account-to"/>-->
<!-- <a:column name="bank_account_name" prompt="payee-name"/>-->
<!-- <a:column name="abc_payee_bank" prompt="payee-bank"/>-->
<!-- <a:column name="abc_usage" prompt="usage"/>-->
<!-- <a:column name="abc_fen_code" prompt="fen-code"/>-->
<!-- <a:column name="abc_curr_flag" prompt="curr-flag"/>-->
<!-- <a:column name="actual_amount" align="right" renderer="Leaf.formatMoney" prompt="amount"/>-->
<!-- </a:columns>-->
<!-- </a:grid>-->
</a:screenBody>
</a:view>
</a:screen>
......@@ -38,7 +38,6 @@
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).setQueryParameter('copy_contract_id',record1.get('copy_contract_id'));
$(ds_id2).query();
debugger
var records2 = $(ds_id2).getAll();
if (records2 && records2.length != 0) {
var param_list = [];
......@@ -226,31 +225,34 @@
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
if (value != old_value) {
if (update_falg != 'Y') {
if (name == 'reduce_amount_total') {
// record.set('reduce_amount_total',value>record.get('unreceived_overdue_amount') ?record.get('unreceived_overdue_amount'):value);
if(value>record.get('unreceived_overdue_amount')){
$L.showErrorMessage('提示','减免金额不能大于最大减免金额!');
// record.set('reduce_amount_total',record.get('unreceived_overdue_amount'));
// $(ds).getAt(0).set('reduce_amount_total','');
return;
}
// record.set('reduce_amount_total',value>record.get('unreceived_overdue_amount') ?record.get('unreceived_overdue_amount'):value);
if(value>record.get('unreceived_overdue_amount')){
$L.showErrorMessage('提示','减免金额不能大于最大减免金额!');
// record.set('reduce_amount_total',record.get('unreceived_overdue_amount'));
// $(ds).getAt(0).set('reduce_amount_total','');
return;
}
var ratio = parseFloat(Leaf.formatNumber(div(record.get('reduce_amount_total'), record.get('total_overdue_amount')), 4));
// update_falg = 'Y';
// update_falg = 'Y';
record.set('reduce_amount_total_ratio', ratio);
}
/* if (name == 'reduce_amount_total_ratio') {
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('total_overdue_amount')), 2);
// update_falg = 'Y';
record.set('reduce_amount_total', amount);
/* if (name == 'reduce_amount_total_ratio') {
var amount = parseFloat(mul(record.get('reduce_amount_total_ratio'), record.get('total_overdue_amount')), 2);
// update_falg = 'Y';
record.set('reduce_amount_total', amount);
}*/
}*/
} else {
update_falg = 'N';
}
......@@ -268,9 +270,23 @@
return false;
}
}
var penalty_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_penalty_reduce');
var records_penalty = $(penalty_ds_id).getCurrentRecord();
var reduce_amount_total= records_penalty.get('reduce_amount_total');
var gld_received_amount= records_penalty.get('gld_received_amount');
var remaining_amount =minus(records_penalty.get('total_overdue_amount'), reduce_amount_total);
if(remaining_amount<gld_received_amount){
$L.showErrorMessage('提示','营业确认违约金需要大于等于会计确认的违约金!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
return true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
};
//add by lihh 20210323
window['${/parameter/@layout_code}_con500_cdd_attachtment_upload'] = function(id, name, query_only) {
......
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:link id="prj_project_modify_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/>
<a:link id="update_win_query"
url="${/request/@context_path}/modules/cont/CON2000/project_maintain.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<script ><![CDATA[
function update_win_query1(record_id, ds_id){
var record = $(ds_id).findById(record_id);
record.set('function_usage','UPDATE');
record.set('maintain_type','UPDATE');
record.set('function_code','CON2000N');
record.set('document_id',record.get('contract_id'));
record.data['url_title'] = '催收短信查询';
var param = record.data;
param['winid'] = 'update_win_query_window';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'update_win_query',ds_id);
}
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'contract_number' && value) {
return '<a href="javascript:update_win_query1(\'' + record.id + '\',\'' + record.ds.id + '\');">' + value + '</a>';
}
return value;
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query fetchAll="true" model="cont.CON2000.login_user" rootPath="login_user"/>
</a:init-procedure>
<a:view>
<a:link id="prj_approval_link_id" model="cont.CON2000.contract_phone_approval" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<!-- <a:link id="prj_approval_link_id" model="classes/cont/CON2000/contract_phone_approval.lwm" modelaction="update"/>-->
<script ><![CDATA[
//新增和加载时调用(form)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var user_name = '${/model/login_user/record/@user_name}';
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_1', 'con_contract');
if(user_name!='ZHOUYICONG'&&"${/model/role_info/record/@role_code}" !="0019" ){
if (tenant_ds_id == ds.id) {
record.getField('ht_send_message_n').setReadOnly(true);
record.getField('ht_cell_phone').setReadOnly(true);
}
}else{
if (tenant_ds_id == ds.id) {
if (Leaf.isEmpty(record.get('ht_send_message'))) {
record.set('ht_send_message', 'YES');
record.set('ht_send_message_n', '是');
record.getField('ht_cell_phone').setRequired(true);
} else if (record.get('ht_send_message') == 'YES') {
record.getField('ht_cell_phone').setRequired(true);
}
if (Leaf.isEmpty(record.get('phone_status'))){
record.set('phone_status', 'NEW');
}
if(record.get('phone_status')=='APPROVING'){
record.getField('ht_send_message_n').setReadOnly(true);
record.getField('ht_cell_phone').setReadOnly(true);
}
}
}
}
//只有代理店下级和周一聪才会显示按钮
if("${/model/role_info/record/@role_code}"!="0019" && '${/model/login_user/record/@user_name}'!='ZHOUYICONG'){
if(document.getElementById('${/parameter/@layout_code}_user_button1')){
document.getElementById('${/parameter/@layout_code}_user_button1').style.display = "none";
}
if(document.getElementById('${/parameter/@layout_code}_save')){
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
}
if('${/parameter/@phone_status}'=='APPROVING'){
document.getElementById('${/parameter/@layout_code}_user_button1').style.display = "none";
document.getElementById('${/parameter/@layout_code}_save').style.display = "none";
}
var submit_wfl_flag = 'N';
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
submit_wfl_flag = 'Y';
window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK']();
});
}
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function (ds, record, res) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var current_record = $(ds_id).getCurrentRecord();
var contract_id = current_record.get('contract_id');
if (submit_wfl_flag == 'Y') {
submit_wfl_flag = 'N';
Leaf.request({
url: $('prj_approval_link_id').getUrl(),
para: {
contract_id: contract_id
},
scope: this,
success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
Aurora.SideBar.show({
msg: '操作成功',
duration: 2000
});
},
failure: function () {
submit_wfl_flag = 'N';
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
submit_wfl_flag = 'N';
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
}else{
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
}
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var tenant_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC_1', 'con_contract');
if (tenant_ds_id == ds.id && tenant_ds_id) {
if (name == 'ht_send_message') {
if (value == 'YES') {
record.getField('ht_cell_phone').setRequired(true);
} else if (value == 'NO') {
record.getField('ht_cell_phone').setRequired(false);
}
}
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -35,6 +35,8 @@
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<!-- <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>-->
<a:link id="rl_notice_print_link"
url="${/request/@context_path}/modules/cont/CON301N/rl_notice_print.lsc"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
......@@ -87,6 +89,12 @@
}
}
var role_code = '${/model/role_info/record/@role_code}';
if(role_code!="0008"&&role_code!="0017"&&role_code!="HAND") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_user_button9").style.display = "none";
} else {
document.getElementById("CONTRACT_QUERY_ENTRANCE_user_button9").style.display = "";
}
});
function open_contract_win(ds_id, record_id) {
......@@ -269,6 +277,24 @@
//window.location.href='${/request/@context_path}/con/contract/conExportExcel?contractId='+record.get('contract_id');
};
//返还金通知打印
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cur_record = $(ds_id).getSelected()[0];
var rl_flag = cur_record.get("rl_flag");
if(rl_flag == 'Y'){
var document_id = cur_record.get("contract_id");
var to_file_name = '返还租金通知'+ cur_record.get("contract_number") + '.docx'
var url = $('rl_notice_print_link').getUrl() + '?document_id=' + document_id + '&document_table=CON_RL_NOTICE&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON&to_file_name='+to_file_name;
window.open(href = url, target = "_blank");
}else if(rl_flag == 'N'){
Leaf.showMessage('提示', '请选择是日立为优质客户付租金的合同!');
return;
}
};
]]></script>
<a:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON501"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-update model="hls.HLS811.hls_doc_file_templet_get_atm"/>
<s:server-script import="contract_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(Packages.org.apache.commons.io);
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
//deleteFile(word_file_path);
return pdf_file_path_new;
}
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
//transfer(file_path, os);
write_os_to_file(file_path, os);
os.flush();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
var datePath = file_path + y + "/" + m + "/";
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function collection_create_content() {
try {
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
//if (record_data.file_exists_flag != 'Y') {
var to_file_name = record_data.to_file_name;
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = datePath + guid_file_name_tables[0].guid_file_name + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
} catch (e) {
raise_app_error(e);
}
// word转pdf
var pdf_file_path=to_file_path;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
//var outputfilename= record_data.to_file_name +'.pdf';
var filename_str = record_data.to_file_name;
var outputfilename= filename_str.substr(0, filename_str.length - 5) +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
source_type: $ctx.parameter.source_type
});
//var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
//HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
//print(outputfilepath.toString());
//print(outputfilename.toString());
download_file(outputfilename.toString(),outputfilepath.toString());
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
raise_app_error(e);
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
collection_create_content();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
......@@ -8,6 +8,7 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true"
dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
......@@ -124,6 +125,8 @@
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_LEASE_FIN_INFO_1_CON_CONTRACT_OTHER_FEE2').style.display = 'none';
}
if (record.get('business_type') == 'LEASE') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT_prompt').style.display = 'none';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_ENTRUSTED_AMOUNT').style.display = 'none';
......@@ -142,8 +145,8 @@
}
}
//新增 “限制金额”字段;
//“扣款限额”:“租金支付方式”为“建行扣款(三方)”时展示;
if (record.get('pay_method') == 'CCB_THREE') {
//“扣款限额”:“租金支付方式”为“建行扣款”时展示;
if (record.get('pay_method') == 'CCB_THREE'||record.get('pay_method') == 'CCB_TWO') {
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT_prompt').style.display = 'block';
document.getElementById('${/parameter/@layout_code}_F_BASIC_1_CON_CONTRACT_DEDUCTION_LIMIT').style.display = 'block';
} else {
......@@ -731,6 +734,22 @@
$(gridId).hideColumn('ownership_flag_n');
$(gridId).hideColumn('created_by_n');
}
if(record.data.division=='30'||record.data.division=='50'||record.data.division=='80'){
record.getField('set_number').setRequired(true);
}else{
record.getField('set_number').setReadOnly(true);
if(Ext.isEmpty(record.get('set_number'))){
record.set('set_number',1);
}
}
}
var cashflow_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_CASHFLOW_1', 'con_contract_cashflow');
if(ds.id == cashflow_ds_id&&cashflow_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if("${/model/role_info/record/@role_code}" =="0018" || "${/model/role_info/record/@role_code}" =="0019" ){
$(gridId).hideColumn('gld_received_amount');
}
}
};
......
......@@ -104,6 +104,12 @@
if(record.data.lease_name70=='Y'){
record.data.division=record.data.division+',70';
};
if(record.data.lease_name80=='Y'){
record.data.division=record.data.division+',80';
};
if(record.data.lease_name90=='Y'){
record.data.division=record.data.division+',90';
};
record.data.division=record.data.division.substr(1,record.data.division.length);
$('contract_sales_result_ds').query();
$('contract_sales_agent_result_ds').query();
......@@ -191,7 +197,10 @@
<a:checkBox name="lease_name50" bindTarget="contract_sales_report_ds" prompt="星邦高空作业车"/>
<a:checkBox name="lease_name60" bindTarget="contract_sales_report_ds" prompt="新业务"/>
<a:checkBox name="lease_name70" bindTarget="contract_sales_report_ds" prompt="铁甲业务"/>
<a:checkBox name="lease_name80" bindTarget="contract_sales_report_ds" prompt="叉车"/>
<a:checkBox name="lease_name90" bindTarget="contract_sales_report_ds" prompt="租赁二手机"/>
<a:checkBox name="lease_name40" bindTarget="contract_sales_report_ds" prompt="其它"/>
</a:form>
<a:grid id="contract_sales_result_ds_grid" bindTarget="contract_sales_result_ds" marginHeight="150" navBar="true" marginWidth="40">
......
......@@ -21,7 +21,68 @@
'con_contract'
);
var param={};
var period_name=$(ds_id).getAt(0).get('period_name');
var record = $(ds_id).getAt(0);
record.data.division1='';
record.data.division2='';
record.data.division3='';
record.data.division4='';
record.data.division5='';
record.data.division6='';
record.data.division7='';
record.data.division8='';
record.data.division9='';
if(record.data.lease_name10=='Y'){
record.data.division1='10';
}
if(record.data.lease_name20=='Y'){
record.data.division2='20';
}
if(record.data.lease_name30=='Y'){
record.data.division3='30';
}
if(record.data.lease_name40=='Y'){
record.data.division4='40';
}
if(record.data.lease_name50=='Y'){
record.data.division5='50';
}
if(record.data.lease_name60=='Y'){
record.data.division6='60';
}
if(record.data.lease_name70=='Y'){
record.data.division7='70';
};
if(record.data.lease_name80=='Y'){
record.data.division8='80';
};
if(record.data.lease_name90=='Y'){
record.data.division9='90';
};
// record.data.division=record.data.division.substr(1,record.data.division.length);
if(record.data.division1 == ''&&record.data.division2 == ''&&record.data.division3 == ''&&record.data.division4 == ''
&&record.data.division5 == ''&&record.data.division6 == ''&&record.data.division7 == ''&&record.data.division8 == ''&&record.data.division9 == ''){
// record.data.division1='10,20,30,40,50,60,70,80';
record.data.division1='10';
record.data.division2='20';
record.data.division3='30';
record.data.division4='40';
record.data.division5='50';
record.data.division6='60';
record.data.division7='70';
record.data.division8='80';
record.data.division9='90';
};
param['division1']= record.data.division1;
param['division2']= record.data.division2;
param['division3']= record.data.division3;
param['division4']= record.data.division4;
param['division5']= record.data.division5;
param['division6']= record.data.division6;
param['division7']= record.data.division7;
param['division8']= record.data.division8;
param['division9']= record.data.division9;
param['period_name']=period_name;
param['function_code'] = 'CON3400N';
param['function_usage'] = 'MODIFY';
......
This diff is collapsed.
This diff is collapsed.
......@@ -118,7 +118,9 @@
||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX'||record_data.templet_code=='BUSINESS_CONTRACT_GK'||record_data.templet_code == 'REPURCHASE_DEBT_OFFSET'
||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN'
||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_FIN_A4'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ'||record_data.templet_code =='CON_CONTRACT_MORTGAGE_TJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_SURE'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_FR') {
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_SURE'||record_data.templet_code =='FINANCE_LEASE_CONTRACT_TJ_FR'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_D_ESWJ' ||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ_OEC'||record_data.templet_code =='BUSINESS_CONTRACT_D_ESWJ'
||record_data.templet_code =='FINANCE_LEASE_CONTRACT_FR_TJ') { //update by xsh35973 添加法人铁甲保证函
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
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