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
430419fd
Commit
430419fd
authored
Jul 15, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存对标对象描述到库表中
parent
e6fcee11
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
12 deletions
+51
-12
DriveIndCalculateActor.java
...ymobile/indicators/akka/actor/DriveIndCalculateActor.java
+2
-2
IndGetValueActor.java
...com/keymobile/indicators/akka/actor/IndGetValueActor.java
+3
-2
DriveIndIdObjCalActor.java
...dicators/akka/actor/indicators/DriveIndIdObjCalActor.java
+2
-2
GetBaseIndValueActor.java
...ndicators/akka/actor/indicators/GetBaseIndValueActor.java
+3
-2
IndValueMsg.java
...va/com/keymobile/indicators/akka/message/IndValueMsg.java
+14
-2
BaseIndValueMsg.java
...e/indicators/akka/message/indicators/BaseIndValueMsg.java
+13
-1
DriveIndCalResultDef.java
...icators/model/entity/indicators/DriveIndCalResultDef.java
+3
-1
ObjScoreCalResult.java
...dicators/model/entity/objscorerule/ObjScoreCalResult.java
+1
-0
IndicatorsValueService.java
.../indicators/service/hytobacco/IndicatorsValueService.java
+1
-0
ScoreRuleService.java
...mobile/indicators/service/hytobacco/ScoreRuleService.java
+9
-0
No files found.
src/main/java/com/keymobile/indicators/akka/actor/DriveIndCalculateActor.java
View file @
430419fd
...
@@ -157,7 +157,7 @@ public class DriveIndCalculateActor extends AbstractActor{
...
@@ -157,7 +157,7 @@ public class DriveIndCalculateActor extends AbstractActor{
if
(
driveIndCalResult
==
null
)
{
if
(
driveIndCalResult
==
null
)
{
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndId
,
compareObj
,
date
,
driveIndValue
,
unit
,
driveIndId
,
compareObj
,
date
,
driveIndValue
,
unit
,
"1"
,
"1"
,
"admin"
,
code
);
"1"
,
"1"
,
"admin"
,
code
,
indValueMsg
.
getCompareObjDesc
()
);
}
else
{
}
else
{
driveIndCalResult
.
setValue
(
driveIndValue
);
driveIndCalResult
.
setValue
(
driveIndValue
);
}
}
...
@@ -177,7 +177,7 @@ public class DriveIndCalculateActor extends AbstractActor{
...
@@ -177,7 +177,7 @@ public class DriveIndCalculateActor extends AbstractActor{
if
(
driveIndCalResult
==
null
)
{
if
(
driveIndCalResult
==
null
)
{
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndId
,
compareObj
,
date
,
"NaN"
,
unit
,
driveIndId
,
compareObj
,
date
,
"NaN"
,
unit
,
"1"
,
"0"
,
"admin"
,
code
);
"1"
,
"0"
,
"admin"
,
code
,
indValueMsg
.
getCompareObjDesc
()
);
}
else
{
}
else
{
driveIndCalResult
.
setValue
(
"NaN"
);
driveIndCalResult
.
setValue
(
"NaN"
);
}
}
...
...
src/main/java/com/keymobile/indicators/akka/actor/IndGetValueActor.java
View file @
430419fd
...
@@ -23,11 +23,12 @@ public class IndGetValueActor extends AbstractActor{
...
@@ -23,11 +23,12 @@ public class IndGetValueActor extends AbstractActor{
//返回指标值结果
//返回指标值结果
getSender
().
tell
(
new
IndValueMsg
(
indCalculateMsg
.
getIndId
()
getSender
().
tell
(
new
IndValueMsg
(
indCalculateMsg
.
getIndId
()
,
indValueMap
.
get
(
"value"
).
toString
()
,
indValueMap
.
get
(
"value"
).
toString
()
,
indCalculateMsg
.
getIndValueType
(),
1
,
""
),
getSelf
());
,
indCalculateMsg
.
getIndValueType
(),
indValueMap
.
get
(
"compareObjDesc"
).
toString
(),
1
,
""
),
getSelf
());
}
else
{
}
else
{
//返回指标值结果
//返回指标值结果
getSender
().
tell
(
new
IndValueMsg
(
indCalculateMsg
.
getIndId
(),
null
getSender
().
tell
(
new
IndValueMsg
(
indCalculateMsg
.
getIndId
(),
null
,
indCalculateMsg
.
getIndValueType
(),
0
,
"无法获取指标id:"
+
,
indCalculateMsg
.
getIndValueType
(),
null
,
0
,
"无法获取指标id:"
+
indCalculateMsg
.
getIndId
()+
";维度:"
+
indCalculateMsg
.
getIndId
()+
";维度:"
+
indCalculateMsg
.
getDimValue
().
get
(
0
).
getDimvalue
()+
","
+
indCalculateMsg
.
getDimValue
().
get
(
0
).
getDimvalue
()+
","
+
indCalculateMsg
.
getDimValue
().
get
(
1
).
getDimvalue
()+
" 的指标值"
),
getSelf
());
indCalculateMsg
.
getDimValue
().
get
(
1
).
getDimvalue
()+
" 的指标值"
),
getSelf
());
...
...
src/main/java/com/keymobile/indicators/akka/actor/indicators/DriveIndIdObjCalActor.java
View file @
430419fd
...
@@ -187,7 +187,7 @@ public class DriveIndIdObjCalActor extends AbstractActor{
...
@@ -187,7 +187,7 @@ public class DriveIndIdObjCalActor extends AbstractActor{
if
(
driveIndCalResult
==
null
)
{
if
(
driveIndCalResult
==
null
)
{
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndId
,
compareObj
,
date
,
driveIndValue
,
unit
,
driveIndId
,
compareObj
,
date
,
driveIndValue
,
unit
,
"1"
,
"1"
,
"admin"
,
code
);
"1"
,
"1"
,
"admin"
,
code
,
baseIndValueMsg
.
getCompareObjDesc
()
);
}
else
{
}
else
{
driveIndCalResult
.
setCode
(
code
);
driveIndCalResult
.
setCode
(
code
);
driveIndCalResult
.
setUnit
(
unit
);
driveIndCalResult
.
setUnit
(
unit
);
...
@@ -210,7 +210,7 @@ public class DriveIndIdObjCalActor extends AbstractActor{
...
@@ -210,7 +210,7 @@ public class DriveIndIdObjCalActor extends AbstractActor{
if
(
driveIndCalResult
==
null
)
{
if
(
driveIndCalResult
==
null
)
{
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndCalResult
=
new
DriveIndCalResultDef
(
compareId
,
driveIndId
,
compareObj
,
date
,
"NaN"
,
unit
,
driveIndId
,
compareObj
,
date
,
"NaN"
,
unit
,
"1"
,
"0"
,
"admin"
,
code
);
"1"
,
"0"
,
"admin"
,
code
,
baseIndValueMsg
.
getCompareObjDesc
()
);
}
else
{
}
else
{
driveIndCalResult
.
setCode
(
code
);
driveIndCalResult
.
setCode
(
code
);
driveIndCalResult
.
setUnit
(
unit
);
driveIndCalResult
.
setUnit
(
unit
);
...
...
src/main/java/com/keymobile/indicators/akka/actor/indicators/GetBaseIndValueActor.java
View file @
430419fd
...
@@ -23,10 +23,11 @@ public class GetBaseIndValueActor extends AbstractActor{
...
@@ -23,10 +23,11 @@ public class GetBaseIndValueActor extends AbstractActor{
if
(
indValueMap
!=
null
)
{
if
(
indValueMap
!=
null
)
{
//返回指标值结果
//返回指标值结果
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
()
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
()
,
indValueMap
.
get
(
"value"
).
toString
(),
1
,
""
),
getSelf
());
,
indValueMap
.
get
(
"value"
).
toString
(),
indValueMap
.
get
(
"compareObjDesc"
).
toString
(),
1
,
""
),
getSelf
());
}
else
{
}
else
{
//返回指标值结果
//返回指标值结果
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
(),
null
,
getSender
().
tell
(
new
BaseIndValueMsg
(
getBaseIndValueMsg
.
getIndId
(),
null
,
null
,
0
,
"无法获取指标id:"
+
0
,
"无法获取指标id:"
+
getBaseIndValueMsg
.
getIndId
()+
";维度:"
+
getBaseIndValueMsg
.
getIndId
()+
";维度:"
+
getBaseIndValueMsg
.
getDimValue
().
get
(
0
).
getDimvalue
()+
","
+
getBaseIndValueMsg
.
getDimValue
().
get
(
0
).
getDimvalue
()+
","
+
...
...
src/main/java/com/keymobile/indicators/akka/message/IndValueMsg.java
View file @
430419fd
...
@@ -14,15 +14,19 @@ public class IndValueMsg implements Serializable{
...
@@ -14,15 +14,19 @@ public class IndValueMsg implements Serializable{
private
String
type
;
//指标值类型
private
String
type
;
//指标值类型
private
String
compareObjDesc
;
//是否完成标识:1.完成 0.未完成
//是否完成标识:1.完成 0.未完成
private
Integer
isFinish
;
private
Integer
isFinish
;
//日志报告
//日志报告
private
String
confirmMessage
;
private
String
confirmMessage
;
public
IndValueMsg
(
String
indId
,
String
value
,
String
type
,
Integer
isFinish
,
String
confirmMessage
)
{
public
IndValueMsg
(
String
indId
,
String
value
,
String
type
,
String
compareObjDesc
,
this
.
setIndId
(
indId
);
Integer
isFinish
,
String
confirmMessage
)
{
this
.
indId
=
indId
;
this
.
value
=
value
;
this
.
value
=
value
;
this
.
type
=
type
;
this
.
type
=
type
;
this
.
setCompareObjDesc
(
compareObjDesc
);
this
.
isFinish
=
isFinish
;
this
.
isFinish
=
isFinish
;
this
.
confirmMessage
=
confirmMessage
;
this
.
confirmMessage
=
confirmMessage
;
}
}
...
@@ -66,4 +70,12 @@ public class IndValueMsg implements Serializable{
...
@@ -66,4 +70,12 @@ public class IndValueMsg implements Serializable{
public
void
setIndId
(
String
indId
)
{
public
void
setIndId
(
String
indId
)
{
this
.
indId
=
indId
;
this
.
indId
=
indId
;
}
}
public
String
getCompareObjDesc
()
{
return
compareObjDesc
;
}
public
void
setCompareObjDesc
(
String
compareObjDesc
)
{
this
.
compareObjDesc
=
compareObjDesc
;
}
}
}
src/main/java/com/keymobile/indicators/akka/message/indicators/BaseIndValueMsg.java
View file @
430419fd
...
@@ -12,14 +12,18 @@ public class BaseIndValueMsg implements Serializable{
...
@@ -12,14 +12,18 @@ public class BaseIndValueMsg implements Serializable{
private
String
value
;
//指标值
private
String
value
;
//指标值
private
String
compareObjDesc
;
//对标对象描述
//是否完成标识:1.完成 0.未完成
//是否完成标识:1.完成 0.未完成
private
Integer
isFinish
;
private
Integer
isFinish
;
//日志报告
//日志报告
private
String
confirmMessage
;
private
String
confirmMessage
;
public
BaseIndValueMsg
(
String
indId
,
String
value
,
Integer
isFinish
,
String
confirmMessage
)
{
public
BaseIndValueMsg
(
String
indId
,
String
value
,
String
compareObjDesc
,
Integer
isFinish
,
String
confirmMessage
)
{
this
.
indId
=
indId
;
this
.
indId
=
indId
;
this
.
value
=
value
;
this
.
value
=
value
;
this
.
compareObjDesc
=
compareObjDesc
;
this
.
isFinish
=
isFinish
;
this
.
isFinish
=
isFinish
;
this
.
confirmMessage
=
confirmMessage
;
this
.
confirmMessage
=
confirmMessage
;
}
}
...
@@ -55,4 +59,12 @@ public class BaseIndValueMsg implements Serializable{
...
@@ -55,4 +59,12 @@ public class BaseIndValueMsg implements Serializable{
public
void
setConfirmMessage
(
String
confirmMessage
)
{
public
void
setConfirmMessage
(
String
confirmMessage
)
{
this
.
confirmMessage
=
confirmMessage
;
this
.
confirmMessage
=
confirmMessage
;
}
}
public
String
getCompareObjDesc
()
{
return
compareObjDesc
;
}
public
void
setCompareObjDesc
(
String
compareObjDesc
)
{
this
.
compareObjDesc
=
compareObjDesc
;
}
}
}
src/main/java/com/keymobile/indicators/model/entity/indicators/DriveIndCalResultDef.java
View file @
430419fd
...
@@ -24,6 +24,7 @@ public class DriveIndCalResultDef {
...
@@ -24,6 +24,7 @@ public class DriveIndCalResultDef {
private
String
compareId
;
private
String
compareId
;
private
String
indId
;
private
String
indId
;
private
String
compareObj
;
private
String
compareObj
;
private
String
compareObjDesc
;
private
Integer
date
;
private
Integer
date
;
private
String
value
;
private
String
value
;
private
String
unit
;
private
String
unit
;
...
@@ -43,7 +44,7 @@ public class DriveIndCalResultDef {
...
@@ -43,7 +44,7 @@ public class DriveIndCalResultDef {
}
}
public
DriveIndCalResultDef
(
String
compareId
,
String
indId
,
String
compareObj
,
int
date
,
String
value
,
public
DriveIndCalResultDef
(
String
compareId
,
String
indId
,
String
compareObj
,
int
date
,
String
value
,
String
unit
,
String
type
,
String
isRight
,
String
lastUpdater
,
String
code
)
{
String
unit
,
String
type
,
String
isRight
,
String
lastUpdater
,
String
code
,
String
compareObjDesc
)
{
this
.
compareId
=
compareId
;
this
.
compareId
=
compareId
;
this
.
indId
=
indId
;
this
.
indId
=
indId
;
this
.
compareObj
=
compareObj
;
this
.
compareObj
=
compareObj
;
...
@@ -54,5 +55,6 @@ public class DriveIndCalResultDef {
...
@@ -54,5 +55,6 @@ public class DriveIndCalResultDef {
this
.
isRight
=
isRight
;
this
.
isRight
=
isRight
;
this
.
lastUpdater
=
lastUpdater
;
this
.
lastUpdater
=
lastUpdater
;
this
.
code
=
code
;
this
.
code
=
code
;
this
.
compareObjDesc
=
compareObjDesc
;
}
}
}
}
src/main/java/com/keymobile/indicators/model/entity/objscorerule/ObjScoreCalResult.java
View file @
430419fd
...
@@ -19,6 +19,7 @@ public class ObjScoreCalResult {
...
@@ -19,6 +19,7 @@ public class ObjScoreCalResult {
private
String
compareId
;
//对标单元id
private
String
compareId
;
//对标单元id
private
String
compareObj
;
//对标对象
private
String
compareObj
;
//对标对象
private
String
compareObjDesc
;
//对标对象描述
private
String
indIds
;
//对标考核指标id
private
String
indIds
;
//对标考核指标id
private
Integer
date
;
//对标日期
private
Integer
date
;
//对标日期
private
String
scoreValue
;
//考核对象得分
private
String
scoreValue
;
//考核对象得分
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/IndicatorsValueService.java
View file @
430419fd
...
@@ -671,6 +671,7 @@ public class IndicatorsValueService {
...
@@ -671,6 +671,7 @@ public class IndicatorsValueService {
resultMap
.
put
(
"value"
,
indicatorsData
.
get
(
0
).
getValue
());
resultMap
.
put
(
"value"
,
indicatorsData
.
get
(
0
).
getValue
());
resultMap
.
put
(
"unit"
,
indicatorsData
.
get
(
0
).
getUnit
());
resultMap
.
put
(
"unit"
,
indicatorsData
.
get
(
0
).
getUnit
());
resultMap
.
put
(
"dataType"
,
indicatorsData
.
get
(
0
).
getDataType
());
resultMap
.
put
(
"dataType"
,
indicatorsData
.
get
(
0
).
getDataType
());
resultMap
.
put
(
"compareObjDesc"
,
indicatorsData
.
get
(
0
).
getDim1Desc
());
//对标对象描述
return
resultMap
;
return
resultMap
;
}
}
return
null
;
return
null
;
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/ScoreRuleService.java
View file @
430419fd
...
@@ -122,6 +122,9 @@ public class ScoreRuleService {
...
@@ -122,6 +122,9 @@ public class ScoreRuleService {
List
<
String
>
values
=
new
ArrayList
<>();
List
<
String
>
values
=
new
ArrayList
<>();
List
<
String
>
improveValues
=
new
ArrayList
<>();
List
<
String
>
improveValues
=
new
ArrayList
<>();
if
(!
calResults
.
isEmpty
())
{
if
(!
calResults
.
isEmpty
())
{
//auth:zhangkb time:2020-7-15 desc:填充对标对象描述
objResult
.
setCompareObjDesc
(
calResults
.
get
(
0
).
getCompareObjDesc
());
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
for
(
DriveIndCalResultDef
calResult
:
calResults
)
{
//根据考核指标id获取考核指标
//根据考核指标id获取考核指标
DriveIndDef
driveIndDef
=
driveIndDefMapper
.
selectByPrimaryKey
(
calResult
.
getIndId
());
DriveIndDef
driveIndDef
=
driveIndDefMapper
.
selectByPrimaryKey
(
calResult
.
getIndId
());
...
@@ -188,6 +191,9 @@ public class ScoreRuleService {
...
@@ -188,6 +191,9 @@ public class ScoreRuleService {
DriveIndCalResultDef
calresultOp
=
driveIndCalResultDefMapper
.
DriveIndCalResultDef
calresultOp
=
driveIndCalResultDefMapper
.
findByIndIdAndDateAndCompareObj
(
indId
,
date
,
compareObj
);
findByIndIdAndDateAndCompareObj
(
indId
,
date
,
compareObj
);
if
(
calresultOp
!=
null
)
{
if
(
calresultOp
!=
null
)
{
//auth:zhangkb time:2020-7-15 desc:填充对标对象描述
objResult
.
setCompareObjDesc
(
calresultOp
.
getCompareObjDesc
());
//得分类型:0 指标值直接参与计算
//得分类型:0 指标值直接参与计算
if
(
"0"
.
equals
(
scoreRule
.
getScoreType
()))
{
if
(
"0"
.
equals
(
scoreRule
.
getScoreType
()))
{
if
(!
"NaN"
.
equals
(
calresultOp
.
getValue
())
&&
!
"Infinite"
.
equals
(
calresultOp
.
getValue
()))
{
if
(!
"NaN"
.
equals
(
calresultOp
.
getValue
())
&&
!
"Infinite"
.
equals
(
calresultOp
.
getValue
()))
{
...
@@ -257,6 +263,9 @@ public class ScoreRuleService {
...
@@ -257,6 +263,9 @@ public class ScoreRuleService {
double
scoreValue
=
0.0
;
double
scoreValue
=
0.0
;
double
improveValue
=
0.0
;
double
improveValue
=
0.0
;
if
(!
calResults
.
isEmpty
())
{
if
(!
calResults
.
isEmpty
())
{
//auth:zhangkb time:2020-7-15 desc:填充对标对象描述
objResult
.
setCompareObjDesc
(
calResults
.
get
(
0
).
getCompareObjDesc
());
if
(
StringUtils
.
isNotBlank
(
scoreRule
.
getIndTypeWeightsJson
()))
{
if
(
StringUtils
.
isNotBlank
(
scoreRule
.
getIndTypeWeightsJson
()))
{
List
<
IndTypeWeight
>
indTypeWeights
=
gson
.
List
<
IndTypeWeight
>
indTypeWeights
=
gson
.
fromJson
(
scoreRule
.
getIndTypeWeightsJson
(),
new
TypeToken
<
List
<
IndTypeWeight
>>(){}.
getType
());
fromJson
(
scoreRule
.
getIndTypeWeightsJson
(),
new
TypeToken
<
List
<
IndTypeWeight
>>(){}.
getType
());
...
...
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