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
903a9c68
Commit
903a9c68
authored
Nov 28, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] fixed upate taxpay rule settint
parent
5da74e7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+17
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
903a9c68
...
...
@@ -2402,7 +2402,14 @@ public class OrganizationServiceImpl {
newRule
.
setTaxPayerType
(
newTaxPayerType
);
// Use tax payer type related to template group
newRule
.
setCreateTime
(
now
);
newRule
.
setUpdateTime
(
now
);
taxPayerReportRuleMapper
.
insertSelective
(
newRule
);
TaxPayerReportRuleExample
exam
=
new
TaxPayerReportRuleExample
();
exam
.
createCriteria
().
andOrganizationIdEqualTo
(
orgDto
.
getId
()).
andTemplateGroupIdEqualTo
(
vatSetting
.
getTemplateGroupId
());
List
<
TaxPayerReportRule
>
rules
=
taxPayerReportRuleMapper
.
selectByExample
(
exam
);
if
(!
rules
.
isEmpty
())
{
newRule
.
setId
(
rules
.
get
(
0
).
getId
());
taxPayerReportRuleMapper
.
updateByPrimaryKeySelective
(
newRule
);
}
else
taxPayerReportRuleMapper
.
insertSelective
(
newRule
);
}
else
{
activeRule
.
setTemplateGroupId
(
vatSetting
.
getTemplateGroupId
());
activeRule
.
setTaxPayerType
(
newTaxPayerType
);
...
...
@@ -2417,7 +2424,15 @@ public class OrganizationServiceImpl {
newRule
.
setTaxPayerType
(
newTaxPayerType
);
// Use tax payer type related to template group
newRule
.
setCreateTime
(
now
);
newRule
.
setUpdateTime
(
now
);
taxPayerReportRuleMapper
.
insertSelective
(
newRule
);
TaxPayerReportRuleExample
exam
=
new
TaxPayerReportRuleExample
();
exam
.
createCriteria
().
andOrganizationIdEqualTo
(
orgDto
.
getId
()).
andTemplateGroupIdEqualTo
(
vatSetting
.
getTemplateGroupId
());
List
<
TaxPayerReportRule
>
rules
=
taxPayerReportRuleMapper
.
selectByExample
(
exam
);
if
(!
rules
.
isEmpty
())
{
newRule
.
setId
(
rules
.
get
(
0
).
getId
());
taxPayerReportRuleMapper
.
updateByPrimaryKeySelective
(
newRule
);
}
else
taxPayerReportRuleMapper
.
insertSelective
(
newRule
);
}
}
else
if
(
activeRule
!=
null
)
{
// If no setting, remove non-default rule
taxPayerReportRuleMapper
.
deleteByPrimaryKey
(
activeRule
.
getId
());
...
...
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