Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
db3ad21f
Commit
db3ad21f
authored
Jun 30, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
关闭流
parent
4e8da25d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+7
-1
No files found.
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
db3ad21f
...
...
@@ -1707,8 +1707,9 @@ public class InsureContorll {
public
Result
<
Object
>
replaceUserPolicy
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"policyId"
)
Integer
policyId
){
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
policyId
).
build
().
selectById
();
ByteArrayOutputStream
bos
=
null
;
XSSFWorkbook
xw
=
null
;
try
{
XSSFWorkbook
xw
=
new
XSSFWorkbook
(
file
.
getInputStream
());
xw
=
new
XSSFWorkbook
(
file
.
getInputStream
());
XSSFSheet
sheetAt
=
xw
.
getSheetAt
(
0
);
//默认第一行为标题行,i = 0
XSSFRow
titleRow
=
sheetAt
.
getRow
(
0
);
...
...
@@ -1854,6 +1855,11 @@ public class InsureContorll {
throw
new
CustomException
(
"导入异常"
);
}
finally
{
try
{
xw
.
close
();
}
catch
(
IOException
e
)
{
throw
new
CustomException
(
"XSSFWorkbook流关闭异常"
);
}
try
{
bos
.
close
();
}
catch
(
IOException
e
)
{
throw
new
CustomException
(
"ByteArrayOutputStream流关闭异常"
);
...
...
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