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
b83c00dd
Commit
b83c00dd
authored
Nov 21, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] fixed bb eval code sheet index
parent
8d883515
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+2
-1
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+2
-2
PSUM.java
.../taxtech/atms/vat/service/impl/report/functions/PSUM.java
+3
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
b83c00dd
...
...
@@ -95,7 +95,8 @@ public class BB extends FunctionBase implements FreeRefFunction {
return
returnEval
;
}
else
if
(
bo
.
getPeriod
().
intValue
()
==
0
)
{
cellValue
=
getCellValue
(
ec
,
formulaContext
,
agent
,
bo
.
getRowIndex
()
-
1
,
bo
.
getColumnIndex
()
-
1
,
int
index
=
ec
.
getWorkbook
().
getSheetIndex
(
bo
.
getReportCode
());
cellValue
=
getCellValue
(
index
,
ec
,
formulaContext
,
agent
,
bo
.
getRowIndex
()
-
1
,
bo
.
getColumnIndex
()
-
1
,
Long
.
parseLong
(
cellTemplateData
.
getCellTemplateId
()));
nullCellDto
.
extractFromGroup
(
bo
,
formulaContext
.
getPeriod
(),
formulaContext
.
getYear
(),
cellTemplateData
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
b83c00dd
...
...
@@ -183,12 +183,12 @@ public class FunctionBase {
SpringContextUtil
.
periodFormulaBlockMapper
.
insertSelective
(
periodFormulaBlock
);
}
public
static
BigDecimal
getCellValue
(
OperationEvaluationContext
ec
,
FormulaContext
formulaContext
,
FormulaAgent
agent
,
public
static
BigDecimal
getCellValue
(
int
index
,
OperationEvaluationContext
ec
,
FormulaContext
formulaContext
,
FormulaAgent
agent
,
int
rowIndex
,
int
columnIndex
,
Long
cellTemplateId
)
throws
NoSuchFieldException
,
IllegalAccessException
{
Field
evaluatorField
=
OperationEvaluationContext
.
class
.
getDeclaredField
(
"_bookEvaluator"
);
evaluatorField
.
setAccessible
(
true
);
WorkbookEvaluator
evaluator
=
(
WorkbookEvaluator
)
evaluatorField
.
get
(
ec
);
ValueEval
eval
=
evaluator
.
evaluate
(
ec
.
getWorkbook
().
getSheet
(
ec
.
getSheetIndex
()
).
getCell
(
rowIndex
,
columnIndex
));
ValueEval
eval
=
evaluator
.
evaluate
(
ec
.
getWorkbook
().
getSheet
(
index
).
getCell
(
rowIndex
,
columnIndex
));
List
<
PeriodDataSource
>
dss
=
agent
.
queryManualDataSource
(
cellTemplateId
,
formulaContext
.
getProjectId
(),
formulaContext
.
getPeriod
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/PSUM.java
View file @
b83c00dd
...
...
@@ -72,7 +72,7 @@ public class PSUM extends FunctionBase implements FreeRefFunction {
MyAsserts
.
assertNotEmpty
(
cellTemplateDataList
,
Exceptions
.
PSUM_CELL_TEMP_NULL
);
CellTemplatePerGroupDto
cellTemplateData
=
cellTemplateDataList
.
get
(
0
);
BigDecimal
cellValue
=
getCellValue
(
ec
,
formulaContext
,
agent
,
pCell
.
rowIndex
-
1
,
pCell
.
columnIndex
-
1
,
BigDecimal
cellValue
=
getCellValue
(
ec
.
getSheetIndex
(),
ec
,
formulaContext
,
agent
,
pCell
.
rowIndex
-
1
,
pCell
.
columnIndex
-
1
,
Long
.
parseLong
(
cellTemplateData
.
getCellTemplateId
()));
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
dto
.
fixedWithGroup
(
cellTemplateData
);
...
...
@@ -82,8 +82,8 @@ public class PSUM extends FunctionBase implements FreeRefFunction {
dto
.
setProjectId
(
formulaContext
.
getProjectId
());
dto
.
setRowIndex
(
pCell
.
rowIndex
-
1
);
dto
.
setColumnIndex
(
pCell
.
columnIndex
-
1
);
dto
.
setColumnName
((
pCell
.
columnIndex
-
1
)+
"列"
);
dto
.
setRowName
((
pCell
.
rowIndex
-
1
)+
"行"
);
dto
.
setColumnName
((
pCell
.
columnIndex
)+
"列"
);
dto
.
setRowName
((
pCell
.
rowIndex
)+
"行"
);
dto
.
setReportName
(
ec
.
getWorkbook
().
getSheetName
(
ec
.
getSheetIndex
()));
dto
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
...
...
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