Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
0e4b3642
Commit
0e4b3642
authored
Feb 13, 2023
by
18083
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子档案-待生成清单及token获取
parent
c2fea836
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
240 additions
and
0 deletions
+240
-0
check_token_valid.lwm
...app/WEB-INF/classes/efile/EFILE1000/check_token_valid.lwm
+19
-0
efile_get_token.lwm
...ebapp/WEB-INF/classes/efile/EFILE1000/efile_get_token.lwm
+59
-0
archives_post_list.lwm
...pp/WEB-INF/classes/efile/EFILE1020/archives_post_list.lwm
+41
-0
efile_get_token.lsc
src/main/webapp/modules/efile/EFILE1000/efile_get_token.lsc
+63
-0
archives_post_list.lview
...n/webapp/modules/efile/EFILE1020/archives_post_list.lview
+58
-0
No files found.
src/main/webapp/WEB-INF/classes/efile/EFILE1000/check_token_valid.lwm
0 → 100644
View file @
0e4b3642
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023年2月7日 09点13分
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:e=
"leaf.service.exception"
xmlns:o=
"leaf.database.local.oracle"
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
xmlns:f=
"leaf.database.features"
needAccessControl=
"false"
>
<bm:fields>
<bm:field
name=
"is_valid"
databaseType=
"VARCHAR2"
datatype=
"java.lang.String"
/>
</bm:fields>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select token_post_pkg.check_token_valid is_valid from dual
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/efile/EFILE1000/efile_get_token.lwm
0 → 100644
View file @
0e4b3642
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-7-14 下午03:09:37
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:o=
"leaf.database.local.oracle"
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
xmlns:f=
"leaf.database.features"
needAccessControl=
"false"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
SELECT t.access_token
FROM (SELECT v.record_id, v.access_token
FROM token_record_info v
where v.start_time <= sysdate
and v.over_time >
= sysdate
order by v.record_id desc) t
where rownum = 1
]]>
</bm:query-sql>
</bm:operation>
<bm:operation
name=
"update"
>
<bm:update-sql>
<![CDATA[
begin
token_post_pkg.insert_token_recode(p_system_source =>
${@system_source},
p_expires_in =>${@expires_in},
p_access_token =>${@access_token},
p_user_id => ${/session/@user_id}
);
end;]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"insert"
>
<bm:update-sql>
<![CDATA[
begin
insert into token_response_logs
(
log_id,
response_json,
status,
created_by,
creation_date,
last_updated_by,
last_update_date
) values
(token_response_logs_s.nextval,
${@json},
${@status},
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
commit;
end;]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field
name=
"access_token"
/>
</bm:fields>
</bm:model>
src/main/webapp/WEB-INF/classes/efile/EFILE1020/archives_post_list.lwm
0 → 100644
View file @
0e4b3642
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select
t.e_archives_id,
t.base_archive_code,
t.archive_type,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'ELEC_FILE_TYPE'
and v.code_value = t.archive_type) archive_type_desc,
t.document_id,
t.document_number,
t.document_info,
t.done_flag,
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'DONE_FLAG_STATUS'
and v.code_value = t.done_flag) done_flag_desc,
t.error_message,
to_char(t.last_update_date,'yyyy-mm-dd') last_update_date
from hl_e_archives_post_list t
#WHERE_CLAUSE#
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"archive_type"
queryExpression=
"t.archive_type like ${@archive_type}"
/>
<bm:query-field
name=
"done_flag"
queryExpression=
"t.done_flag=${@done_flag}"
/>
<bm:query-field
name=
"document_id"
queryExpression=
"t.document_id=${@document_id}"
/>
</bm:query-fields>
</bm:model>
src/main/webapp/modules/efile/EFILE1000/efile_get_token.lsc
0 → 100644
View file @
0e4b3642
<?xml version="1.0" encoding="UTF-8"?>
<a:service
xmlns:p=
"uncertain.proc"
xmlns:a=
"http://www.leaf-framework.org/application"
xmlns:s=
"leaf.plugin.script"
trace=
"true"
>
<a:init-procedure>
<s:server-script
import=
"token_record.js"
>
<![CDATA[
try {
var sys_url_bm = $bm('cont.CON4000.get_sys_url');
var parameter_code = 'TOKEN_POSTURL';
var SysposturlQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var posturl = SysposturlQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_APPID';
var SysappidQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var token_appid = SysappidQuery.getChildren()[0].parameter_value;
var parameter_code = 'TOKEN_APPSECRET';
var SysappsecretQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var token_appsecret = SysappsecretQuery.getChildren()[0].parameter_value;
var token_savelogs_bm = $bm('efile.EFILE1000.efile_get_token');
//token是否在有效期内,在有效期内直接获取表中的token
var check_token_valid_bm = $bm('efile.EFILE1000.check_token_valid');
var checkTokenQuery = check_token_valid_bm.queryAsMap();
var is_valid = checkTokenQuery.getChildren()[0].is_valid;
if (is_valid == 'true') {
var SystokenQuery = token_savelogs_bm.queryAsMap();
var access_token = SystokenQuery.getChildren()[0].access_token;
} else {
println("=======有效期外======");
var data = httpPostGetToken(posturl, token_appid, token_appsecret);
var json = JSON.parse(data);
var access_token = json.access_token;
var status = json.status;
if (access_token) {
token_savelogs_bm.insert({
'json': data,
'status': 'success'
})
token_savelogs_bm.update({
'system_source': 'hlcm',
'expires_in': json.expires_in,
'access_token': access_token
})
}
if (status) {
var token_savelogs_bm = $bm('efile.EFILE1000.token_savelogs');
token_savelogs_bm.insert({
'json': json,
'status': 'fail'
});
}
}
} catch (e) {
println('e:' + e);
}
]]>
</s:server-script>
</a:init-procedure>
</a:service>
src/main/webapp/modules/efile/EFILE1020/archives_post_list.lview
0 → 100644
View file @
0e4b3642
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午1:37:08
$Revision: 1.0
$Purpose: 待生成电子档案清单
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
>
<a:view>
<script
type=
"text/javascript"
>
<![CDATA[
function efile1020_query(){
$('archives_pool_list_ds').query();
}
//重置按钮
function efile1020_reset() {
$('archives_post_list_query').reset();
}
]]>
</script>
<a:dataSets>
<a:dataSet
id=
"archive_type_ds"
lookupCode=
"ELEC_FILE_TYPE"
/>
<a:dataSet
id=
"done_flag_ds"
lookupCode=
"DONE_FLAG_STATUS"
/>
<a:dataSet
id=
"archives_post_list_query"
autoCreate=
"true"
>
<a:fields>
<a:field
name=
"document_id"
/>
<a:field
name=
"archive_type"
/>
<a:field
name=
"archive_type_desc"
displayField=
"code_value_name"
options=
"archive_type_ds"
returnField=
"archive_type"
valueField=
"code_value"
/>
<a:field
name=
"done_flag"
/>
<a:field
name=
"done_flag_desc"
displayField=
"code_value_name"
options=
"done_flag_ds"
returnField=
"done_flag"
valueField=
"code_value"
/>
</a:fields>
</a:dataSet>
<a:dataSet
id=
"archives_pool_list_ds"
autoQuery=
"true"
model=
"efile.EFILE1020.archives_post_list"
queryDataSet=
"archives_post_list_query"
selectable=
"true"
>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton
click=
"efile1020_query"
text=
"HLS.QUERY"
/>
<a:gridButton
click=
"efile1020_reset"
text=
"HLS.RESET"
/>
<a:gridButton
click=
"efile1020_generated"
text=
"生成电子档案"
/>
</a:screenTopToolbar>
<a:form
column=
"4"
marginWidth=
"200"
title=
"查询条件"
>
<a:comboBox
name=
"archive_type_desc"
bindTarget=
"archives_post_list_query"
prompt=
"资料类型"
/>
<a:textField
name=
"document_id"
bindTarget=
"archives_post_list_query"
prompt=
"资料来源"
/>
<a:comboBox
name=
"done_flag_desc"
bindTarget=
"archives_post_list_query"
prompt=
"生成状态"
/>
</a:form>
<a:grid
id=
"archives_pool_list_ds_id"
bindTarget=
"archives_pool_list_ds"
marginHeight=
"200"
marginWidth=
"200"
navBar=
"true"
>
<a:columns>
<a:column
name=
"archive_type_desc"
prompt=
"资料类型"
width=
"150"
/>
<a:column
name=
"document_id"
prompt=
"资料来源"
width=
"150"
/>
<a:column
name=
"done_flag_desc"
prompt=
"生成状态"
width=
"100"
/>
<a:column
name=
"error_message"
prompt=
"日志"
width=
"150"
/>
<a:column
name=
"last_update_date"
renderer=
"Leaf.formatDate"
prompt=
"最后更新时间"
width=
"150"
/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment