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
421756f9
Commit
421756f9
authored
Feb 22, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改税金公式定位不到数据行时数据的展示效果
parent
3006acfe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+13
-0
WPTYPE.java
...axtech/atms/vat/service/impl/report/functions/WPTYPE.java
+7
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
421756f9
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
com.alibaba.fastjson.JSON
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.WorkbookEvaluator
;
import
org.apache.poi.ss.formula.eval.*
;
...
...
@@ -138,6 +139,7 @@ public class FunctionBase {
dataSource
.
setPeriod
(
period
);
dataSource
.
setProjectId
(
projectId
);
SpringContextUtil
.
periodDataSourceMapper
.
insertSelective
(
dataSource
);
if
(
CollectionUtils
.
isNotEmpty
(
dataSourceList
)){
for
(
Object
obj
:
dataSourceList
)
{
if
(
obj
.
getClass
()
==
java
.
util
.
ArrayList
.
class
)
{
for
(
Object
obj2
:
(
ArrayList
<
Object
>)
obj
)
{
...
...
@@ -161,6 +163,17 @@ public class FunctionBase {
SpringContextUtil
.
periodDataSourceDetailMapper
.
insertSelective
(
dataSourceDetail
);
}
}
}
else
{
PeriodDataSourceDetail
dataSourceDetail
=
new
PeriodDataSourceDetail
();
dataSourceDetail
.
setId
(
SpringContextUtil
.
distributedIdService
.
nextId
());
dataSourceDetail
.
setDataSourceId
(
dataSourceId
);
dataSourceDetail
.
setDataSourceType
(
formulaDataSourceDetailType
.
getCode
());
dataSourceDetail
.
setItemValue
(
"{}"
);
dataSourceDetail
.
setPeriod
(
period
);
dataSourceDetail
.
setProjectId
(
projectId
);
SpringContextUtil
.
periodDataSourceDetailMapper
.
insertSelective
(
dataSourceDetail
);
}
return
dataSourceId
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/WPTYPE.java
View file @
421756f9
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.StringEval
;
...
...
@@ -56,6 +57,10 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction {
cellTemplateDataList
=
agent
.
getCellTemplateByTypeAndIndex
(
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
(),
bo
.
getReportCode
(),
bo
.
getRowColumnIndex
()
-
1
,
bo
.
getTaxRate
(),
bo
.
getRevenueType
(),
bo
.
getTaxType
(),
bo
.
getColumnIndex
()
-
1
,
formulaContext
.
getPeriod
(),
formulaContext
.
getOrganizationId
(),
queryDate
,
queryDate
);
if
(
CollectionUtils
.
isEmpty
(
cellTemplateDataList
)){
cellTemplateDataList
=
agent
.
getCellTemplateGroupDto
(
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
(),
bo
.
getReportCode
(),
ec
.
getRowIndex
(),
ec
.
getColumnIndex
(),
formulaContext
.
getPeriod
());
}
MyAsserts
.
assertNotEmpty
(
cellTemplateDataList
,
Exceptions
.
BB_CELL_TEMP_NULL
);
for
(
CellTemplatePerGroupDto
cellTemplateData
:
cellTemplateDataList
)
{
int
index
=
ec
.
getWorkbook
().
getSheetIndex
(
bo
.
getReportCode
());
...
...
@@ -79,6 +84,8 @@ public class WPTYPE extends FunctionBase implements FreeRefFunction {
formulaContext
.
getProjectId
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
bo
.
getFormulaExpression
(),
cellValue
,
dataSourceId
,
formulaContext
.
getProjectId
());
}
}
...
...
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