Commit f77005f9 authored by panhong18943's avatar panhong18943

Merge branch 'remote_dev' of https://hel.hand-china.com/hlcm/leaf-hlcm into remote_dev

parents a6262108 e035a28e
package com.hand.hls.hlcm.hlinteface;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class JycDemo {
public static String doGet(String httpUrl){
//链接
System.setProperty("javax.net.ssl.keyStore", "D:/jks/hlltrust2.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "123456");
System.setProperty("https.protocols", "TLSv1.2");
System.out.println("======>2222222");
HttpURLConnection connection = null;
InputStream is = null;
BufferedReader br = null;
StringBuffer result = new StringBuffer();
try {
//创建连接
URL url = new URL(httpUrl);
connection = (HttpURLConnection) url.openConnection();
//设置请求方式、
connection.setRequestMethod("GET");
//设置连接超时时间
connection.setReadTimeout(15000);
//开始连接
connection.connect();
//获取响应数据
if (connection.getResponseCode() == 200) {
//获取返回的数据
is = connection.getInputStream();
if (null != is) {
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
String temp = null;
while (null != (temp = br.readLine())) {
result.append(temp);
}
}
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (null != br) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (null != is) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
//关闭远程连接
connection.disconnect();
}
return result.toString();
}
public static void main(String[] args) throws Exception{
String message = doGet("https://sys-dev.hongling.sh.cn/hlcm_dev_2023/wjflwar2/getEquStatus?equNo=SY036EBJ27118&type=wj&reqClientIp=39.97.244.233");
System.out.println(message);
}
}
......@@ -26,10 +26,6 @@ public class JYCInterfaceController extends BaseController {
private static final String WJFL_FIELD="WJFL" ;
DatabaseServiceFactory dsf = ObjectRegistryHolder.getInstanceOfType(DatabaseServiceFactory.class);
CompositeMap context = new CompositeMap();
public boolean checkInterfacePara(String equNo,String type,String reqClientIp,JSONObject resultjson){
String[] ipLimit = IP_LIMIT.split(",");
if( equNo == null || equNo.isEmpty()||type == null || type.isEmpty()||reqClientIp == null || reqClientIp.isEmpty()){
......@@ -92,7 +88,7 @@ public class JYCInterfaceController extends BaseController {
resultjson.put("ResponseCode","01");
resultjson.put("ResponseMsg","交易正常");
}
/*for (CompositeMap child : valueList) {
/*for (CompositeMap child : valueList) {3
existsFlag = true;
if (child == null) {
continue;
......
......@@ -11,7 +11,8 @@
p_user_id =>${@p_user_id},
p_contract_id =>${@p_contract_id},
p_file_type =>${@p_file_type},
p_lease_type =>${@p_lease_type}
p_lease_type =>${@p_lease_type},
p_session_id =>${/session/@session_id}
);
END;
]]></bm:update-sql>
......
<?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 faa.file_name,
faa.file_path,
faa.attachment_id,
m.table_name,
m.table_pk_value,
m.record_id
FROM fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
con_clause_templet t,
con_contract_content_v cc,
con_contract_download_temp pt
WHERE faa.attachment_id = m.attachment_id
AND m.table_name = 'CON_CONTRACT_CONTENT'
AND m.table_pk_value = cc.content_id
AND t.doc_plugin_flag = 'Y'
AND t.templet_id = cc.templet_id
AND cc.contract_id = pt.contract_id
AND pt.session_id = ${/session/@session_id}
AND t.templet_code = ${/parameter/@templet_code}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" required="true"/>
<bm:field name="table_pk_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_PK_VALUE" required="true"/>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" required="true"/>
<bm:field name="attachment_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTACHMENT_ID" required="true"/>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2015-6-10 下午03:17:55
$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
faa.file_name,
faa.file_path,
faa.file_type_code,
(select 'Y' from dual where exists (SELECT
1
FROM
fnd_atm_attachment_multi m1
WHERE
m1.table_name = 'CON_CONTRACT_CONTENT' AND
m1.table_pk_value = cc.content_id)
) file_exists_flag,
cc.content_number || '-' || cc.bp_name || '-' ||
(select ct.contract_number
from con_contract ct
where ct.contract_id = cc.contract_id) to_file_name,
lt.pwd,
cc.content_id,
pt.contract_id
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
con_contract_content_v cc,
con_contract_download_temp pt
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.doc_plugin_flag = 'Y' AND
t.templet_id = cc.templet_id AND
cc.contract_id = pt.contract_id AND
pt.session_id = ${/session/@session_id} AND
t.templet_code =${/parameter/@templet_code}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="file_exists_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_EXISTS_FLAG"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
<bm:field name="pwd" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PWD"/>
<bm:field name="content_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTENT_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2024-11-11 下午5:06:06
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
con_contract_content_pkg.delect_contract_download_temp(p_session_id => ${/session/@session_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
con_contract_content_pkg.contract_rent_download_create(
p_session_id =>${/session/@session_id},
p_contract_id =>${@contract_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_contract_content_pkg.content_create_for_collection(
p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id},
p_templet_code=>${@templet_code}
);
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">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
con_contract_content_pkg.delect_contract_rent_temp(
p_session_id =>${/session/@session_id}
);
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter inputPath="/session/@session_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2015-6-10 下午03:17:55
$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
faa.file_name,
faa.file_path,
faa.file_type_code,
(select 'Y' from dual where exists (SELECT
1
FROM
fnd_atm_attachment_multi m1
WHERE
m1.table_name = 'CON_CONTRACT_CONTENT' AND
m1.table_pk_value = cc.content_id)
) file_exists_flag,
cc.content_number || '-' || cc.bp_name || '-' ||
(select ct.contract_number
from con_contract ct
where ct.contract_id = cc.contract_id) to_file_name,
lt.pwd,
cc.content_id
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
con_contract_content_v cc
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.templet_code=${/parameter/@templet_code} and
t.doc_plugin_flag = 'Y' AND
t.templet_id = cc.templet_id AND
(
cc.content_id =${/parameter/@content_id} OR
(
cc.contract_id =${/parameter/@contract_id} AND
${/parameter/@batch_flag}='Y'
)
)
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="file_exists_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_EXISTS_FLAG"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
<bm:field name="pwd" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PWD"/>
<bm:field name="content_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTENT_ID"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2015-6-10 下午03:17:55
$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
faa.file_path,
faa.file_type_code,
(select 'Y' from dual where exists (SELECT
1
FROM
fnd_atm_attachment_multi m1
WHERE
m1.table_name = 'CON_CONTRACT_CONTENT' AND
m1.table_pk_value = cc.content_id)
) file_exists_flag,
cc.content_number
||'-'
||cc.bp_name
||'-'
||
(SELECT
t.project_number
FROM
con_contract ct,
prj_project t
WHERE
t.project_id = ct.project_id AND
ct.contract_id = cc.contract_id
) to_file_name,
lt.pwd,
cc.content_id,
decode(cc.bp_category,
'TENANT',
'催收函-' || (select ct.contract_number
from con_contract ct
where ct.contract_id = cc.contract_id) || '-' ||
(select bp.bp_name
from con_contract_bp bp
where bp.contract_id = cc.contract_id
and bp.bp_category = 'TENANT'),
'催收函-' || (select ct.contract_number
from con_contract ct
where ct.contract_id = cc.contract_id) || '-' ||
(select bp.bp_name
from con_contract_bp bp
where bp.contract_id = cc.contract_id
and bp.bp_category = 'TENANT') || '(担保人-' ||
cc.bp_name || ')') file_name
FROM
fnd_atm_attachment faa,
fnd_atm_attachment_multi m,
hls_doc_file_templet lt,
con_clause_templet t,
con_contract_content_v cc
WHERE
faa.attachment_id = m.attachment_id AND
m.table_name = 'HLS_DOC_FILE_TEMPLET' AND
m.table_pk_value = lt.templet_id AND
lt.templet_id = t.doc_template_id AND
t.templet_code=${@templet_code} and
t.doc_plugin_flag = 'Y' AND
t.templet_id = cc.templet_id AND
(
cc.contract_id =${@contract_id} AND
${/parameter/@batch_flag}='Y'
)
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
<bm:field name="file_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_TYPE_CODE"/>
<bm:field name="file_exists_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_EXISTS_FLAG"/>
<bm:field name="to_file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TO_FILE_NAME"/>
<bm:field name="pwd" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PWD"/>
<bm:field name="content_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTENT_ID"/>
</bm:fields>
</bm:model>
<?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 m.table_name,
m.table_pk_value,
m.record_id,
fa.attachment_id,
fa.file_name,
fa.file_path
FROM fnd_atm_attachment fa,
fnd_atm_attachment_multi m,
CUX_CONTRACT_PRINT t,
con_contract_rent_temp tp
WHERE m.attachment_id = fa.attachment_id
AND fa.source_type_code = 'fnd_atm_attachment_multi'
AND fa.source_pk_value = m.record_id
AND m.table_name = 'CUX_CONTRACT_PRINT'
AND m.table_pk_value = t.print_id
and t.print_id = tp.print_id
and tp.session_id = ${/session/@session_id}
]]></bm:query-sql>
<bm:parameters>
<bm:parameter name="table_pk_value"/>
<bm:parameter name="table_name"/>
</bm:parameters>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" required="true"/>
<bm:field name="table_pk_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_PK_VALUE" required="true"/>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" required="true"/>
<bm:field name="attachment_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTACHMENT_ID" required="true"/>
<bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
<bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2024-10-30 上午09:52:30
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
con_contract_content_pkg.contract_rent_batch(
p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id},
p_content_type =>${@content_type},
p_templet_code=>${@templet_code},
p_session_id =>${/session/@session_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -16,87 +16,49 @@
t2.machineno,
t2.status
from (select t1.*
from (select li.LEASE_NAME equnm,
li.BRAND_VALUE brandname,
li.PATTERN equmdl,
nvl(li.machine_number, li.machine_number_70) vinno,
null machineno,
'1' status,
p.creation_date
from prj_project p, prj_project_lease_item li
where p.project_status not in ('CLOSED', 'CONTRACT_CREATED')
and p.project_id = li.project_id
and p.division != '95'
and (li.machine_number=${@machine_number} or li.machine_number_70=${@machine_number})
union
from (
select li.LEASE_NAME equnm,
li.BRAND_VALUE brandname,
li.brand_value brandname,
li.PATTERN equmdl,
nvl(li.machine_number, li.machine_number_70) vinno,
cc.sign_contract_status sign_contract_status,
null machineno,
CASE
WHEN CC.CONTRACT_STATUS IN
('REPUR', 'ET', 'TERMINATE') then
'3'
else
nvl((select '2'
from con_unearned_finance_income ci
where ci.contract_id = cc.contract_id
and rownum = 1),
'1')
end status,
cc.inception_of_lease creation_date
WHEN CC.CONTRACT_STATUS = 'NEW' and
cc.sign_contract_status in ('SIGN','SIGNING') then
'2'
else '2' end status,
cc.creation_date creation_date
from con_contract cc, prj_project_lease_item li
where cc.project_id = li.project_id
and cc.data_class = 'NORMAL'
and cc.contract_status not in
('RESCIND', 'CANCEL', 'CLOSED')
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING')
and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and cc.division != '95'
and (li.machine_number=${@machine_number} or li.machine_number_70=${@machine_number})
union
select lil.ASSET_NAME equnm,
li.BRAND_VALUE brandname,
lil.SPECIFICATION equmdl,
lil.ASSET_NUM vinno,
null machineno,
'1' status,
p.creation_date
from prj_project p,
prj_project_lease_item li,
prj_project_lease_item_list lil
where p.project_status not in ('CLOSED', 'CONTRACT_CREATED')
and p.project_id = li.project_id
and li.project_lease_item_id = lil.project_lease_item_id
and p.division != '95'
and lil.ASSET_NUM=${@machine_number}
union
select lil.ASSET_NAME equnm,
li.BRAND_VALUE brandname,
li.brand_value brandname,
lil.SPECIFICATION equmdl,
lil.ASSET_NUM vinno,
cc.sign_contract_status sign_contract_status,
null machineno,
CASE
WHEN CC.CONTRACT_STATUS IN
('REPUR', 'ET', 'TERMINATE') then
'3'
else
nvl((select '2'
from con_unearned_finance_income ci
where ci.contract_id = cc.contract_id
and rownum = 1),
'1')
end status,
cc.inception_of_lease creation_date
WHEN CC.CONTRACT_STATUS = 'NEW' and
cc.sign_contract_status in ('SIGN','SIGNING') then
'2'
else '2' end status,
cc.creation_date creation_date
from con_contract cc,
prj_project_lease_item li,
prj_project_lease_item_list lil
where cc.project_id = li.project_id
and cc.data_class = 'NORMAL'
and cc.contract_status not in
('RESCIND', 'CANCEL', 'CLOSED')
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING')
and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and li.project_lease_item_id = lil.project_lease_item_id
and cc.division != '95'
and lil.ASSET_NUM=${/@machine_number}
and lil.ASSET_NUM=${@machine_number}
) t1
order by nvl(t1.creation_date, to_date('2000-01-01', 'yyyy-mm-dd')) desc) t2
where rownum = 1
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:s="leaf.plugin.script" xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select count(*) as con_sum from con_contract_bp ccb where ccb.bp_id=${@bp_id} and ccb.contract_id =${@contract_id} #WHERE_CLAUSE#
]]></bm:query-sql>
<bm:parameters>
<bm:parameter name="con_sum" dataType="java.lang.Long" input="false" output="true" outputPath="@con_sum"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -17,7 +17,16 @@
to_char(due_date, 'yyyy-mm-dd') due_date,
decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=>t.cashflow_id,
p_calc_date=>decode(nvl(${@deposit_flag},'N'),'Y',sysdate,to_date(${@transaction_date}, 'yyyy-mm-dd')),
p_calc_date=>decode(nvl(${@deposit_flag},'N'),'Y',sysdate,
decode(${@trx_transaction_type},'ADVANCE_RECEIPT',
(select ct.transaction_date
from csh_transaction ct
where ct.transaction_id =
(select t.source_csh_trx_id
from csh_transaction t
where t.transaction_id = ${@trx_interface_id})),
to_date(${@transaction_date}, 'yyyy-mm-dd'))
),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y')-nvl(t.received_amount,0),
due_amount) due_amount,
......@@ -27,8 +36,16 @@
interest - nvl(received_interest, 0) unreceived_interest,
decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=>t.cashflow_id,
p_calc_date=>decode(nvl(${@deposit_flag},'N'),'Y',sysdate,to_date(${@transaction_date}, 'yyyy-mm-dd')),
p_user_id=>${/session/@user_id},
p_calc_date=>decode(nvl(${@deposit_flag},'N'),'Y',sysdate,
decode(${@trx_transaction_type},'ADVANCE_RECEIPT',
(select ct.transaction_date
from csh_transaction ct
where ct.transaction_id =
(select t.source_csh_trx_id
from csh_transaction t
where t.transaction_id = ${@trx_interface_id})),
to_date(${@transaction_date}, 'yyyy-mm-dd'))),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) -
nvl(received_amount, 0) unreceived_amount
......
......@@ -105,7 +105,21 @@ end;
<bm:field name="error_message" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_MESSAGE" prompt="CSH_WRITE_OFF_INTERFACE.ERROR_MESSAGE"/>
<bm:field name="trx_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRX_NUMBER" prompt="事务编号"/>
<bm:field name="left_amount" expression="(select decode(cf_item,1,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="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="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="unreceived_amount" expression="(select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>decode(${@trx_transaction_type},
'DEPOSIT',sysdate,
'ADVANCE_RECEIPT',(select ct.transaction_date
from csh_transaction ct
where ct.transaction_id =
(select t.source_csh_trx_id
from csh_transaction t
where t.transaction_id = ${@trx_interface_id})),
to_date(${@transaction_date}, 'yyyy-mm-dd')),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) -nvl(received_amount,0) from con_contract_cashflow where 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 and cf_status = 'RELEASE')" forInsert="false" forUpdate="false"/>
......@@ -119,7 +133,14 @@ end;
<bm:field name="interest" expression="(select interest from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="due_amount" expression="(select decode(cf_item, 9,
CON_OVERDUE_PENALTY_PKG.CALC_PENALTY_FOR_WRITE_OFF(p_cashflow_id=> cashflow_id,
p_calc_date=>decode(${@trx_transaction_type},'DEPOSIT',sysdate,to_date(${@transaction_date}, 'yyyy-mm-dd')),
p_calc_date=>decode(${@trx_transaction_type},'DEPOSIT',sysdate,
'ADVANCE_RECEIPT',(select ct.transaction_date
from csh_transaction ct
where ct.transaction_id =
(select t.source_csh_trx_id
from csh_transaction t
where t.transaction_id = ${@trx_interface_id})),
to_date(${@transaction_date}, 'yyyy-mm-dd')),
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y')-nvl(received_amount,0),
due_amount) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
......
......@@ -83,7 +83,16 @@ select *
from hls_bp_master hm, hls_bp_master_signer hs
where hm.bp_id = hs.bp_id
and hm.bp_id = t1.bp_id_tenant
and hs.id_card = ${@id_no}))) or
and hs.id_card = ${@id_no})
or cs.id_no=(select hm.social_code
from con_contract_bp cb,
hls_bp_master hm,
hls_bp_master_signer hs
where cb.bp_id = hm.bp_id
and cb.gua_signer = hs.hls_bp_signer_id
and cb.contract_id = t1.contract_id
and hs.id_card = ${@id_no}
and cb.bp_class = 'ORG'))) or
(${@account_type} != 'AG' and cs.id_no = ${@id_no}))
and rownum = 1) sign_url,
(SELECT nvl(cs.ec_sign_status, 'N')
......@@ -132,6 +141,33 @@ select *
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)
) or
(${@account_type} = 'AG' and exists
(select 1
from hls_bp_master_signer hs,con_contract_bp bp,hls_bp_master hm
where hs.hls_bp_signer_id = bp.gua_signer
and bp.bp_id = hm.bp_id
and bp.contract_id = t1.contract_id
and bp.bp_category = 'GUARANTOR'
and bp.bp_class = 'ORG'
and hm.social_code = ${@organization_id}
and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)) or
(${@account_type} = 'AG' and exists
(select 1
from hls_bp_master_signer hs,con_contract_change_req cr,con_contract_bp bp,hls_bp_master hm
where hs.hls_bp_signer_id = bp.gua_signer
and cr.change_req_id = t1.contract_id
and bp.bp_id = hm.bp_id
and bp.bp_category = 'GUARANTOR'
and bp.bp_class = 'ORG'
and hm.social_code = ${@organization_id}
and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)
) or
(${@account_type} = 'AG' and exists
(select 1
from con_contract_bp cb,hls_bp_master hbm
......
......@@ -32,18 +32,40 @@
cs.mobile,
hs.signer_category,
cs.esign_type,
(select nvl(hm.bp_name_leg,hm.legal_person)
from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG') legal_person,
(select hm.id_card_no_leg
from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG') id_card_no_leg
decode(hs.signer_category,
'GUARANTOR_ORG_SEAL',
(select hs.name
from con_contract_bp cb,
hls_bp_master hm,
hls_bp_master_signer hs
where cb.bp_id = hm.bp_id
and cb.gua_signer = hs.hls_bp_signer_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG'),
(select nvl(hm.bp_name_leg, hm.legal_person)
from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG')) legal_person,
decode(hs.signer_category,
'GUARANTOR_ORG_SEAL',
(select hs.id_card
from con_contract_bp cb,
hls_bp_master hm,
hls_bp_master_signer hs
where cb.bp_id = hm.bp_id
and cb.gua_signer = hs.hls_bp_signer_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG'),
(select hm.id_card_no_leg
from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG')) id_card_no_leg
from con_contract_ele_signer cs, hls_doc_file_templet_signer hs,con_contract_content cc,con_clause_templet ct
where cs.templet_signer_id = hs.templet_signer_id
and ct.doc_template_id = hs.templet_id
......@@ -55,7 +77,11 @@
where cb.contract_id = cc.contract_id
and hs.signer_category = (cb.bp_category || '_SP')
and cb.sp_sign_flag = 'N'
and cb.id_no_sp = cs.id_no)) t
and cb.id_no_sp = cs.id_no)
and not exists (select 1
from sign_auth_exc sa
where sa.id_no = cs.id_no
and sa.is_auth_flag = 'Y')) t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:oracle="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t" basetable="ZJ_WFL_WORKFLOW_DELIVER" defaultOrderBy="by t.creation_date desc">
<bm:model xmlns:oracle="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t" basetable="ZJ_WFL_WORKFLOW_DELIVER">
<bm:fields>
<bm:field name="recipient_id" databasetype="NUMBER" datatype="java.lang.Long"/>
<bm:field name="date_from" databasetype="DATE" datatype="java.sql.Date" prompt="开始日期"/>
......@@ -49,6 +49,6 @@
</bm:ref-fields>
<bm:data-filters>
<!-- <bm:data-filter name="query" expression="(exists (select 1 from sys_user su where su.user_id= ${/session/@user_id} and (su.user_name in('HAND','HL_ADMIN') or (su.user_name not in('HAND','HL_ADMIN') and su.user_id=t.recipient_id) )))"/>-->
<bm:data-filter name="query" expression="(exists (select 1 from sys_role sr where sr.role_id= ${/session/@role_id} and (sr.role_code in('0017','HAND') or (sr.role_code not in('0017','HAND') and ${/session/@user_id}=t.recipient_id) )))"/>
<bm:data-filter name="query" expression="(exists (select 1 from sys_role sr where sr.role_id= ${/session/@role_id} and (sr.role_code in('0017','HAND') or (sr.role_code not in('0017','HAND') and ${/session/@user_id}=t.recipient_id) ))) order by t.creation_date desc"/>
</bm:data-filters>
</bm:model>
......@@ -6,8 +6,13 @@
{
name : 'approval_date_to',
queryexpression : "trunc(t1.approval_date) <= to_date(${@approval_date_to},'yyyy-mm-dd')"
},
{
name : 'if_history',
queryexpression : "((${@if_history} ='N' and (t1.if_history = 'N' or t1.if_history is null)) or (${@if_history} ='Y' and (t1.if_history in ('N','Y') or t1.if_history is null)))"
}
];
override();
......@@ -6,6 +6,10 @@
{
name : 'approval_date_to',
queryexpression : "trunc(t1.approval_date) <= to_date(${@approval_date_to},'yyyy-mm-dd')"
},
{
name : 'if_history',
queryexpression : "((${@if_history} ='N' and (t1.if_history = 'N' or t1.if_history is null)) or (${@if_history} ='Y' and (t1.if_history in ('N','Y') or t1.if_history is null)))"
}
];
......
......@@ -14,8 +14,13 @@
{
name : 'collection_classes',
queryexpression : "collection_classes = ${@collection_classes}"
},
{
name : 'if_history',
queryexpression : "((${@if_history} ='N' and (t1.if_history = 'N' or t1.if_history is null)) or (${@if_history} ='Y' and (t1.if_history in ('N','Y') or t1.if_history is null)))"
}
];
override();
......@@ -216,7 +216,7 @@
return;
}
//代理店北京慧珠不支持打印纸质合同文本
if(bp_id_agent_code=='D00010038'||bp_id_agent_code=='D00010023'||bp_id_agent_code=='D00010039'){
if(bp_id_agent_code=='D00010038'||bp_id_agent_code=='D00010023'||bp_id_agent_code=='D00010039'||bp_id_agent_code=='D00010040'){
Leaf.showErrorMessage('提示','当前合同不支持打印纸质合同文本!');
return;
}
......
<?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>
<s:server-script><![CDATA[
importPackage(java.util.zip);
importPackage(java.io);
function getdate() {
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
d = now.getDate()
m = m < 10 ? "0" + m : m
d = d < 10 ? "0" + d : d
return y + "" + m + "" + d
}
function writeFile(zos, fn, fp) {
var ze = new ZipEntry(fn);
//zos.setEncoding("UTF-8");//如果是org.apache.tools.zip需要追加字符集
zos.putNextEntry(ze);
var fis = new FileInputStream(fp);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
zos.write(b, 0, len);
}
fis.close();
}
$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");
var date = new Date();
var date_str = getdate();
var doc_code = $ctx.parameter.doc_code;
var filename = doc_code + '-' + date_str + ".zip"
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(filename, 'utf-8'));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
var zos = new ZipOutputStream(resp.getOutputStream());
try {
var attachment_batch_dl = $bm('cont.CON620.con_contract_download_batch_dl');
var result = attachment_batch_dl.queryAsMap();
var arr = result.getChildren();
var file_exist_list = {};
for (var i = 0;i < arr.length;i++) {
var f = arr[i];
if (f.file_path && !file_exist_list[f.file_name]) {
writeFile(zos, f.file_name, f.file_path);
file_exist_list[f.file_name] = 1;
} else {
file_exist_list[f.file_name] = file_exist_list[f.file_name] * 1 + 1;
var last_index = f.file_name.lastIndexOf(".");
var temp_exists_file_name = f.file_name.substr(0, last_index);
var temp_exists_file_type = f.file_name.substr(last_index, f.file_name.length);
temp_exists_file_name = temp_exists_file_name + '-' + file_exist_list[f.file_name] + temp_exists_file_type;
writeFile(zos, temp_exists_file_name, f.file_path);
}
}
} catch (e) {
var logger = $logger("server-script");
logger.severe(e.message)
}
zos.close();
]]></s:server-script>
</a:init-procedure>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-delete model="cont.CON620.con_contract_download_temp"/>
<batch-apply sourcepath="/parameter">
<a:model-insert model="cont.CON620.con_contract_download_temp"/>
<a:model-update model="cont.CON620.con_contract_download_temp"/>
</batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2014-11-20 下午8:50:38
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true"
trace="true">
<a:init-procedure>
<s:server-script import="con_print_path.js"><![CDATA[
set_parameter_file_path();
]]></s:server-script>
<!--<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>-->
</a:init-procedure>
<a:view>
<a:link id="con_rent_temp_link"
url="${/request/@context_path}/modules/cont/CON620/con_contract_rent_temp.lsc"/>
<a:link id="con_rent_download_link"
url="${/request/@context_path}/modules/cont/CON620/create_content_for_collection_download.lsc"/>
<a:link id="con_rent_atm_bacth_link"
url="${/request/@context_path}/modules/cont/CON620/contract_rent_atm_batch_dl.lsc"/>
<a:link id="con_rent_down_signatures_link"
url="${/request/@context_path}/modules/cont/CON620/create_content_for_collection_download_signatures.lsc"/>
<script type="text/javascript"><![CDATA[
//生成催收函word
function con_print_word_create() {
Leaf.Masker.mask(Ext.getBody(), '请稍等......');
var download_type = $('contract_rent_download_ds').getCurrentRecord().get('download_type');
if(Ext.isEmpty(download_type)){
$L.showMessage("提示",'请选择下载类型!');
Leaf.Masker.unmask(Ext.getBody());
return;
}
var result_templet_code ='';
if(download_type=='TEN'){
result_templet_code ='{"CON_LEASE_ORG":"CON_LEASE_ORG"}';
}else if(download_type=='GUA'){
result_templet_code ='{"CON_LEASE_GUA":"CON_LEASE_GUA"}';
}else if(download_type=='ALL'){
result_templet_code = '{"CON_LEASE_ORG":"CON_LEASE_ORG","CON_LEASE_GUA":"CON_LEASE_GUA"}';
}
var result_map ='${/parameter/@result_map}';
Leaf.request({
url: $('con_rent_download_link').getUrl(),
para: {
result_map : result_map,
result_templet_code : result_templet_code
},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
var url_l = $('con_rent_atm_bacth_link').getUrl();
window.open(href = url_l, target = "_self");
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
}
});
}
//生成催收函pdf
function con_print_signatures_create() {
Leaf.Masker.mask(Ext.getBody(), '请稍等......');
var download_type = $('contract_rent_download_ds').getCurrentRecord().get('download_type');
if(Ext.isEmpty(download_type)){
$L.showMessage("提示",'请选择下载类型!');
Leaf.Masker.unmask(Ext.getBody());
return;
}
var result_templet_code ='';
if(download_type=='TEN'){
result_templet_code ='{"CON_LEASE_ORG":"CON_LEASE_ORG"}';
}else if(download_type=='GUA'){
result_templet_code ='{"CON_LEASE_GUA":"CON_LEASE_GUA"}';
}else if(download_type=='ALL'){
result_templet_code = '{"CON_LEASE_ORG":"CON_LEASE_ORG","CON_LEASE_GUA":"CON_LEASE_GUA"}';
}
var result_map ='${/parameter/@result_map}';
Leaf.request({
url: $('con_rent_down_signatures_link').getUrl(),
para: {
result_map : result_map,
result_templet_code : result_templet_code
},
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
var url_l = $('con_rent_atm_bacth_link').getUrl();
window.open(href = url_l, target = "_self");
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
}
});
}
]]></script>
<a:dataSets>
<a:dataSet id="DOWNLOAD_TYPE_DS" lookupCode="DOWNLOAD_TYPE"/>
<a:dataSet id="contract_rent_download_ds" autoCreate="true">
<a:fields>
<a:field name="download_type"/>
<a:field name="download_type_desc" options="DOWNLOAD_TYPE_DS"
returnField="download_type" displayField="code_value_name" valueField="code_value" required="true"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton id="con_print_id" click="con_print_word_create" text="生成催收函Word"/>
<a:gridButton id="con_print_signatures_id" click="con_print_signatures_create" text="生成催收函PDF"/>
</a:screenTopToolbar>
<a:form >
<a:comboBox name="download_type_desc" prompt="下载类型" bindTarget="contract_rent_download_ds"/>
</a:form>
</a:screenBody>
</a:view>
</a:screen>
<?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>
<s:server-script><![CDATA[
importPackage(java.util.zip);
importPackage(java.io);
function getdate() {
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
d = now.getDate()
m = m < 10 ? "0" + m : m
d = d < 10 ? "0" + d : d
return y + "" + m + "" + d
}
function writeFile(zos, fn, fp) {
var ze = new ZipEntry(fn);
//zos.setEncoding("UTF-8");//如果是org.apache.tools.zip需要追加字符集
zos.putNextEntry(ze);
var fis = new FileInputStream(fp);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
zos.write(b, 0, len);
}
fis.close();
}
$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");
var date = new Date();
var date_str = getdate();
var doc_code = '催收函';
var filename = doc_code + '-' + date_str + ".zip"
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(filename, 'utf-8'));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
var zos = new ZipOutputStream(resp.getOutputStream());
try {
var attachment_batch_dl = $bm('cont.CON620.contract_rent_batch_dl');
var result = attachment_batch_dl.queryAsMap();
var arr = result.getChildren();
var file_exist_list = {};
for (var i = 0;i < arr.length;i++) {
var f = arr[i];
if (f.file_path && !file_exist_list[f.file_name]) {
writeFile(zos, f.file_name, f.file_path);
file_exist_list[f.file_name] = 1;
} else {
file_exist_list[f.file_name] = file_exist_list[f.file_name] * 1 + 1;
var last_index = f.file_name.lastIndexOf(".");
var temp_exists_file_name = f.file_name.substr(0, last_index);
var temp_exists_file_type = f.file_name.substr(last_index, f.file_name.length);
temp_exists_file_name = temp_exists_file_name + '-' + file_exist_list[f.file_name] + temp_exists_file_type;
writeFile(zos, temp_exists_file_name, f.file_path);
}
}
} catch (e) {
var logger = $logger("server-script");
logger.severe(e.message)
}
zos.close();
]]></s:server-script>
</a:init-procedure>
</a:service>
<?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>
<s:server-script import="con_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j)
importPackage(Packages.org.apache.commons.io);
function RandomString(length) {
var str = '';
for (;str.length < length;str += Math.random().toString(36).substr(2));
return str.substr(0, length);
}
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
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 getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.file_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 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_path, file_name) {
$ctx["__request_type__"] = 'file';
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'utf-8'));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
try {
var os = resp.getOutputStream();
write_os_to_file(file_path, os);
//write_os_to_file(file_path+file_name, os);
os.flush();
} catch (e) {
$logger("server-script").severe(e.message);
}
}
function collection_create_content() {
try {
//获取日期目录
set_parameter_file_path();
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('cont.CON620.con_contract_download_get_atm').queryAsMap({
templet_code: $ctx.parameter.templet_code
});
var from_file_data = from_file_data_map.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
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 + '.' + record_data.file_type_code || 'doc';
var from_file_path = record_data.file_path;
$ctx.parameter.contract_id = record_data.contract_id;
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 + 'con' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
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);
} catch (e) {
raise_app_error(e);
}
$bm('cont.CON500.con_file_content_copy_update').update({
table_name: 'CON_CONTRACT_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString()
});
var test=new File(to_file_path);
var test1=new File('D:'+to_file_path);
//download_file(to_file_path.toString(),to_file_name.toString());
//插入催收信息记录
$bm('cont.CON620.con_collection_message_create').update({
contract_id: record_data.contract_id,
templet_code: $ctx.parameter.templet_code
});
}
}
$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>
......@@ -5,12 +5,12 @@
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j)
importPackage(Packages.org.apache.commons.io);
importPackage(Packages.com.hand.hl);
function RandomString(length) {
var str = '';
for (;str.length < length;str += Math.random().toString(36).substr(2));
return str.substr(0, length);
function RandomString(length) {   
var str = '';   
for (;str.length < length;str += Math.random().toString(36).substr(2));   
return str.substr(0, length); 
}
//删除文件
......@@ -37,7 +37,7 @@
//按日期创建目录
function getDatePath() {
set_pdf_parameter_file_path();
set_parameter_file_path();
var file_path = $ctx.parameter.file_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
......@@ -47,16 +47,6 @@
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function get_file_length(path){
var file=new File(String(path));
if(file.exists() && file.isFile()){
length=file.length();
return length;
}else{
return 0 ;
}
}
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);
......@@ -97,7 +87,7 @@
var datePath = getDatePath();
$ctx.parameter.batch_flag='Y';
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('cont.CON500.con_doc_file_templet_get_atm_new').queryAsMap({
var from_file_data_map = $bm('cont.CON620.con_doc_file_templet_for_content').queryAsMap({
contract_id: $ctx.parameter.contract_id,
batch_flag:$ctx.parameter.batch_flag,
templet_code: $ctx.parameter.templet_code
......@@ -120,28 +110,19 @@
} catch (e) {
raise_app_error(e);
}
<!-- $bm('cont.CON500.con_file_content_copy_update').update({-->
<!-- table_name: 'CON_CONTRACT_CONTENT',-->
<!-- content_id: record_data.content_id,-->
<!-- file_name: to_file_name.toString(),-->
<!-- file_path: to_file_path.toString()-->
<!-- });-->
$bm('cont.CON500.con_file_content_copy_update').update({
table_name: 'CON_CONTRACT_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString()
});
var test=new File(to_file_path);
var test1=new File('D:'+to_file_path);
<!-- download_file(to_file_path.toString(),to_file_name.toString());-->
var file_size=get_file_length(to_file_path);
var business_daily_email=$bm('cont.CON301N.insert_into_attachment_bmp').update({
p_file_path :(to_file_path).toString(),
p_file_name :($ctx.parameter.file_name+'.docx').toString(),
p_file_size :file_size,
p_user_id :$ctx.session.user_id,
p_contract_id :$ctx.parameter.contract_id,
p_file_type :'WORD',
p_lease_type :'02'
});
download_file(to_file_path.toString(),to_file_name.toString());
}
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
......
<?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>
<s:server-script import="con_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.org.apache.commons.io);
importPackage(Packages.com.hand.hl);
importPackage(java.util.zip);
function RandomString(length) {
var str = '';
for (;str.length < length;str += Math.random().toString(36).substr(2));
return str.substr(0, length);
}
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
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 getdate() {
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
d = now.getDate()
m = m < 10 ? "0" + m : m
d = d < 10 ? "0" + d : d
return y + "" + m + "" + d
}
//按日期创建目录
function getDatePath() {
set_pdf_parameter_file_path();
var file_path = $ctx.parameter.file_path;
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;
}
function get_file_length(path){
var file=new File(String(path));
if(file.exists() && file.isFile()){
length=file.length();
return length;
}else{
return 0 ;
}
}
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_path, file_name) {
$ctx["__request_type__"] = 'file';
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'utf-8'));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
try {
var os = resp.getOutputStream();
write_os_to_file(file_path, os);
//write_os_to_file(file_path+file_name, os);
os.flush();
} catch (e) {
$logger("server-script").severe(e.message);
}
}
//压缩文件
function writeFile(zos, fn, fp) {
var ze = new ZipEntry(fn);
//zos.setEncoding("UTF-8");//如果是org.apache.tools.zip需要追加字符集
zos.putNextEntry(ze);
var fis = new FileInputStream(fp);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
zos.write(b, 0, len);
}
fis.close();
}
try {
var resultStr = $ctx.parameter.result_map;
var result_templet_code = $ctx.parameter.result_templet_code;
var jm = JSON.parse(resultStr);
var te = JSON.parse(result_templet_code);
//清除批次表数据
$bm('cont.CON620.con_contract_rent_temp').execute();
for(var key in jm){
var hds = jm[key];
//转为数组
var hdsArr = hds.split(',');
//循环合同
for(var m =0; m< hdsArr.length; m++){
var contract_id = hdsArr[m];
//循环模板
for(var key in te){
var template = te[key];
//转为数组
var templateArr = template.split(',');
for(var j =0; j< templateArr.length; j++){
var templet_code = templateArr[j];
//第一步生成合同文本
if(templet_code=='CON_LEASE_ORG'){
content_type ='FIN';
}else{
content_type ='GUA';
}
$bm('cont.CON620.create_contract_rent_batch').update({
contract_id: contract_id,
content_type: content_type,
templet_code: templet_code
});
//获取日期目录
set_parameter_file_path();
var datePath = getDatePath();
$ctx.parameter.batch_flag='Y';
$ctx.parameter.contract_id=contract_id;
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('cont.CON620.con_doc_file_templet_get_atm_batch').queryAsMap({
contract_id: contract_id,
batch_flag:$ctx.parameter.batch_flag,
templet_code: templet_code
});
var from_file_data = from_file_data_map.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
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 + '.' + record_data.file_type_code || 'doc';
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 + 'con' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
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);
} catch (e) {
raise_app_error(e);
}
var test=new File(to_file_path);
var test1=new File('D:'+to_file_path);
var file_size=get_file_length(to_file_path);
if(templet_code == 'CON_LEASE_GUA'){
var lease_type='03';
}else {
lease_type='02';
}
var business_daily_email=$bm('cont.CON301N.insert_into_attachment_bmp').update({
p_file_path :(to_file_path).toString(),
p_file_name :(record_data.file_name+'.docx').toString(),
p_file_size :file_size,
p_user_id :$ctx.session.user_id,
p_contract_id :contract_id,
p_file_type :'WORD',
p_lease_type :lease_type
});
}
}
}
}
}
}
} catch (e) {
raise_app_error(e);
}
]]></s:server-script>
</a:init-procedure>
</a:service>
......@@ -105,7 +105,7 @@ function collection_create_content() {
var datePath = getDatePath();
$ctx.parameter.batch_flag='Y';
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('cont.CON500.con_doc_file_templet_get_atm_new').queryAsMap({
var from_file_data_map = $bm('cont.CON620.con_doc_file_templet_get_atm_batch').queryAsMap({
contract_id: $ctx.parameter.contract_id,
batch_flag:$ctx.parameter.batch_flag,
templet_code: $ctx.parameter.templet_code
......@@ -143,14 +143,14 @@ function collection_create_content() {
}else {
lease_type='02'
}
var business_daily_email=$bm('cont.CON301N.insert_into_attachment_bmp').update({
p_file_path :(to_file_path).toString(),
p_file_name :($ctx.parameter.file_name+'.docx').toString(),
p_file_size :file_size,
p_user_id :$ctx.session.user_id,
p_contract_id :$ctx.parameter.contract_id,
p_file_type :'WORD',
p_lease_type :lease_type
var business_daily_email=$bm('cont.CON301N.insert_into_attachment_bmp').update({
p_file_path :(to_file_path).toString(),
p_file_name :(record_data.file_name+'.docx').toString(),
p_file_size :file_size,
p_user_id :$ctx.session.user_id,
p_contract_id :$ctx.parameter.contract_id,
p_file_type :'WORD',
p_lease_type :lease_type
});
}
}
......
......@@ -27,16 +27,24 @@
}
//第一步生成合同文本
$bm('cont.CON620.create_content_for_collection').update({
contract_id: $ctx.parameter.contract_id,
templet_code: $ctx.parameter.templet_code
});
if($ctx.parameter.templet_code == 'CON_LEASE_GUA'){
$bm('cont.CON620.create_content_for_collection').execute({
contract_id: $ctx.parameter.contract_id,
templet_code: $ctx.parameter.templet_code,
bp_code: $ctx.parameter.bp_code
});
}else {
$bm('cont.CON620.create_content_for_collection').update({
contract_id: $ctx.parameter.contract_id,
templet_code: $ctx.parameter.templet_code
});
}
//获取日期目录
var datePath = getDate();
$ctx.parameter.batch_flag='Y';
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('cont.CON500.con_doc_file_templet_get_atm_new').queryAsMap({
var from_file_data_map = $bm('cont.CON620.con_doc_file_templet_get_atm_batch').queryAsMap({
contract_id: $ctx.parameter.contract_id,
batch_flag:$ctx.parameter.batch_flag,
templet_code: $ctx.parameter.templet_code
......@@ -86,14 +94,20 @@
var file_size=get_file_length(datePath+ guid_file_name_tables[0].guid_file_name + 'con' + record_data.content_id + '.pdf' );
var download_file = datePath + guid_file_name_tables[0].guid_file_name + 'con' + record_data.content_id + ".pdf";
if($ctx.parameter.templet_code == 'CON_LEASE_GUA'){
var lease_type='03';
}else {
lease_type='02'
}
var business_daily_email=$bm('cont.CON301N.insert_into_attachment_bmp').update({
p_file_path :(download_file).toString(),
p_file_name :($ctx.parameter.file_name+'.pdf').toString(),
p_file_name :(record_data.file_name+'.pdf').toString(),
p_file_size :file_size,
p_user_id :$ctx.session.user_id,
p_contract_id :$ctx.parameter.contract_id,
p_file_type :'PDF',
p_lease_type :'02'
p_lease_type :lease_type
});
println('download_file' + download_file);
<!-- download_file(datePath + guid_file_name_tables[0].guid_file_name + 'con' + record_data.content_id + '.pdf' ,'催收函.pdf');-->
......
......@@ -709,7 +709,6 @@
//获取月结期间是否关闭
function get_period_closed(date){
debugger;
var csh_confirm_flag;
$L.request({
url: '${/request/@context_path}/autocrud/csh.CSH531N.csh_data_confirm/query',
......@@ -736,14 +735,13 @@
}
function check_transaction(){
debugger;
var transaction_ds = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var transaction_ds = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var paid_byother_flag=transaction_ds.get('paid_byother_flag');
var collection_classes=transaction_ds.get('collection_classes');
var guarantor_name_duty=transaction_ds.get('guarantor_name_duty');
var transaction_type=transaction_ds.get('transaction_type');
if(paid_byother_flag=='T' && collection_classes=='COMBINED'
&& Ext.isEmpty(guarantor_name_duty) && transaction_type=='ADVANCE_RECEIPT'){
&& guarantor_name_duty=='NULL' && transaction_type=='ADVANCE_RECEIPT'){
return false;
}
return true;
......@@ -808,14 +806,14 @@
var transaction_type = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_type');
//核销为融租保证金
for(var j=0;j<depositRs.length;j++){
if(!get_period_closed(transaction_date) &&!check_transaction()
if(!get_period_closed(transaction_date) &&check_transaction()
&&(depositRs[j].get('write_off_date').getFullYear() !=transaction_date.getFullYear()||depositRs[j].get('write_off_date').getMonth()+1 !=transaction_date.getMonth()+1)){
depositRs_date_count = plus(depositRs_date_count, 1);
}
}
//核销为经租保证金
for(var j=0;j<operatRs.length;j++){
if(!get_period_closed(transaction_date) &&!check_transaction()
if(!get_period_closed(transaction_date) &&check_transaction()
&&(operatRs[j].get('write_off_date').getFullYear() !=transaction_date.getFullYear()||operatRs[j].get('write_off_date').getMonth()+1 !=transaction_date.getMonth()+1)){
operatRs_date_count = plus(operatRs_date_count, 1);
}
......@@ -900,8 +898,7 @@
<!-- <a:field name="write_off_date" defaultValue="${/model/sys_default_value/record/@now_time}" required="true"/> -->
<a:field name="write_off_date" readOnly="true"/>
<a:field name="paid_byother_flag_n" readOnly="true"/>
<a:field name="guarantor_name_duty" readOnly="true"/>
<a:field name="ref_contract_num" readOnly="true"/>
<a:field name="ref_contract_num" readOnly="true"/>
<a:field name="bank_slip_num" readOnly="true"/>
<a:field name="bp_code" readOnly="true"/>
<a:field name="bp_category" readOnly="true"/>
......@@ -928,7 +925,7 @@
<a:field name="ref_v01"/>
<a:field name="approving_return_amount" readOnly="true"/>
<a:field name="for_allocate_amount" readOnly="true" />
</a:fields>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_write_off_interface_ds" autoQuery="true" fetchAll="true"
......@@ -954,7 +951,7 @@
<a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="contract_number" prompt="合同编号" autoComplete="true" lovAutoQuery="true"
lovHeight="850" required="true"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}&amp;deposit_flag=${/parameter/@deposit_flag}&amp;transaction_date=${/model/csh_transaction_path/record/@transaction_date}"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}&amp;deposit_flag=${/parameter/@deposit_flag}&amp;transaction_date=${/model/csh_transaction_path/record/@transaction_date}&amp;trx_interface_id=${/model/csh_transaction_path/record/@transaction_id}&amp;trx_transaction_type=${/model/csh_transaction_path/record/@transaction_type}"
lovWidth="1550" title="合同号选择">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
......
......@@ -99,8 +99,15 @@
'country_id': 32,
'country_id_n': '中华人民共和国'
});
var record3 = new Leaf.Record({
'address_type': 'HOUSE_ADDRESS',
'address_type_n': '居住住址',
'country_id': 32,
'country_id_n': '中华人民共和国'
});
address_ds_id_ds.add(record1);
address_ds_id_ds.add(record2);
address_ds_id_ds.add(record3);
var address_record = address_ds_id_ds.getAt(0);
address_record.getField('address_type_n').setReadOnly(true);
......@@ -110,6 +117,10 @@
address_record1.getField('address_type_n').setReadOnly(true);
address_record1.getField('country_id_n').setReadOnly(true);
var address_record2 = address_ds_id_ds.getAt(2);
address_record2.getField('address_type_n').setReadOnly(true);
address_record2.getField('country_id_n').setReadOnly(true);
}else if (address_bp_record.get('bp_class') == 'ORG'&&record.get('bp_type') != 'THIRD_PARTY'){
//法人
//POSTAL_ADDRESS 通讯地址
......@@ -120,11 +131,21 @@
'country_id': 32,
'country_id_n': '中华人民共和国'
});
var record3 = new Leaf.Record({
'address_type': 'HOUSE_ADDRESS',
'address_type_n': '居住住址',
'country_id': 32,
'country_id_n': '中华人民共和国'
});
address_ds_id_ds.add(record2);
address_ds_id_ds.add(record3);
var address_record = address_ds_id_ds.getAt(0);
address_record.getField('address_type_n').setReadOnly(true);
address_record.getField('country_id_n').setReadOnly(true);
var address_record1 = address_ds_id_ds.getAt(1);
address_record1.getField('address_type_n').setReadOnly(true);
address_record1.getField('country_id_n').setReadOnly(true);
}
//征信 企业默认添加 法定代表人 企业关联信息记录 add start
var company_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_company_info');
......@@ -1167,6 +1188,10 @@
}
}
}
if(name== 'other_relationships' && value && record){
record.set('identity_type',' ');
record.set('identity_type_n',' ');
}
}
......
......@@ -100,8 +100,15 @@
'country_id': 32,
'country_id_n': '中华人民共和国'
});
var record3 = new Leaf.Record({
'address_type': 'HOUSE_ADDRESS',
'address_type_n': '居住住址',
'country_id': 32,
'country_id_n': '中华人民共和国'
});
address_ds_id_ds.add(record1);
address_ds_id_ds.add(record2);
address_ds_id_ds.add(record3);
var address_record = address_ds_id_ds.getAt(0);
address_record.getField('address_type_n').setReadOnly(true);
......@@ -111,6 +118,10 @@
address_record1.getField('address_type_n').setReadOnly(true);
address_record1.getField('country_id_n').setReadOnly(true);
var address_record2 = address_ds_id_ds.getAt(2);
address_record2.getField('address_type_n').setReadOnly(true);
address_record2.getField('country_id_n').setReadOnly(true);
}else if (address_bp_record.get('bp_class') == 'ORG'&&record.get('bp_type') != 'THIRD_PARTY'){
//法人
//POSTAL_ADDRESS 通讯地址
......@@ -120,12 +131,23 @@
'address_type_n': '通讯地址',
'country_id': 32,
'country_id_n': '中华人民共和国'
});
var record3 = new Leaf.Record({
'address_type': 'HOUSE_ADDRESS',
'address_type_n': '居住住址',
'country_id': 32,
'country_id_n': '中华人民共和国'
});
address_ds_id_ds.add(record2);
address_ds_id_ds.add(record3);
var address_record = address_ds_id_ds.getAt(0);
address_record.getField('address_type_n').setReadOnly(true);
address_record.getField('country_id_n').setReadOnly(true);
var address_record1 = address_ds_id_ds.getAt(1);
address_record1.getField('address_type_n').setReadOnly(true);
address_record1.getField('country_id_n').setReadOnly(true);
}
//征信 企业默认添加 法定代表人 企业关联信息记录 add start
var company_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_company_info');
......
......@@ -1046,6 +1046,10 @@
}
}
}
if(name== 'other_relationships' && value && record){
record.set('identity_type',' ');
record.set('identity_type_n',' ');
}
}
//法人身份证号校验
......
......@@ -1295,6 +1295,10 @@
}
}
}
if(name== 'other_relationships' && value && record){
record.set('identity_type',' ');
record.set('identity_type_n',' ');
}
}
var test_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master_req');
......
......@@ -157,9 +157,14 @@
id_no:signer_record_data.id_card_no_leg
});
var ele_org_signer_data = ele_org_signer_map.getChildren();
//经办人
var agentName = ele_org_signer_data[0].bp_name;
var agentIdNo = ele_org_signer_data[0].id_no;
var mobile = ele_org_signer_data[0].mobile;
//法人
var legalName = signer_record_data.legal_person;
var legalIdNo = signer_record_data.id_card_no_leg;
if (agentIdNo == legalIdNo) {
userInfoList.push({
"idNo": signer_record_data.id_no,
"name": signer_record_data.bp_name,
......@@ -171,6 +176,19 @@
"agentType": "1",
"signerCategory":signer_record_data.signer_category
});
} else {
userInfoList.push({
"idNo": signer_record_data.id_no,
"name": signer_record_data.bp_name,
"agentIdNo": agentIdNo,
"agentName": agentName,
"mobile": mobile,
"legalName": agentName,
"legalIdNo": agentIdNo,
"agentType": "2",
"signerCategory":signer_record_data.signer_category
});
}
} else if (signer_record_data.signer_category == 'AGENCY_STORE_SEAL' || signer_record_data.signer_category == 'MAN_FACTURER_SEAL'|| signer_record_data.signer_category == 'SUPPLIER_SEAL'|| signer_record_data.signer_category == 'LEASE_SUPPLIER_SEAL') {
var signer_category;
if (signer_record_data.signer_category == 'AGENCY_STORE_SEAL'){
......
......@@ -143,7 +143,7 @@
var params = [];
for(var i=0;i<records.length;i++){
if (records[i].get('checked') =='Y'&&records[i].get('record_id')){
if(position_code == '007' && records[i].get('workflow_code')!='CONTRACT_SIGN_WFL'){
if((position_code == '007'||position_code == '9067') && records[i].get('workflow_code')!='CONTRACT_SIGN_WFL'){
Leaf.showMessage('提示','仅合同签约工作流可批量审批!');
return ;
}
......
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