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
4cd820b8
Commit
4cd820b8
authored
Jul 23, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] poi get numbricvalue all return double value
parent
c7196569
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
NPOIHelper.java
...rc/main/java/pwc/taxtech/atms/common/util/NPOIHelper.java
+7
-3
VoucherInvoiceMappingController.java
...tech/atms/controller/VoucherInvoiceMappingController.java
+4
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/NPOIHelper.java
View file @
4cd820b8
...
...
@@ -81,8 +81,8 @@ public class NPOIHelper {
//第一行为列头的话就多输出一行
int
topNum
=
haveHeader
?
topRowNumber
+
1
:
topRowNumber
;
if
(
topNum
<
dataImportModel
.
getDataList
().
size
())
dataImportModel
.
setDataList
(
dataImportModel
.
getDataList
().
subList
(
0
,
topNum
));
if
(
topNum
<
dataImportModel
.
getDataList
().
size
())
dataImportModel
.
setDataList
(
dataImportModel
.
getDataList
().
subList
(
0
,
topNum
));
// dataImportModel.setDataList(dataImportModel.getDataList().subList(0,topRowNumber));
}
return
dataImportModel
;
...
...
@@ -117,7 +117,11 @@ public class NPOIHelper {
if
(
HSSFDateUtil
.
isCellDateFormatted
(
cell
))
{
strCell
=
sdf
.
format
(
cell
.
getDateCellValue
());
}
else
{
strCell
=
cell
.
getNumericCellValue
()
+
""
;
long
longVal
=
Math
.
round
(
cell
.
getNumericCellValue
());
if
(
Double
.
parseDouble
(
longVal
+
".0"
)
==
cell
.
getNumericCellValue
())
strCell
=
longVal
+
""
;
else
strCell
=
cell
.
getNumericCellValue
()
+
""
;
}
break
;
case
FORMULA:
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/VoucherInvoiceMappingController.java
View file @
4cd820b8
...
...
@@ -41,8 +41,8 @@ public class VoucherInvoiceMappingController {
@RequestMapping
(
value
=
"savevmappings/{period}/{IsAddition}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
SaveVourcherMappings
(
@RequestBody
List
<
VoucherMappingDto
>
list
,
@PathVariable
int
period
,
@PathVariable
int
IsAddition
)
{
public
ResponseEntity
SaveVourcherMappings
(
@RequestBody
List
<
VoucherMappingDto
>
list
,
@PathVariable
Integer
period
,
@PathVariable
Integer
IsAddition
)
{
logger
.
info
(
"savevmappings/{period}/{IsAddition}"
);
list
.
forEach
(
m
->
{
m
.
ID
=
UUID
.
randomUUID
().
toString
();
...
...
@@ -53,8 +53,8 @@ public class VoucherInvoiceMappingController {
@RequestMapping
(
value
=
"saveimappings/{period}/{IsAddition}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
SaveInvoiceMappings
(
@RequestBody
List
<
InvoiceMappingDto
>
list
,
@PathVariable
int
period
,
@PathVariable
int
IsAddition
)
{
public
ResponseEntity
SaveInvoiceMappings
(
@RequestBody
List
<
InvoiceMappingDto
>
list
,
@PathVariable
Integer
period
,
@PathVariable
Integer
IsAddition
)
{
logger
.
info
(
"savevmappings/{period}/{IsAddition}"
);
list
.
forEach
(
m
->
{
m
.
ID
=
UUID
.
randomUUID
().
toString
();
...
...
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