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
2d2752a5
Commit
2d2752a5
authored
Jul 06, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时运营后台--导入替换
parent
d57bd6e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+8
-2
No files found.
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
2d2752a5
...
...
@@ -1713,19 +1713,22 @@ public class InsureContorll {
xw
=
new
XSSFWorkbook
(
file
.
getInputStream
());
XSSFSheet
sheetAt
=
xw
.
getSheetAt
(
0
);
//默认第一行为标题行,i = 13
XSSFRow
titleRow
=
sheetAt
.
getRow
(
1
3
);
XSSFRow
titleRow
=
sheetAt
.
getRow
(
1
2
);
InsureUser
originalUser
;
InsureUser
replaceUser
;
/*原被保人集合*/
List
<
InsureUser
>
originalList
=
Lists
.
newArrayList
();
// 循环获取每一行数据
for
(
int
i
=
1
4
;
i
<
sheetAt
.
getPhysicalNumberOfRows
();
i
++)
{
for
(
int
i
=
1
3
;
i
<
sheetAt
.
getPhysicalNumberOfRows
();
i
++)
{
XSSFRow
row
=
sheetAt
.
getRow
(
i
);
originalUser
=
InsureUser
.
builder
().
build
();
replaceUser
=
InsureUser
.
builder
().
build
();
// 读取每一格内容
for
(
int
index
=
0
;
index
<
row
.
getPhysicalNumberOfCells
();
index
++)
{
XSSFCell
titleCell
=
titleRow
.
getCell
(
index
);
if
(
titleCell
==
null
){
continue
;
}
XSSFCell
cell
=
row
.
getCell
(
index
);
if
(
cell
==
null
)
{
continue
;
...
...
@@ -1735,6 +1738,9 @@ public class InsureContorll {
if
(
cell
.
getStringCellValue
().
equals
(
""
))
{
continue
;
}
if
(
StringUtils
.
isNullOrEmpty
(
ExcelUtils
.
getString
(
cell
))){
continue
;
}
switch
(
ExcelUtils
.
getString
(
titleCell
))
{
// case "ID":/*不重要*/
// break;
...
...
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