Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
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
zhangkb
indicators
Commits
9884aa47
Commit
9884aa47
authored
Aug 04, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改对标计算逻辑
parent
728dc489
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
24 deletions
+28
-24
DriveIndIdObjCalActor.java
...dicators/akka/actor/indicators/DriveIndIdObjCalActor.java
+28
-24
No files found.
src/main/java/com/keymobile/indicators/akka/actor/indicators/DriveIndIdObjCalActor.java
View file @
9884aa47
...
@@ -96,30 +96,34 @@ public class DriveIndIdObjCalActor extends AbstractActor{
...
@@ -96,30 +96,34 @@ public class DriveIndIdObjCalActor extends AbstractActor{
List
<
String
>
indIdList
=
new
ArrayList
<>();
//定义存储从考核指标公式解析出来的基础指标id
List
<
String
>
indIdList
=
new
ArrayList
<>();
//定义存储从考核指标公式解析出来的基础指标id
DriveIndDef
driveIndDef
=
driveIndDefService
.
getById
(
driveIndId
);
DriveIndDef
driveIndDef
=
driveIndDefService
.
getById
(
driveIndId
);
unit
=
driveIndDef
.
getIndUnit
();
//指标单位
if
(
driveIndDef
==
null
)
{
indType
=
driveIndDef
.
getIndRule
();
//指标类型:正向 反向
logger
.
info
(
"DriveIndDef:"
+
driveIndId
+
" is not exist."
);
scoreCardId
=
driveIndDef
.
getIndCalScoreRule
();
//指标评分规则
}
else
{
code
=
driveIndDef
.
getCode
();
unit
=
driveIndDef
.
getIndUnit
();
//指标单位
indType
=
driveIndDef
.
getIndRule
();
//指标类型:正向 反向
//获取考核指标的公式
scoreCardId
=
driveIndDef
.
getIndCalScoreRule
();
//指标评分规则
driveIndFormula
=
driveIndDef
.
getIndFormat
();
code
=
driveIndDef
.
getCode
();
averageDriveIndFormula
=
driveIndDef
.
getIndFormat
();
//定义用于返回父actor算平均分用的公式
//获取考核指标的公式
Pattern
p
=
Pattern
.
compile
(
"(\\[[^\\]]*\\])"
);
driveIndFormula
=
driveIndDef
.
getIndFormat
();
Matcher
m
=
p
.
matcher
(
driveIndFormula
);
averageDriveIndFormula
=
driveIndDef
.
getIndFormat
();
//定义用于返回父actor算平均分用的公式
while
(
m
.
find
()){
indIdList
.
add
(
m
.
group
().
substring
(
1
,
m
.
group
().
length
()-
1
));
Pattern
p
=
Pattern
.
compile
(
"(\\[[^\\]]*\\])"
);
}
Matcher
m
=
p
.
matcher
(
driveIndFormula
);
//获取公式中的基础指标id
while
(
m
.
find
()){
indIdSize
=
indIdList
.
size
();
indIdList
.
add
(
m
.
group
().
substring
(
1
,
m
.
group
().
length
()-
1
));
if
(!
indIdList
.
isEmpty
())
{
}
for
(
String
indId
:
indIdList
)
{
//获取公式中的基础指标id
GetBaseIndValueMsg
getBaseIndValueMsg
=
new
GetBaseIndValueMsg
(
indIdSize
=
indIdList
.
size
();
indId
,
driveIndIdObjCalMsg
.
getDimValues
());
if
(!
indIdList
.
isEmpty
())
{
ActorRef
getBaseIndValueActor
=
this
.
getContext
()
for
(
String
indId
:
indIdList
)
{
.
actorOf
(
Props
.
create
(
GetBaseIndValueActor
.
class
,
GetBaseIndValueMsg
getBaseIndValueMsg
=
new
GetBaseIndValueMsg
(
()->
new
GetBaseIndValueActor
()));
indId
,
driveIndIdObjCalMsg
.
getDimValues
());
getBaseIndValueActor
.
tell
(
getBaseIndValueMsg
,
getSelf
());
ActorRef
getBaseIndValueActor
=
this
.
getContext
()
.
actorOf
(
Props
.
create
(
GetBaseIndValueActor
.
class
,
()->
new
GetBaseIndValueActor
()));
getBaseIndValueActor
.
tell
(
getBaseIndValueMsg
,
getSelf
());
}
}
}
}
}
})
})
...
...
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