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
169546f8
Commit
169546f8
authored
Apr 18, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix jxfp bug
parent
80b609ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
JXFP.java
.../taxtech/atms/vat/service/impl/report/functions/JXFP.java
+28
-28
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFP.java
View file @
169546f8
...
...
@@ -48,7 +48,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
return
null
;
}
int
certificationPeriod
=
getIntParam
(
args
[
0
],
ec
);
int
certificationPeriod
=
getIntParam
(
args
[
0
],
ec
);
//暂时不做筛选条件
int
invoiceTypeParam
=
getIntParam
(
args
[
1
],
ec
);
int
authenticationType
=
getIntParam
(
args
[
2
],
ec
);
int
resultType
=
getIntParam
(
args
[
3
],
ec
);
...
...
@@ -104,32 +104,32 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
return
NumberEval
.
ZERO
;
}
if
(
certificationPeriod
!=
-
99
&&
certificationPeriod
!=
99
&&
(
certificationPeriod
<
1
||
certificationPeriod
>
12
))
{
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
"0.0"
),
0L
,
formulaContext
.
getProjectId
());
return
NumberEval
.
ZERO
;
}
else
if
(!
formulaContext
.
getIsYear
())
{
if
(
certificationPeriod
==
-
99
)
{
calendar
.
set
(
formulaContext
.
getYear
(),
formulaContext
.
getPeriod
(),
1
);
endDate
=
calendar
.
getTime
();
Date
finalEndDate
=
endDate
;
inputInvoices
=
inputInvoices
.
stream
()
.
filter
(
a
->
a
.
getCertifiedDate
().
before
(
finalEndDate
))
.
collect
(
Collectors
.
toList
());
}
else
if
(
certificationPeriod
!=
99
)
{
calendar
.
set
(
formulaContext
.
getYear
(),
certificationPeriod
-
1
,
1
);
startDate
=
calendar
.
getTime
();
calendar
.
set
(
formulaContext
.
getYear
(),
certificationPeriod
,
1
);
// calendar.add(Calendar.MONTH, 1);
endDate
=
calendar
.
getTime
();
Date
finalEndDate1
=
endDate
;
Date
finalStartDate
=
startDate
;
inputInvoices
=
inputInvoices
.
stream
()
.
filter
(
a
->
a
.
getCertifiedDate
().
after
(
finalStartDate
)
&&
a
.
getCertifiedDate
().
before
(
finalEndDate1
))
.
collect
(
Collectors
.
toList
());
}
}
//
if (certificationPeriod != -99 && certificationPeriod != 99
//
&& (certificationPeriod < 1 || certificationPeriod > 12)) {
//
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal("0.0"), 0L, formulaContext.getProjectId());
//
return NumberEval.ZERO;
//
} else if (!formulaContext.getIsYear()) {
//
if (certificationPeriod == -99) {
//
calendar.set(formulaContext.getYear(), formulaContext.getPeriod(), 1);
//
endDate = calendar.getTime();
//
Date finalEndDate = endDate;
//
inputInvoices = inputInvoices.stream()
//
.filter(a -> a.getCertifiedDate().before(finalEndDate))
//
.collect(Collectors.toList());
//
} else if (certificationPeriod != 99) {
//
calendar.set(formulaContext.getYear(), certificationPeriod - 1, 1);
//
startDate = calendar.getTime();
//
calendar.set(formulaContext.getYear(), certificationPeriod, 1);
//
//
calendar.add(Calendar.MONTH, 1);
//
endDate = calendar.getTime();
//
Date finalEndDate1 = endDate;
//
Date finalStartDate = startDate;
//
inputInvoices = inputInvoices.stream()
//
.filter(a -> a.getCertifiedDate().after(finalStartDate)
//
&& a.getCertifiedDate().before(finalEndDate1))
//
.collect(Collectors.toList());
//
}
//
}
List
<
InputInvoiceDataSourceDto
>
dataSource
=
new
ArrayList
<>();
for
(
CertifiedInvoicesList
x
:
inputInvoices
)
{
...
...
@@ -198,7 +198,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
public
List
<
CertifiedInvoicesList
>
getInvoice
(
Integer
period
,
Integer
invoiceType
,
String
checkPass
,
String
scanPass
,
String
notPass
)
{
CertifiedInvoicesListExample
example
=
new
CertifiedInvoicesListExample
();
CertifiedInvoicesListExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andProjectIdEqualTo
(
formulaContext
.
getProjectId
());
if
(
period
!=
null
)
{
criteria
.
andPeriodEqualTo
(
Integer
.
valueOf
(
formulaContext
.
getYear
()
+
(
period
>
9
?
period
.
toString
()
:
"0"
+
period
.
toString
())));
}
...
...
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