Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 83b4c6de
authored
Sep 18, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[读取一行做判断]
1 parent
6cfa64a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
code/finance_serv/src/main/java/com/vion/financial/handler/ImportExcel.java
code/finance_serv/src/main/resources/application.yml
code/finance_serv/src/main/java/com/vion/financial/handler/ImportExcel.java
View file @
83b4c6d
...
@@ -64,7 +64,14 @@ public class ImportExcel {
...
@@ -64,7 +64,14 @@ public class ImportExcel {
handle
.
setNeedHandlerFields
(
new
String
[]
{
"合同编号"
});
handle
.
setNeedHandlerFields
(
new
String
[]
{
"合同编号"
});
importParams
.
setDataHanlder
(
handle
);
importParams
.
setDataHanlder
(
handle
);
importParams
.
setNeedVerfiy
(
true
);
importParams
.
setNeedVerfiy
(
true
);
//importParams.setReadRows(0);
//importParams.setReadSingleCell(true);
//importParams.setHeadRows(1);
//importParams.setLastOfInvalidRow();
importParams
.
setReadRows
(
1
);
ExcelImportResult
<
Map
>
result
=
ExcelImportUtil
.
importExcelMore
(
file
.
getInputStream
(),
Map
.
class
,
importParams
);
ExcelImportResult
<
Map
>
result
=
ExcelImportUtil
.
importExcelMore
(
file
.
getInputStream
(),
Map
.
class
,
importParams
);
System
.
out
.
println
(
result
.
getList
().
size
());
switch
(
ranke
)
{
switch
(
ranke
)
{
case
"0"
:
case
"0"
:
columns
=
ColumnExample
.
rank0
;
columns
=
ColumnExample
.
rank0
;
...
...
code/finance_serv/src/main/resources/application.yml
View file @
83b4c6d
...
@@ -37,7 +37,7 @@ mybatis:
...
@@ -37,7 +37,7 @@ mybatis:
logging
:
logging
:
level
:
level
:
root
:
DEBUG
root
:
INFO
pattern
:
pattern
:
level
:
INFO
level
:
INFO
console
:
"
[financial_serv]-[%d{yyyy-MM-dd
HH:mm:ss.SSS}]-%m%n"
console
:
"
[financial_serv]-[%d{yyyy-MM-dd
HH:mm:ss.SSS}]-%m%n"
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment