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
abf857d5
Commit
abf857d5
authored
May 16, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复tbm调整表计算bug
parent
e3c6ed6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
23 deletions
+22
-23
TBM.java
...c/taxtech/atms/vat/service/impl/report/functions/TBM.java
+22
-23
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/TBM.java
View file @
abf857d5
...
@@ -137,32 +137,31 @@ public class TBM extends FunctionBase implements FreeRefFunction {
...
@@ -137,32 +137,31 @@ public class TBM extends FunctionBase implements FreeRefFunction {
c1
.
andOrganizationIdEqualTo
(
organization
.
getId
());
c1
.
andOrganizationIdEqualTo
(
organization
.
getId
());
}
}
List
<
AdjustmentTable
>
list
=
SpringContextUtil
.
adjustmentTableMapper
.
selectByExample
(
glBalanceExample
);
List
<
AdjustmentTable
>
list
=
SpringContextUtil
.
adjustmentTableMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
0.0
;
}
BigDecimal
amount
=
new
BigDecimal
(
0
);
BigDecimal
amount
=
new
BigDecimal
(
0
);
//计算本期发生
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
AdjustmentTable
balance
:
list
)
{
//计算本期发生
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
for
(
AdjustmentTable
balance
:
list
)
{
if
(
eventType
==
1
)
{
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
if
(
calculateType
==
1
)
{
if
(
eventType
==
1
)
{
dto
.
setAmount
(
balance
.
getPeriodCrBeq
().
subtract
(
balance
.
getPeriodDrBeq
()));
if
(
calculateType
==
1
)
{
}
else
if
(
calculateType
==
2
)
{
dto
.
setAmount
(
balance
.
getPeriodCrBeq
().
subtract
(
balance
.
getPeriodDrBeq
()));
dto
.
setAmount
(
balance
.
getPeriodDrBeq
().
subtract
(
balance
.
getPeriodCrBeq
()));
}
else
if
(
calculateType
==
2
)
{
}
dto
.
setAmount
(
balance
.
getPeriodDrBeq
().
subtract
(
balance
.
getPeriodCrBeq
()));
}
else
if
(
eventType
==
2
)
{
}
if
(
calculateType
==
1
)
{
}
else
if
(
eventType
==
2
)
{
dto
.
setAmount
(
balance
.
getEndBalBeq
());
if
(
calculateType
==
1
)
{
}
else
if
(
calculateType
==
2
)
{
dto
.
setAmount
(
balance
.
getEndBalBeq
());
dto
.
setAmount
(
balance
.
getEndBalBeq
().
multiply
(
new
BigDecimal
(-
1
)));
}
else
if
(
calculateType
==
2
)
{
dto
.
setAmount
(
balance
.
getEndBalBeq
().
multiply
(
new
BigDecimal
(-
1
)));
}
}
}
amount
=
amount
.
add
(
dto
.
getAmount
()
==
null
?
(
new
BigDecimal
(
0
))
:
dto
.
getAmount
());
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
contain
.
add
(
dto
);
}
}
amount
=
amount
.
add
(
dto
.
getAmount
()
==
null
?
(
new
BigDecimal
(
0
))
:
dto
.
getAmount
());
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
contain
.
add
(
dto
);
}
}
//计算往期发生
//计算往期发生
glBalanceExample
=
new
AdjustmentTableExample
();
glBalanceExample
=
new
AdjustmentTableExample
();
...
...
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