Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
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
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
d8dab74c
Commit
d8dab74c
authored
Mar 24, 2020
by
liuxinben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改格口文件上传的返回
parent
74fcc101
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
ReadExcelApi.java
src/main/java/com/yxproject/start/api/ReadExcelApi.java
+14
-11
No files found.
src/main/java/com/yxproject/start/api/ReadExcelApi.java
View file @
d8dab74c
...
...
@@ -57,7 +57,7 @@ public class ReadExcelApi {
@Consumes
(
MediaType
.
MULTIPART_FORM_DATA
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
ReadPersonPost
(
@RequestParam
(
"formStartTime"
)
String
startDate
,
@RequestParam
(
"formDeadLine"
)
String
endDate
,
HttpServletResponse
resp
,
HttpServletRequest
requ
)
{
public
Map
<
String
,
String
>
ReadPersonPost
(
@RequestParam
(
"formStartTime"
)
String
startDate
,
@RequestParam
(
"formDeadLine"
)
String
endDate
,
HttpServletResponse
resp
,
HttpServletRequest
requ
)
{
String
remoteAddr
=
requ
.
getRemoteAddr
();
MDC
.
put
(
"ip"
,
remoteAddr
);
YXJSONResponse
yxresp
=
new
YXJSONResponse
();
...
...
@@ -158,19 +158,19 @@ public class ReadExcelApi {
e
.
printStackTrace
();
logger
.
error
(
"上传文件名"
+
filename
+
"起始时间"
+
startDate
+
"截止时间"
+
endDate
);
logger
.
error
(
""
,
e
);
yxresp
.
outPutError
(
"Exception"
,
"上传文件时发生错误,非法
XM
L文件:"
+
filename
);
continue
;
}
finally
{
yxresp
.
outPutError
(
"Exception"
,
"上传文件时发生错误,非法
EXCE
L文件:"
+
filename
);
map
.
put
(
"result"
,
"false"
)
;
map
.
put
(
"msg"
,
"非法EXCEL文件"
);
return
map
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"上传文件名"
+
filename
+
"起始时间"
+
startDate
+
"截止时间"
+
endDate
);
logger
.
error
(
""
,
e
);
yxresp
.
outPutError
(
"FileUploadException"
,
"文件上载发生异常:"
+
e
.
getMessage
());
}
finally
{
return
true
;
map
.
put
(
"result"
,
"false"
);
map
.
put
(
"msg"
,
"文件上载发生异常"
);
return
map
;
}
}
}
...
...
@@ -178,10 +178,13 @@ public class ReadExcelApi {
}
catch
(
Exception
e
)
{
logger
.
error
(
"上传文件名"
+
filename
+
"起始时间"
+
startDate
+
"截止时间"
+
endDate
);
logger
.
error
(
"Exception 导入个人邮寄信息表异常"
,
e
);
}
finally
{
map
.
put
(
"result"
,
"false"
);
map
.
put
(
"msg"
,
"导入个人邮寄信息表异常"
);
return
map
;
}
return
true
;
map
.
put
(
"result"
,
"true"
);
map
.
put
(
"msg"
,
"上传成功"
);
return
map
;
}
/**
...
...
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