Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
d1200b74
Commit
d1200b74
authored
Nov 14, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
5b4cc79a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+3
-0
DataInitTest.java
...i/src/test/java/pwc/taxtech/atms/common/DataInitTest.java
+3
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
d1200b74
...
...
@@ -43,6 +43,9 @@ public class POIUtil {
public
static
void
cloneSheet
(
Sheet
sheet
,
Sheet
targetSheet
)
{
for
(
int
r
=
sheet
.
getFirstRowNum
();
r
<=
sheet
.
getLastRowNum
();
r
++)
{
Row
row
=
sheet
.
getRow
(
r
);
if
(
null
==
row
)
{
continue
;
}
Row
targetRow
=
targetSheet
.
createRow
(
r
);
for
(
int
c
=
row
.
getFirstCellNum
();
c
<=
row
.
getLastCellNum
();
c
++)
{
Cell
cell
=
row
.
getCell
(
c
);
...
...
atms-api/src/test/java/pwc/taxtech/atms/common/DataInitTest.java
View file @
d1200b74
...
...
@@ -172,7 +172,7 @@ public class DataInitTest extends CommonIT {
@Test
public
void
initOutput
()
throws
Exception
{
Workbook
workbook
=
WorkbookFactory
.
create
(
new
File
(
"C:\\Users\\Eddie Wu\\Desktop\\导入/导入模板_销项主表_
绿能_201809
(1).xlsx"
));
Workbook
workbook
=
WorkbookFactory
.
create
(
new
File
(
"C:\\Users\\Eddie Wu\\Desktop\\导入/导入模板_销项主表_
乐叶_201807
(1).xlsx"
));
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
for
(
int
r
=
1
;
r
<=
sheet
.
getLastRowNum
();
r
++)
{
try
{
...
...
@@ -200,8 +200,8 @@ public class DataInitTest extends CommonIT {
outputInvoice
.
setHJJE
(
sheet
.
getRow
(
r
).
getCell
(
33
).
getStringCellValue
());
outputInvoice
.
setHJSE
(
sheet
.
getRow
(
r
).
getCell
(
34
).
getStringCellValue
());
outputInvoice
.
setJSHJ
(
sheet
.
getRow
(
r
).
getCell
(
35
).
getStringCellValue
());
outputInvoice
.
setSLV
(
sheet
.
getRow
(
r
).
getCell
(
42
).
getStringCellValue
());
outputInvoice
.
setHTBH
(
sheet
.
getRow
(
r
).
getCell
(
54
).
getStringCellValue
());
//
outputInvoice.setSLV(sheet.getRow(r).getCell(42).getStringCellValue());
//
outputInvoice.setHTBH(sheet.getRow(r).getCell(54).getStringCellValue());
outputInvoiceMapper
.
insertSelective
(
outputInvoice
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
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