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
81822599
Commit
81822599
authored
Aug 19, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改对标单元计算取数逻辑
parent
ffdaa94e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
DriveIndIdObjCalActor.java
...dicators/akka/actor/indicators/DriveIndIdObjCalActor.java
+3
-8
GetBaseIndValueActor.java
...ndicators/akka/actor/indicators/GetBaseIndValueActor.java
+6
-1
No files found.
src/main/java/com/keymobile/indicators/akka/actor/indicators/DriveIndIdObjCalActor.java
View file @
81822599
...
...
@@ -153,14 +153,10 @@ public class DriveIndIdObjCalActor extends AbstractActor{
logger
.
info
(
baseIndValueMsg
.
getConfirmMessage
());
}
String
indValue
=
baseIndValueMsg
.
getValue
();
//如果指标值返回空值
,那么就不进行下面的计算了,直接返回给父actor
//如果指标值返回空值
if
(
StringUtils
.
isBlank
(
indValue
))
{
CalIndAverageAndRankMsg
driveIndAverageAndRankMsg
=
new
CalIndAverageAndRankMsg
(-
1
,
compareId
,
driveIndId
,
compareObj
,
date
,
"NaN"
,
unit
,
indType
,
scoreCardId
,
averageDriveIndFormula
,
compCalLogId
);
driveIndIdCalActor
.
tell
(
driveIndAverageAndRankMsg
,
ActorRef
.
noSender
());
}
else
{
indValue
=
"0.0"
;
}
try
{
driveIndFormula
=
driveIndFormula
.
replace
(
"["
+
baseIndValueMsg
.
getIndId
()+
"]"
,
indValue
);
...
...
@@ -269,7 +265,6 @@ public class DriveIndIdObjCalActor extends AbstractActor{
driveIndIdCalActor
.
tell
(
driveIndAverageAndRankMsg
,
ActorRef
.
noSender
());
}
}
}
})
.
build
();
}
...
...
src/main/java/com/keymobile/indicators/akka/actor/indicators/GetBaseIndValueActor.java
View file @
81822599
...
...
@@ -21,10 +21,15 @@ public class GetBaseIndValueActor extends AbstractActor{
Map
<
String
,
Object
>
indValueMap
=
indicatorsValueService
.
getIndicatorsValue
(
getBaseIndValueMsg
.
getIndId
(),
getBaseIndValueMsg
.
getDimValue
());
if
(
indValueMap
!=
null
)
{
if
(
indValueMap
.
get
(
"value"
)==
null
)
{
//如果指标值为空,返回失败结果
//返回指标值结果
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
()
,
indValueMap
.
get
(
"value"
)==
null
?
null
:
indValueMap
.
get
(
"value"
).
toString
(),
,
null
,
indValueMap
.
get
(
"compareObjDesc"
).
toString
(),
0
,
""
),
getSelf
());
}
else
{
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
()
,
indValueMap
.
get
(
"value"
).
toString
(),
indValueMap
.
get
(
"compareObjDesc"
).
toString
(),
1
,
""
),
getSelf
());
}
}
else
{
//返回指标值结果
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
(),
null
,
null
,
...
...
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