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
28c27340
Commit
28c27340
authored
Aug 09, 2024
by
18083
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款excel导入附件替换及补充农行缺少文件
parent
ff335add
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
32 deletions
+125
-32
HttpPostDocQuery.java
src/main/java/com/hand/hlcm/HttpPostDocQuery.java
+91
-0
csh_abc_excel_import.lview
...ain/webapp/modules/csh/CSH1400/csh_abc_excel_import.lview
+19
-17
csh_transaction_excel_import.lview
...pp/modules/csh/CSH510N/csh_transaction_excel_import.lview
+15
-15
No files found.
src/main/java/com/hand/hlcm/HttpPostDocQuery.java
0 → 100644
View file @
28c27340
package
com
.
hand
.
hlcm
;
import
com.alibaba.fastjson.JSON
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.apache.http.params.HttpConnectionParams
;
import
org.apache.http.params.HttpParams
;
import
org.apache.http.util.EntityUtils
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* description
*
* @author lcl 2023/02/15 15:07
*/
public
class
HttpPostDocQuery
{
public
HttpPostDocQuery
()
{
}
public
static
String
httpPostDocImport
(
String
postUrl
,
String
data
,
String
token
,
String
tokentype
)
{
HttpClient
client
=
null
;
String
result
=
"error"
;
try
{
client
=
new
DefaultHttpClient
();
HttpPost
post
=
new
HttpPost
(
postUrl
);
//设置超时时间
HttpParams
params
=
client
.
getParams
();
HttpConnectionParams
.
setConnectionTimeout
(
params
,
(
int
)
10
*
1000
);
HttpConnectionParams
.
setSoTimeout
(
params
,
10
*
1000
);
post
.
setHeader
(
"Content-Type"
,
"application/json"
);
post
.
setHeader
(
"Authorization"
,
tokentype
+
" "
+
token
);
post
.
setEntity
(
new
StringEntity
(
data
,
"UTF-8"
));
HttpResponse
response
=
null
;
response
=
client
.
execute
(
post
);
HttpEntity
entity
=
response
.
getEntity
();
result
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
// result = EntityUtils.toString(entity);
EntityUtils
.
consume
(
entity
);
//1. 关闭响应流
if
(
entity
!=
null
)
{
InputStream
instream
=
entity
.
getContent
();
try
{
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
instream
,
"UTF-8"
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
instream
.
close
();
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
client
.
getConnectionManager
().
shutdown
();
// 关闭连接.
}
return
result
;
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"startCreatedDate"
,
"2023-12-13 00:00:00"
);
map
.
put
(
"endCreatedDate"
,
"2023-12-20 00:00:00"
);
List
<
String
>
list
=
new
ArrayList
<>();
list
.
add
(
"receiptD"
);
map
.
put
(
"documentTypeCodeList"
,
list
);
String
json
=
JSON
.
toJSONString
(
map
);
System
.
out
.
println
(
"--------------------"
+
json
);
String
response
=
httpPostDocImport
(
"http://apistage.huilianyi.com/gateway/e-archives/api/open/v1/documents/query?page=1&size=20"
,
json
,
"e074ea49-ae7b-465b-a3e5-e051f5e0e088"
,
"Bearer"
);
System
.
out
.
println
(
response
);
}
}
src/main/webapp/modules/csh/CSH1400/csh_abc_excel_import.lview
View file @
28c27340
...
...
@@ -69,17 +69,17 @@
record.set('receipt_type', 'IMPORT');
record.set('bank_account_num', record.get('bank_num'));
// record.set('transaction_date', Leaf.formatDate(record.get('attribute_3')));
record.set('bank_slip_num', record.get('attribute_1
7
'));
record.set('bank_slip_num', record.get('attribute_1
2
'));
record.set('currency_code', 'CNY');
record.set('transaction_amount', record.get('attribute_
3
'));
record.set('transaction_amount', record.get('attribute_
2
'));
record.set('exchange_rate', 1);
record.set('bp_bank_account_num', record.get('attribute_
11
'));
record.set('bp_bank_account_name', record.get('attribute_
12
'));
record.set('opposite_band_na', record.get('attribute_
8
'));
record.set('description', record.get('attribute_1
4
'));
record.set('ref_v05', record.get('attribute_
15
'));
record.set('bp_bank_account_num', record.get('attribute_
5
'));
record.set('bp_bank_account_name', record.get('attribute_
6
'));
record.set('opposite_band_na', record.get('attribute_
7
'));
record.set('description', record.get('attribute_1
3
'));
record.set('ref_v05', record.get('attribute_
8
'));
record.set('bp_name', record.get('bp_name'));
record.set('bank_receipt_date', record.get('
attribute_1
'));
record.set('bank_receipt_date', record.get('
transaction_date
'));
record.set('write_off_flag', 'DISABLED');
record.set('paid_byother_flag_desc', record.get('paid_byother_flag_desc'));
record.set('guarantor_name_duty',record.get('guarantor_name_duty_desc'));
...
...
@@ -91,6 +91,9 @@
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else if(record.get('collection_classes')=='OPERAT_DEPOSIT'){
record.set('transaction_type', 'DEPOSIT');
record.set('operat_flag', 'Y');
} else {
record.set('transaction_type', 'RECEIPT');
}
...
...
@@ -469,23 +472,22 @@
<a:column
name=
"error_message"
editor=
"textArea_e"
prompt=
"错误信息"
width=
"180"
/>
<a:column
name=
"bank_num"
prompt=
"账号"
width=
"80"
/>
<a:column
name=
"currency_type"
prompt=
"货币"
width=
"80"
/>
<a:column
name=
"attribute_1"
prompt=
"交易时间"
renderer=
"Leaf.formatDate"
width=
"80"
/>
<!-- <a:column name="attribute_4" prompt="交易时间" width="80"/>-->
<a:column
name=
"attribute_17"
prompt=
"日志号"
width=
"80"
/>
<a:column
name=
"attribute_11"
prompt=
"对方账号"
width=
"80"
/>
<a:column
name=
"attribute_12"
prompt=
"对方账号户名"
width=
"80"
/>
<a:column
name=
"attribute_8"
prompt=
"对方银行名称"
width=
"80"
/>
<a:column
name=
"transaction_date"
prompt=
"交易时间"
renderer=
"Leaf.formatDate"
width=
"80"
/>
<a:column
name=
"attribute_12"
prompt=
"日志号"
width=
"80"
/>
<a:column
name=
"attribute_5"
prompt=
"对方账号"
width=
"80"
/>
<a:column
name=
"attribute_6"
prompt=
"对方账号户名"
width=
"80"
/>
<a:column
name=
"attribute_7"
prompt=
"对方银行名称"
width=
"80"
/>
<a:column
name=
"bp_name"
prompt=
"收款对象"
editor=
"grid_lov"
width=
"120"
/>
<a:column
name=
"paid_byother_flag_desc"
prompt=
"是否代付"
editor=
"grid_cb"
/>
<a:column
name=
"attribute_
3
"
prompt=
"收款金额"
renderer=
"Leaf.formatMoney"
align=
"right"
<a:column
name=
"attribute_
2
"
prompt=
"收款金额"
renderer=
"Leaf.formatMoney"
align=
"right"
width=
"80"
/>
<a:column
name=
"attribute_1
4
"
prompt=
"摘要"
width=
"80"
/>
<a:column
name=
"attribute_1
3
"
prompt=
"摘要"
width=
"80"
/>
<a:column
name=
"collection_classes_desc"
prompt=
"款项分类"
editor=
"grid_cb"
/>
<a:column
name=
"attribute_
15
"
prompt=
"附言"
width=
"80"
/>
<a:column
name=
"attribute_
8
"
prompt=
"附言"
width=
"80"
/>
<a:column
name=
"extra_nam"
prompt=
"代理店简称"
width=
"80"
editor=
"grid_lov"
/>
<a:column
name=
"bp_code"
prompt=
"代理店简称code"
hidden=
"true"
/>
...
...
src/main/webapp/modules/csh/CSH510N/csh_transaction_excel_import.lview
View file @
28c27340
...
...
@@ -65,15 +65,15 @@
record.set('receipt_type', 'IMPORT');
record.set('bank_account_num', record.get('bank_num'));
// record.set('transaction_date', Leaf.formatDate(record.get('attribute_3')));
record.set('bank_slip_num', record.get('attribute_1
7
'));
record.set('bank_slip_num', record.get('attribute_1
2
'));
record.set('currency_code', 'CNY');
record.set('transaction_amount', record.get('attribute_
3
'));
record.set('transaction_amount', record.get('attribute_
2
'));
record.set('exchange_rate', 1);
record.set('bp_bank_account_num', record.get('attribute_
11
'));
record.set('bp_bank_account_name', record.get('attribute_
12
'));
record.set('opposite_band_na', record.get('attribute_
8
'));
record.set('description', record.get('attribute_1
4
'));
record.set('ref_v05', record.get('attribute_
15
'));
record.set('bp_bank_account_num', record.get('attribute_
5
'));
record.set('bp_bank_account_name', record.get('attribute_
6
'));
record.set('opposite_band_na', record.get('attribute_
7
'));
record.set('description', record.get('attribute_1
3
'));
record.set('ref_v05', record.get('attribute_
8
'));
record.set('write_off_flag', 'DISABLED');
...
...
@@ -470,23 +470,23 @@
<a:column
name=
"error_message"
editor=
"textArea_e"
prompt=
"错误信息"
width=
"180"
/>
<a:column
name=
"bank_num"
prompt=
"账号"
width=
"80"
/>
<a:column
name=
"currency_type"
prompt=
"货币"
width=
"80"
/>
<a:column
name=
"
attribute_1
"
prompt=
"交易日期"
renderer=
"Leaf.formatDate"
width=
"80"
/>
<a:column
name=
"
transaction_date
"
prompt=
"交易日期"
renderer=
"Leaf.formatDate"
width=
"80"
/>
<!-- <a:column name="attribute_4" prompt="交易时间" width="80"/>-->
<a:column
name=
"attribute_1
7
"
prompt=
"日志号"
width=
"80"
/>
<a:column
name=
"attribute_
11
"
prompt=
"对方账号"
width=
"80"
/>
<a:column
name=
"attribute_
12
"
prompt=
"对方账号户名"
width=
"80"
/>
<a:column
name=
"attribute_
8
"
prompt=
"对方银行名称"
width=
"80"
/>
<a:column
name=
"attribute_1
2
"
prompt=
"日志号"
width=
"80"
/>
<a:column
name=
"attribute_
5
"
prompt=
"对方账号"
width=
"80"
/>
<a:column
name=
"attribute_
6
"
prompt=
"对方账号户名"
width=
"80"
/>
<a:column
name=
"attribute_
7
"
prompt=
"对方银行名称"
width=
"80"
/>
<a:column
name=
"bp_name"
prompt=
"收款对象"
editor=
"grid_lov"
width=
"120"
/>
<a:column
name=
"paid_byother_flag_desc"
prompt=
"是否代付"
editor=
"grid_cb"
/>
<a:column
name=
"attribute_
3
"
prompt=
"收款金额"
renderer=
"Leaf.formatMoney"
align=
"right"
<a:column
name=
"attribute_
2
"
prompt=
"收款金额"
renderer=
"Leaf.formatMoney"
align=
"right"
width=
"80"
/>
<a:column
name=
"attribute_1
4
"
prompt=
"摘要"
width=
"80"
/>
<a:column
name=
"attribute_1
3
"
prompt=
"摘要"
width=
"80"
/>
<a:column
name=
"collection_classes_desc"
prompt=
"款项分类"
editor=
"grid_cb"
/>
<a:column
name=
"attribute_
15
"
prompt=
"附言"
width=
"80"
/>
<a:column
name=
"attribute_
8
"
prompt=
"附言"
width=
"80"
/>
<a:column
name=
"extra_nam"
prompt=
"代理店简称"
width=
"80"
editor=
"grid_lov"
/>
<a:column
name=
"bp_code"
prompt=
"代理店简称code"
hidden=
"true"
/>
...
...
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