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
b2b88c09
Commit
b2b88c09
authored
Mar 21, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
税金计算表功能代码
parent
b2991ee2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+17
-1
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+2
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
b2b88c09
...
...
@@ -396,10 +396,26 @@ public class ReportServiceImpl extends BaseService {
if
(
r
<=
addRowIndex
+
1
)
{
String
cellId
=
projectId
+
template
.
getId
()+
period
+
r
+
c
;
if
((
r
-
1
)>=
0
&&(
r
-
1
)<
configIds
.
size
()){
cellId
+=
configIds
.
get
(
r
-
1
);
cellId
+=
configIds
.
get
(
configIds
.
size
()-
r
);
}
Long
cellTemplateId
=
Long
.
valueOf
(
cellId
.
hashCode
());
cellTemplateId
=
cellTemplateId
<
0
?
cellTemplateId:
(
cellTemplateId
*-
1
);
//更新手工数据源
PeriodDataSourceExample
delExample
=
new
PeriodDataSourceExample
();
delExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
)
.
andPeriodEqualTo
(
period
).
andTypeEqualTo
(
10
).
andColumnIndexEqualTo
(
c
).
andRowIndexEqualTo
(
r
);
PeriodDataSource
dataSource
=
new
DataSourceExtendDto
();
dataSource
.
setColumnIndex
(
999
);
dataSource
.
setRowIndex
(
999
);
periodDataSourceMapper
.
updateByExampleSelective
(
dataSource
,
delExample
);
PeriodDataSourceExample
updateExample
=
new
PeriodDataSourceExample
();
updateExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
)
.
andPeriodEqualTo
(
period
).
andTypeEqualTo
(
10
).
andCellTemplateIdEqualTo
(
cellTemplateId
);
dataSource
=
new
DataSourceExtendDto
();
dataSource
.
setColumnIndex
(
c
);
dataSource
.
setRowIndex
(
r
);
periodDataSourceMapper
.
updateByExampleSelective
(
dataSource
,
updateExample
);
PeriodCellTemplate
cellTemplate
=
new
PeriodCellTemplate
();
cellTemplate
.
setPeriod
(
period
);
cellTemplate
.
setRowName
(
POIUtil
.
getCellFormulaString
(
cell
));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
b2b88c09
...
...
@@ -229,8 +229,10 @@ public class FunctionBase {
List
<
PeriodDataSource
>
dss
=
agent
.
queryManualDataSource
(
cellTemplateId
,
formulaContext
.
getProjectId
(),
formulaContext
.
getPeriod
());
if
(
eval
instanceof
ErrorEval
||
eval
==
null
||
eval
instanceof
BlankEval
)
{
if
(
eval
!=
null
&&
eval
instanceof
ErrorEval
){
LOGGER
.
warn
(
"[Formula_Exception] error eval for cell {} and error code {} and error String {}"
,
cellTemplateId
,
((
ErrorEval
)
eval
).
getErrorCode
(),
((
ErrorEval
)
eval
).
getErrorString
());
}
if
(!
dss
.
isEmpty
())
return
dss
.
get
(
0
).
getAmount
();
}
else
{
String
evalStr
=
OperandResolver
.
coerceValueToString
(
eval
);
...
...
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