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
b135f26a
Commit
b135f26a
authored
Mar 14, 2023
by
Luochenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子档案传输修改
parent
481f04e0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
280 additions
and
99 deletions
+280
-99
voucher_ass_template.lview
...webapp/modules/efile/EFILE1010/voucher_ass_template.lview
+2
-2
efile_att_json_lov.lview
...n/webapp/modules/efile/EFILE1030/efile_att_json_lov.lview
+24
-14
efile_post_stru_json_lov.lview
...pp/modules/efile/EFILE1030/efile_post_stru_json_lov.lview
+12
-1
efile_doc_import.lsc
src/main/webapp/modules/efile/EFILE1040/efile_doc_import.lsc
+242
-82
No files found.
src/main/webapp/modules/efile/EFILE1010/voucher_ass_template.lview
View file @
b135f26a
...
...
@@ -132,8 +132,8 @@
</a:screenTopToolbar>
<a:grid
id=
"je_template_ds_id"
bindTarget=
"je_template_ds"
height=
"300"
width=
"380"
navBar=
"true"
>
<a:columns>
<a:column
name=
"je_template_code"
editor=
"voucherconBasicClauseParaDs_grid_lov"
prompt=
"凭证
模板
代码"
width=
"170"
/>
<a:column
name=
"je_template_name"
editor=
"voucher_text_ed"
prompt=
"凭证
模板
描述"
width=
"170"
/>
<a:column
name=
"je_template_code"
editor=
"voucherconBasicClauseParaDs_grid_lov"
prompt=
"凭证
事务
代码"
width=
"170"
/>
<a:column
name=
"je_template_name"
editor=
"voucher_text_ed"
prompt=
"凭证
事务
描述"
width=
"170"
/>
</a:columns>
<a:editors>
<a:textField
id=
"voucher_text_ed"
/>
...
...
src/main/webapp/modules/efile/EFILE1030/efile_att_json_lov.lview
View file @
b135f26a
...
...
@@ -22,8 +22,13 @@
para.sql_content = sql_content;
}
//println(sql_content);
var obj;
var dataSet_id='att_json_ds';
var obj = JSON.parse(sql_content).attachmentList;
if(sql_content.length>
2){
obj = JSON.parse(sql_content).attachmentList;
}else{
obj='';
}
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
...
...
@@ -42,6 +47,7 @@
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
if(obj.length>0){
for (var k in obj) {
// if (obj[k] instanceof Object) {
var datasRecord = newMap("record");
...
...
@@ -55,6 +61,10 @@
// println("2222"+obj[k].fieldCode);
//}
}
}else{
var datasRecord = newMap("record");
datas.addChild(datasRecord.getData());
}
...
...
src/main/webapp/modules/efile/EFILE1030/efile_post_stru_json_lov.lview
View file @
b135f26a
...
...
@@ -23,7 +23,11 @@
}
//println(sql_content);
var dataSet_id='post_stur_json_ds';
var obj = JSON.parse(sql_content).fieldValueList;
if(sql_content.length>
2){
obj = JSON.parse(sql_content).fieldValueList;
}else{
obj='';
}
var config = $config();
var dataSets = CompositeUtil.findChild(config, 'dataSets');
var dataSet = CompositeUtil.findChild(dataSets, 'dataSet', 'id', dataSet_id);
...
...
@@ -42,6 +46,7 @@
// dataSets.addChild(dataSet.getData());
// var datas = newMap("datas");
// dataSet.addChild(datas.getData());
if(obj.length>0){
for (var k in obj) {
// if (obj[k] instanceof Object) {
var datasRecord = newMap("record");
...
...
@@ -54,6 +59,12 @@
//}
}
}else{
var datasRecord = newMap("record");
datas.addChild(datasRecord.getData());
}
]]>
</s:server-script>
...
...
src/main/webapp/modules/efile/EFILE1040/efile_doc_import.lsc
View file @
b135f26a
...
...
@@ -52,12 +52,22 @@
var fieldValueList_data = fieldValueList_bm.queryAsMap({
pool_id: batch_data[i].pool_id
});
var je_data_json_data = je_data_json_bm.queryAsMap({
var je_data_json_data;
var je_json_data_result;
var je_json_data;
var je_json_data1;
var je_json_data2;
if(batch_data[i].je_check_flag=='Y'){
je_data_json_data = je_data_json_bm.queryAsMap({
e_archives_id: batch_data[i].e_archives_id,
document_id: batch_data[i].document_id,
workflow_id: batch_data[i].workflow_id
});
je_json_data=je_data_json_data.getChildren()[0].je_data_json;
je_json_data_result=JSON.parse(je_json_data);
je_json_data1=je_json_data_result[0];
je_json_data2=je_json_data_result[1];
}
var companyCode='HL';
var documentTypeCode=batch_data[i].base_archive_code;
...
...
@@ -69,17 +79,20 @@
var securityLevelCode='';
var fieldValueList=fieldValueList_data.getChildren()[0].fieldValueList;
var je_json_data=je_data_json_data.getChildren()[0].je_data_json;
logger.info(je_json_data);
//var je_json_data='[{"fieldCode":"PREPROCESS_CODE","value":"111"},{"fieldCode":"GL_CODE_ARRAY","value":"222"}]';
var je_json_data_result=JSON.parse(je_json_data);
logger.info(je_json_data_result[0].fieldCode);
var je_json_data1=je_json_data_result[0];
var je_json_data2=je_json_data_result[1];
var attlist=[];
var filelist=[];
if(fieldValueList.length==8){
filelist='[]';
if(typeof(fieldValueList)=="undefined"){
fieldValueList=[];
if(batch_data[i].je_check_flag=='Y'){
fieldValueList.push(je_json_data1);
fieldValueList.push(je_json_data2);
fieldValueList=JSON.stringify(fieldValueList);
filelist.push(fieldValueList);
}else{
filelist='[]' ;
}
}else{
fieldValueList=fieldValueList.substring(17);
fieldValueList=JSON.parse(fieldValueList);
...
...
@@ -93,8 +106,10 @@
var attachmentList = fieldValueList_data.getChildren()[0].attachmentList;
if(typeof(attachmentList)!="undefined"){
attachmentList=attachmentList.replace('\s+', '');
if(attachmentList.length==8){
}
if(typeof(attachmentList)=="undefined"){
var fils = '{'
+'"companyCode": "'+companyCode
+'",'
...
...
@@ -149,13 +164,7 @@
}
if(doc_data.length==100||batch_data.length==i+1){
if(doc_data.length==100||doc_data.length==batch_data.length){
batch_num++;
if (is_valid == 'true') {
var SystokenQuery = token_savelogs_bm.queryAsMap();
...
...
@@ -167,15 +176,50 @@
var json_data = JSON.parse(data);
var statusCode =json_data.statusCode;
var message =json_data.message;
var result=json_data.result;
var doc_import_return_bm = $bm('efile.EFILE1040.doc_import_return');
for(var i=0;i<result.length;i++){
doc_data=JSON.parse(doc_data);
if(statusCode=='0000'){
for(var i=0;i<doc_data.length;i++){
doc_import_return_bm.insert({
'primary_field': doc_data[i].primaryField,
'post_status': message,
'post_message': '',
'hly_req_number': '1'
})
}
}else if(statusCode=='500000') {
var result = json_data.result;
for (var i = 0; i < result.length; i++) {
if (result[i].primaryField) {
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': '1'
})
}
}
}else if(statusCode=='500002'){
for(var i=0;i<doc_data.length;i++){
doc_import_return_bm.insert({
'primary_field': doc_data[i].primaryField,
'post_status': 'success',
'post_message': '',
'hly_req_number': '1'
})
}
var result = json_data.result;
for (var i = 0; i < result.length; i++) {
if (result[i].primaryField) {
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': batch_num
'hly_req_number': '1'
})
}
}
}
logger.info(data);
...
...
@@ -185,29 +229,59 @@
var json = JSON.parse(data);
var access_token = json.access_token;
var status = json.status;
logger.info(access_token);
var doc_data=JSON.stringify(doc_data);
doc_data=doc_data.replace(/[\'\\\\/\b\f\n\r\t]/g, '');
logger.info(doc_data);
var data_result = httpPostDocImport(docUrl,doc_data,access_token, token_type);
logger.info(data_result);
var json_data = JSON.parse(data_result);
logger.info(json_data);
var statusCode =json_data.statusCode;
var message =json_data.message;
var result=json_data.result;
var doc_import_return_bm = $bm('efile.EFILE1040.doc_import_return');
doc_data=JSON.parse(doc_data);
if(statusCode=='0000'){
for(var i=0;i<doc_data.length;i++){
doc_import_return_bm.insert({
'primary_field': doc_data[i].primaryField,
'post_status': message,
'post_message': '',
'hly_req_number': '1'
})
}
}else if(statusCode=='500000'){
var result=json_data.result;
for(var i=0;i<result.length;i++){
if(result[i].primaryField){
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': batch_num
'hly_req_number': '1'
})
}
}
}else if(statusCode=='500002'){
for(var i=0;i<doc_data.length;i++){
doc_import_return_bm.insert({
'primary_field': doc_data[i].primary_field,
'post_status': 'success',
'post_message': '',
'hly_req_number': '1'
})
}
var result = json_data.result;
for (var i = 0; i < result.length; i++) {
if (result[i].primaryField) {
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': '1'
})
}
}
}
if (access_token) {
token_savelogs_bm.insert({
...
...
@@ -245,11 +319,25 @@
});
var je_data_json_data = je_data_json_bm.queryAsMap({
var je_data_json_data;
var je_json_data_result;
var je_json_data;
var je_json_data1;
var je_json_data2;
if(req_date[i].je_check_flag=='Y'){
je_data_json_data = je_data_json_bm.queryAsMap({
e_archives_id: req_date[i].e_archives_id,
document_id: req_date[i].document_id,
workflow_id: req_date[i].workflow_id
});
je_json_data=je_data_json_data.getChildren()[0].je_data_json;
logger.info(je_json_data);
je_json_data_result=JSON.parse(je_json_data);
logger.info(je_json_data_result[0]);
je_json_data1=je_json_data_result[0];
logger.info(je_json_data_result[1]);
je_json_data2=je_json_data_result[1];
}
var companyCode='HL';
var documentTypeCode=req_date[i].base_archive_code;
...
...
@@ -261,16 +349,19 @@
var securityLevelCode='';
var fieldValueList=fieldValueList_data.getChildren()[0].fieldValueList;
var je_json_data=je_data_json_data.getChildren()[0].je_data_json;
//var je_json_data='[{"fieldCode":"PREPROCESS_CODE","value":"111"},{"fieldCode":"GL_CODE_ARRAY","value":"222"}]';
var je_json_data_result=JSON.parse(je_json_data);
var je_json_data1=je_json_data_result[0];
var je_json_data2=je_json_data_result[1];
var attlist=[];
var filelist=[];
if(fieldValueList.length==8){
filelist='[]';
if(typeof(fieldValueList)=="undefined"){
fieldValueList=[];
if(req_date[i].je_check_flag=='Y'){
fieldValueList.push(je_json_data1);
fieldValueList.push(je_json_data2);
fieldValueList=JSON.stringify(fieldValueList);
filelist.push(fieldValueList);
}else{
filelist='[]' ;
}
}else{
fieldValueList=fieldValueList.substring(17);
fieldValueList=JSON.parse(fieldValueList);
...
...
@@ -286,8 +377,11 @@
var attachmentList = fieldValueList_data.getChildren()[0].attachmentList;
if(typeof(attachmentList)!="undefined"){
attachmentList=attachmentList.replace('\s+', '');
if(attachmentList.length==8){
}
if(typeof(attachmentList)=="undefined"){
var fils = '{'
+'"companyCode": "'+companyCode
+'",'
...
...
@@ -311,7 +405,6 @@
doc_data.push(fils);
}else{
attachmentList=attachmentList.substring(17);
logger.info(attachmentList);
attachmentList=JSON.parse(attachmentList);
attachmentList=JSON.stringify(attachmentList);
attlist.push(attachmentList);
...
...
@@ -355,15 +448,49 @@
var json_data = JSON.parse(data);
var statusCode =json_data.statusCode;
var message =json_data.message;
var result=json_data.result;
var doc_import_return_bm = $bm('efile.EFILE1040.doc_import_return');
if(statusCode=='0000'){
for(var i=0;i<req_date.length;i++){
doc_import_return_bm.insert({
'primary_field': req_date[i].primary_field,
'post_status': message,
'post_message': '',
'hly_req_number': '1'
})
}
}else if(statusCode=='500000'){
var result=json_data.result;
for(var i=0;i<result.length;i++){
if(result[i].primaryField){
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': '1'
})
}
}
}else if(statusCode=='500002'){
for(var i=0;i<req_date.length;i++){
doc_import_return_bm.insert({
'primary_field': req_date[i].primary_field,
'post_status': 'success',
'post_message': '',
'hly_req_number': '1'
})
}
var result = json_data.result;
for (var i = 0; i < result.length; i++) {
if (result[i].primaryField) {
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': "1"
'hly_req_number': '1'
})
}
}
}
logger.info(data);
...
...
@@ -373,18 +500,28 @@
var json = JSON.parse(data);
var access_token = json.access_token;
var status = json.status;
logger.info(access_token);
var doc_data=JSON.stringify(doc_data);
doc_data=doc_data.replace(/[\'\\\\/\b\f\n\r\t]/g, '');
logger.info(doc_data);
var data_result = httpPostDocImport(docUrl,doc_data,access_token, token_type);
logger.info(data_result);
var json_data = JSON.parse(data_result);
logger.info(json_data);
var statusCode =json_data.statusCode;
var message =json_data.message;
var result=json_data.result
;
logger.info(statusCode)
;
var doc_import_return_bm = $bm('efile.EFILE1040.doc_import_return');
if(statusCode=='0000'){
for(var i=0;i<req_date.length;i++){
doc_import_return_bm.insert({
'primary_field': req_date[i].primary_field,
'post_status': message,
'post_message': '',
'hly_req_number': '1'
})
}
}else if(statusCode=='500000'){
var result=json_data.result;
for(var i=0;i<result.length;i++){
if(result[i].primaryField){
doc_import_return_bm.insert({
...
...
@@ -395,6 +532,29 @@
})
}
}
}else if(statusCode=='500002'){
for(var i=0;i<req_date.length;i++){
doc_import_return_bm.insert({
'primary_field': req_date[i].primary_field,
'post_status': 'success',
'post_message': '',
'hly_req_number': '1'
})
}
var result = json_data.result;
for (var i = 0; i < result.length; i++) {
if (result[i].primaryField) {
doc_import_return_bm.insert({
'primary_field': result[i].primaryField,
'post_status': message,
'post_message': result[i].failedMessage,
'hly_req_number': '1'
})
}
}
}
if (access_token) {
...
...
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