Commit 1410e64f authored by Luochenglong's avatar Luochenglong

缺失文件迁移

parent 9563a53a
<?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" xmlns:f="leaf.database.features" alias="t1" baseTable="E_ARCHIVES_DEFINE_DATA" defaultOrderBy="cloumn_code"
<bm:fields>
<bm:field name="base_archive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASE_ARCHIVE_ID" />
<bm:field name="sture_data_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="STURE_DATA_ID" />
<bm:field name="cloumn_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOUMN_CODE" />
<bm:field name="cloumn_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOUMN_NAME" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.base_archive_id,
t1.sture_data_id,
t1.cloumn_code,
t1.cloumn_name
from E_ARCHIVES_DEFINE_DATA t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_update(
p_sql_type =>'INSERT',
p_sture_data_id => ${@sture_data_id},
p_base_archive_id => ${@base_archive_id},
p_cloumn_code => ${@cloumn_code},
p_cloumn_name => ${@cloumn_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_update(
p_sql_type =>'UPDATE',
p_sture_data_id => ${@sture_data_id},
p_base_archive_id => ${@base_archive_id},
p_cloumn_code => ${@cloumn_code},
p_cloumn_name => ${@cloumn_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
elec_wfl_pkg.cloumn_code_delete(
p_sture_data_id => ${@sture_data_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="base_archive_id" enforceOperations="query" expression="base_archive_id=${@base_archive_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-2-7 下午2:36:27
$Revision: 1.0
$Purpose:
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" defaultOrderBy="workflow_id desc" extend="zjwfl.zj_wfl_workflow">
<ns1:fields>
<ns1:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<ns1:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="流程代码"/>
<ns1:field name="workflow_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="流程描述"/>
<ns1:field name="workflow_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_ID"/>
<ns1:field name="sub_category"/>
<ns1:field name="enabled_flag"/>
</ns1:fields>
<ns1:query-fields>
<ns1:query-field field="workflow_code" queryOperator="like"/>
<ns1:query-field field="workflow_desc" queryOperator="like"/>
<ns1:query-field field="sub_category" queryExpression="t1.sub_category = ${/parameter/@sub_category}"/>
<ns1:query-field field="workflow_type_id" queryExpression="t1.workflow_type_id = ${/parameter/@workflow_type_id}"/>
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
</ns1:data-filters>
</ns1:model>
<?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);
println(data);
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>
...@@ -5,7 +5,61 @@ ...@@ -5,7 +5,61 @@
$Revision: 1.0 $Revision: 1.0
$Purpose: 附件列表 $Purpose: 附件列表
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application"> <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><![CDATA[
function newMap(name) {
return new CompositeMap("a", 'http://www.aurora-framework.org/application',
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
var sql_content;
var query_validation_sql_bm = $bm('efile.EFILE1030.efile_pool_att_para_sql');
var config_map = query_validation_sql_bm.queryAsMap(para);
var config_map_detail = config_map.getChildren();
if (config_map_detail.length != 0) {
sql_content = config_map_detail[0].sql_content;
para.sql_content = sql_content;
}
//println(sql_content);
var dataSet_id='att_json_ds';
var obj = JSON.parse(sql_content).attachmentList;
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
if (!dataSet) {
dataSet = newMap("dataSet");
dataSet.id = dataSet_id;
dataSet.autocreate = 'true';
dataSets.addChild(dataSet.getData());
var datas = newMap("datas");
dataSet.addChild(datas.getData());
}
// dataSets.addChild(dataSet.getData());
// dataSet.id = 'att_json_ds';
// dataSet.autocreate = 'true';
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
for (var k in obj) {
// if (obj[k] instanceof Object) {
var datasRecord = newMap("record");
datasRecord.code_value = obj[k].fileURL;
datasRecord.code_value_name = obj[k].fileName;
datasRecord.action_type = obj[k].attachTypeCode;
datas.addChild(datasRecord.getData());
//println(datasRecord.code_value+":"+datasRecord.code_value_name);
//} else {
// println("2222"+obj[k].fieldCode);
//}
}
]]></s:server-script>
</a:init-procedure>
<a:view> <a:view>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
...@@ -13,21 +67,13 @@ ...@@ -13,21 +67,13 @@
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="att_json_ds" selectable="true">
<a:fields>
<a:field name="att_type" />
<a:field name="att_address" />
<a:field name="att_name" />
</a:fields>
</a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:grid id="att_para_ds_id" bindTarget="att_json_ds" marginHeight="200" marginWidth="200" navBar="true"> <a:grid id="att_para_ds_id" bindTarget="att_json_ds" height="180" width="760" navBar="true">
<a:columns> <a:columns>
<a:column name="att_type" prompt="附件类型" width="150"/> <a:column name="action_type" prompt="附件类型" width="150"/>
<a:column name="att_address" prompt="附件地址" width="150"/> <a:column name="code_value" prompt="附件地址" width="400"/>
<a:column name="att_name" prompt="附件名称" width="150"/> <a:column name="code_value_name" prompt="附件名称" width="200"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
...@@ -5,29 +5,69 @@ ...@@ -5,29 +5,69 @@
$Revision: 1.0 $Revision: 1.0
$Purpose: 结构化数据列表 $Purpose: 结构化数据列表
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
<a:view> <a:init-procedure>
<script type="text/javascript"><![CDATA[ <s:server-script><![CDATA[
function newMap(name) {
return new CompositeMap("a", 'http://www.aurora-framework.org/application',
name);
}
var para = $ctx.current_parameter || $ctx.parameter;
var sql_content;
var query_validation_sql_bm = $bm('efile.EFILE1030.efile_pool_para_sql');
var config_map = query_validation_sql_bm.queryAsMap(para);
var config_map_detail = config_map.getChildren();
if (config_map_detail.length != 0) {
sql_content = config_map_detail[0].sql_content;
para.sql_content = sql_content;
}
//println(sql_content);
var dataSet_id='post_stur_json_ds';
var obj = JSON.parse(sql_content).fieldValueList;
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
if (!dataSet) {
dataSet = newMap("dataSet");
dataSet.id = dataSet_id;
dataSet.autocreate = 'true';
dataSets.addChild(dataSet.getData());
var datas = newMap("datas");
dataSet.addChild(datas.getData());
}
//var dataSet = newMap("dataSet");
// dataSets.addChild(dataSet.getData());
//dataSet.id = 'post_stur_json_ds';
// dataSet.autocreate = 'true';
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
for (var k in obj) {
// if (obj[k] instanceof Object) {
var datasRecord = newMap("record");
datasRecord.code_value = obj[k].fieldCode;
datasRecord.code_value_name = obj[k].value;
datas.addChild(datasRecord.getData());
//println(datasRecord.code_value+":"+datasRecord.code_value_name);
//} else {
// println("2222"+obj[k].fieldCode);
//}
}
]]></s:server-script>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script> ]]></script>
<a:dataSets> <a:dataSets >
<a:dataSet id="post_stur_json_ds" selectable="true">
<a:fields>
<a:field name="att_type" />
<a:field name="att_address" />
<a:field name="att_name" />
</a:fields>
</a:dataSet>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" marginHeight="200" marginWidth="200" navBar="true"> <a:grid id="post_stru_para_ds_id" bindTarget="post_stur_json_ds" marginHeight="200" width="355" navBar="true">
<a:columns> <a:columns>
<a:column name="filed_code" prompt="字段代码" width="150"/> <a:column name="code_value" prompt="字段代码" width="150"/>
<a:column name="filed_desc" prompt="字段描述" width="150"/> <a:column name="code_value_name" prompt="值内容" width="200"/>
<a:column name="value_content" prompt="值内容" width="150"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:screenBody> </a:screenBody>
......
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