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
cd32138b
Commit
cd32138b
authored
Nov 26, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dffs org filter
parent
f74c5e27
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+13
-9
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
cd32138b
...
@@ -14,10 +14,7 @@ import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
...
@@ -14,10 +14,7 @@ import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.entity.AccountMapping
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.AccountMappingExample
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrg
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrgExample
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.vat.entity.GlBalance
;
import
pwc.taxtech.atms.vat.entity.GlBalance
;
import
pwc.taxtech.atms.vat.entity.GlBalanceExample
;
import
pwc.taxtech.atms.vat.entity.GlBalanceExample
;
...
@@ -70,7 +67,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -70,7 +67,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
double
result
=
0
;
double
result
=
0
;
for
(
AccountMapping
a
:
accountMappings
){
for
(
AccountMapping
a
:
accountMappings
){
result
+=
count
(
a
.
getEnterpriseAccountCode
(),
dataSource
,
period
,
year
);
result
+=
count
(
a
.
getEnterpriseAccountCode
(),
dataSource
,
period
,
year
,
orgId
);
}
}
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
...
@@ -80,7 +77,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -80,7 +77,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return
new
NumberEval
(
result
);
return
new
NumberEval
(
result
);
}
else
if
(
type
==
1
){
}
else
if
(
type
==
1
){
double
result
=
count
(
code
,
dataSource
,
period
,
year
);
double
result
=
count
(
code
,
dataSource
,
period
,
year
,
orgId
);
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
new
BigDecimal
(
result
),
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
new
BigDecimal
(
result
),
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
...
@@ -95,10 +92,17 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -95,10 +92,17 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return
year
+
"-"
+
(
period
>
9
?
period
:
(
"0"
+
period
));
return
year
+
"-"
+
(
period
>
9
?
period
:
(
"0"
+
period
));
}
}
private
double
count
(
String
code
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
){
private
double
count
(
String
code
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
,
String
orgId
){
Organization
organization
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
orgId
);
GlBalanceExample
glBalanceExample
=
new
GlBalanceExample
();
GlBalanceExample
glBalanceExample
=
new
GlBalanceExample
();
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
)
GlBalanceExample
.
Criteria
c2
=
glBalanceExample
.
createCriteria
().
andSegment4EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
.
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c2
=
glBalanceExample
.
createCriteria
().
andSegment4EqualTo
(
code
)
.
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
if
(
organization
!=
null
){
c1
.
andSegment1EqualTo
(
organization
.
getClientCode
());
c2
.
andSegment1EqualTo
(
organization
.
getClientCode
());
}
glBalanceExample
.
or
(
c2
);
glBalanceExample
.
or
(
c2
);
List
<
GlBalance
>
list
=
SpringContextUtil
.
glBalanceMapper
.
selectByExample
(
glBalanceExample
);
List
<
GlBalance
>
list
=
SpringContextUtil
.
glBalanceMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
if
(
CollectionUtils
.
isEmpty
(
list
)){
...
...
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