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
97a03681
Commit
97a03681
authored
Aug 13, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] bb not nedd to update config parsedformua
parent
66d37b22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+11
-9
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
97a03681
...
...
@@ -95,8 +95,8 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
addFunctionsToWorkbook
(
newWorkbook
,
formulaContext
);
int
sheetCount
=
newWorkbook
.
getNumberOfSheets
();
List
<
Cell
>
otherFormulaCells
=
new
ArrayList
<>();
List
<
Cell
>
bbFormulaCells
=
new
ArrayList
<>();
List
<
Cell
>
otherFormulaCells
=
new
ArrayList
<>();
List
<
Cell
>
bbFormulaCells
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
sheetCount
;
i
++)
{
Sheet
sheet
=
newWorkbook
.
getSheetAt
(
i
);
...
...
@@ -143,9 +143,9 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
if
(
StringUtils
.
isNotBlank
(
v
.
getFormula
())
&&
!
v
.
getFormula
().
contains
(
"@"
))
{
cell
.
setCellFormula
(
v
.
getFormula
());
logger
.
debug
(
"formula:"
+
v
.
getFormula
());
if
(
v
.
getFormula
().
startsWith
(
"BB("
))
{
if
(
v
.
getFormula
().
startsWith
(
"BB("
))
{
bbFormulaCells
.
add
(
cell
);
}
else
{
}
else
{
otherFormulaCells
.
add
(
cell
);
}
//kv 公式处理
...
...
@@ -160,10 +160,10 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
}
}
FormulaEvaluator
evaluator
=
newWorkbook
.
getCreationHelper
().
createFormulaEvaluator
();
otherFormulaCells
.
stream
().
forEach
(
m
->
{
otherFormulaCells
.
stream
().
forEach
(
m
->
{
evaluator
.
evaluateFormulaCellEnum
(
m
);
});
bbFormulaCells
.
stream
().
forEach
(
n
->
{
bbFormulaCells
.
stream
().
forEach
(
n
->
{
evaluator
.
evaluateFormulaCellEnum
(
n
);
});
...
...
@@ -263,8 +263,10 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
//如果有正则匹配就进行更新公式解析
// if (isFind) {
periodCellTemplateConfig
.
setParsedFormula
(
resultFormula
);
periodCellTemplateConfigMapper
.
updateByPrimaryKey
(
periodCellTemplateConfig
);
if
(!
resultFormula
.
startsWith
(
"BB("
))
{
//add by neo (bb do not nedd parsed formual)
periodCellTemplateConfig
.
setParsedFormula
(
resultFormula
);
periodCellTemplateConfigMapper
.
updateByPrimaryKey
(
periodCellTemplateConfig
);
}
// }
...
...
@@ -285,7 +287,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
Row
row
=
sheet
.
getRow
(
rowNum
-
1
);
if
(
row
!=
null
)
{
Cell
cell
=
row
.
getCell
(
colNum
-
1
);
if
(
cell
!=
null
)
{
if
(
cell
!=
null
)
{
//开始取值然后存放到DataSource
DataSource
dataSource
=
new
DataSource
();
dataSource
.
setId
(
distributedIDService
.
nextId
());
...
...
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