Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
c68bee85
Commit
c68bee85
authored
Dec 09, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 轮次扣分
parent
e2abb4dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
PointDeductionRulesServiceImpl.java
...equity/aggregate/impl/PointDeductionRulesServiceImpl.java
+4
-2
No files found.
src/main/java/cn/com/poc/equity/aggregate/impl/PointDeductionRulesServiceImpl.java
View file @
c68bee85
...
@@ -32,7 +32,7 @@ public class PointDeductionRulesServiceImpl implements PointDeductionRulesServic
...
@@ -32,7 +32,7 @@ public class PointDeductionRulesServiceImpl implements PointDeductionRulesServic
bizPointDeductionRulesEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
bizPointDeductionRulesEntity
.
setIsDeleted
(
CommonConstant
.
IsDeleted
.
N
);
List
<
BizPointDeductionRulesEntity
>
entities
=
bizPointDeductionRulesService
.
findByExample
(
bizPointDeductionRulesEntity
,
null
);
List
<
BizPointDeductionRulesEntity
>
entities
=
bizPointDeductionRulesService
.
findByExample
(
bizPointDeductionRulesEntity
,
null
);
Map
<
String
,
List
<
BizPointDeductionRulesEntity
>>
map
=
entities
.
stream
().
collect
(
Collectors
.
groupingBy
(
BizPointDeductionRulesEntity:
:
getRuleType
,
Collectors
.
toList
()));
Map
<
String
,
List
<
BizPointDeductionRulesEntity
>>
map
=
entities
.
stream
().
collect
(
Collectors
.
groupingBy
(
BizPointDeductionRulesEntity:
:
getRuleType
,
Collectors
.
toList
()));
// 模型扣分
if
(
StringUtils
.
isNotBlank
(
modelName
)
&&
map
.
containsKey
(
RuleType
.
MODEL
.
getRuleType
()))
{
if
(
StringUtils
.
isNotBlank
(
modelName
)
&&
map
.
containsKey
(
RuleType
.
MODEL
.
getRuleType
()))
{
List
<
BizPointDeductionRulesEntity
>
modelDeductionRules
=
map
.
get
(
RuleType
.
MODEL
.
getRuleType
());
List
<
BizPointDeductionRulesEntity
>
modelDeductionRules
=
map
.
get
(
RuleType
.
MODEL
.
getRuleType
());
for
(
BizPointDeductionRulesEntity
modelDeductionRule
:
modelDeductionRules
)
{
for
(
BizPointDeductionRulesEntity
modelDeductionRule
:
modelDeductionRules
)
{
...
@@ -42,15 +42,17 @@ public class PointDeductionRulesServiceImpl implements PointDeductionRulesServic
...
@@ -42,15 +42,17 @@ public class PointDeductionRulesServiceImpl implements PointDeductionRulesServic
}
}
}
}
}
}
//轮次 1-5-10-15 1轮和5轮扣模型原始的积分 10轮 原始积分*2 15轮 原始积分*3
if
(
communicationTurn
!=
null
&&
map
.
containsKey
(
RuleType
.
COMMUNICATION_TURN
.
getRuleType
()))
{
if
(
communicationTurn
!=
null
&&
map
.
containsKey
(
RuleType
.
COMMUNICATION_TURN
.
getRuleType
()))
{
List
<
BizPointDeductionRulesEntity
>
communicationTurnRules
=
map
.
get
(
RuleType
.
COMMUNICATION_TURN
.
getRuleType
());
List
<
BizPointDeductionRulesEntity
>
communicationTurnRules
=
map
.
get
(
RuleType
.
COMMUNICATION_TURN
.
getRuleType
());
for
(
BizPointDeductionRulesEntity
communicationTurnRule
:
communicationTurnRules
)
{
for
(
BizPointDeductionRulesEntity
communicationTurnRule
:
communicationTurnRules
)
{
if
(
communicationTurnRule
.
getRelationId
().
equals
(
String
.
valueOf
(
communicationTurn
)))
{
if
(
communicationTurnRule
.
getRelationId
().
equals
(
String
.
valueOf
(
communicationTurn
)))
{
pointDeductionNum
=
pointDeductionNum
+
communicationTurnRule
.
getNumber
()
;
pointDeductionNum
=
pointDeductionNum
*
communicationTurnRule
.
getNumber
()
+
pointDeductionNum
;
break
;
break
;
}
}
}
}
}
}
// 插件扣分
if
(
CollectionUtils
.
isNotEmpty
(
tools
)
&&
map
.
containsKey
(
RuleType
.
PLUGIN
.
getRuleType
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
tools
)
&&
map
.
containsKey
(
RuleType
.
PLUGIN
.
getRuleType
()))
{
List
<
BizPointDeductionRulesEntity
>
pluginRules
=
map
.
get
(
RuleType
.
PLUGIN
.
getRuleType
());
List
<
BizPointDeductionRulesEntity
>
pluginRules
=
map
.
get
(
RuleType
.
PLUGIN
.
getRuleType
());
for
(
Tool
tool
:
tools
)
{
for
(
Tool
tool
:
tools
)
{
...
...
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