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
07016aa9
Commit
07016aa9
authored
Sep 30, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] fixed get vattemplate group id not bslp
parent
b3d50785
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
TemplateServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
+7
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
View file @
07016aa9
...
...
@@ -234,7 +234,7 @@ public class TemplateServiceImpl extends AbstractService implements TemplateServ
@Override
public
OperationResultDto
<
List
<
TemplateByGroupDto
>>
getByGroupId
(
Long
templateGroupId
,
String
projectId
)
{
OperationResultDto
result
=
new
OperationResultDto
();
Long
bspl
=
get
BSPL
TemplateGroup
(
projectId
);
Long
bspl
=
get
Vat
TemplateGroup
(
projectId
);
TemplateExample
example
=
new
TemplateExample
();
List
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
templateGroupId
);
...
...
@@ -242,7 +242,7 @@ public class TemplateServiceImpl extends AbstractService implements TemplateServ
ids
.
add
(
bspl
);
}
example
.
createCriteria
().
andTemplateGroupIdIn
(
ids
);
example
.
setOrderByClause
(
"
order_index"
);
example
.
setOrderByClause
(
"order_index"
);
List
<
Template
>
templates
=
templateMapper
.
selectByExample
(
example
);
List
<
TemplateByGroupDto
>
wrappList
=
new
ArrayList
<>();
if
(
bspl
!=
null
)
{
...
...
@@ -285,7 +285,7 @@ public class TemplateServiceImpl extends AbstractService implements TemplateServ
return
result
;
}
private
Long
get
BSPL
TemplateGroup
(
String
projectId
)
{
private
Long
get
Vat
TemplateGroup
(
String
projectId
)
{
ProjectExample
example
=
new
ProjectExample
();
example
.
createCriteria
().
andIdEqualTo
(
projectId
);
List
<
Project
>
projects
=
projectMapper
.
selectByExample
(
example
);
...
...
@@ -295,10 +295,12 @@ public class TemplateServiceImpl extends AbstractService implements TemplateServ
}
List
<
TemplateGroup
>
allTemplateGroups
=
templateGroupMapper
.
selectByExample
(
new
TemplateGroupExample
());
Optional
<
TemplateGroup
>
bsplTemplateGroup
=
allTemplateGroups
.
stream
().
filter
(
a
->
a
.
getIndustryIds
().
equals
(
industryId
)
&&
a
.
getGroupType
().
equals
(
TemplateGroupType
.
FinancialReturn
.
getCode
())).
findFirst
();
Optional
<
TemplateGroup
>
bsplTemplateGroup
=
allTemplateGroups
.
stream
().
filter
(
a
->
a
.
getIndustryIds
().
equals
(
industryId
)
&&
a
.
getGroupType
().
equals
(
TemplateGroupType
.
TaxReturn
.
getCode
())).
findFirst
();
if
(!
bsplTemplateGroup
.
isPresent
())
{
bsplTemplateGroup
=
allTemplateGroups
.
stream
().
filter
(
a
->
a
.
getIndustryIds
().
contains
(
industryId
.
get
())
&&
a
.
getGroupType
().
equals
(
TemplateGroupType
.
FinancialReturn
.
getCode
())).
findFirst
();
bsplTemplateGroup
=
allTemplateGroups
.
stream
().
filter
(
a
->
a
.
getIndustryIds
().
contains
(
industryId
.
get
())
&&
a
.
getGroupType
().
equals
(
TemplateGroupType
.
TaxReturn
.
getCode
())).
findFirst
();
}
if
(!
bsplTemplateGroup
.
isPresent
())
{
...
...
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