Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-support-rlwx
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
rl
hls-support-rlwx
Commits
8bdaaf13
Commit
8bdaaf13
authored
Dec 27, 2022
by
胡建龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]文件下载返回数据转实体类
parent
1c7a39e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
PingAnServiceImpl.java
...a/com/hand/app/pingAn/service/impl/PingAnServiceImpl.java
+10
-1
No files found.
core/src/main/java/com/hand/app/pingAn/service/impl/PingAnServiceImpl.java
View file @
8bdaaf13
...
...
@@ -284,9 +284,18 @@ public class PingAnServiceImpl implements PingAnService {
//下载回单文件
private
void
dowloadDetailFile
(
JSONObject
data
)
{
JSONArray
arr
=
data
.
getJSONArray
(
"list"
);
List
<
OrderFile
>
orderFiles
=
new
ArrayList
<>();
//转换成orderFile对象
if
(
Objects
.
nonNull
(
arr
))
{
List
<
OrderFile
>
orderFiles
=
arr
.
toJavaList
(
OrderFile
.
class
);
//手动转换,因为返回字段首字母均为大写,与实体类不对应。
for
(
int
i
=
0
;
i
<
arr
.
size
()
;
i
++)
{
JSONObject
item
=
arr
.
getJSONObject
(
i
);
OrderFile
orderFile
=
new
OrderFile
();
orderFile
.
setDocId
(
item
.
getString
(
"DocId"
));
orderFile
.
setFileName
(
item
.
getString
(
"FileName"
));
orderFile
.
setFileSize
(
item
.
getString
(
"FileSize"
));
orderFiles
.
add
(
orderFile
);
}
OrderFileRequest
orderFileRequest
=
new
OrderFileRequest
();
orderFileRequest
.
setDownPath
(
"D:\\download\\yqzl"
);
File
file
=
new
File
(
orderFileRequest
.
getDownPath
());
...
...
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