Commit 430419fd by zhangkb

保存对标对象描述到库表中

parent e6fcee11
......@@ -157,7 +157,7 @@ public class DriveIndCalculateActor extends AbstractActor{
if(driveIndCalResult==null) {
driveIndCalResult = new DriveIndCalResultDef(compareId,
driveIndId,compareObj,date,driveIndValue,unit,
"1","1","admin",code);
"1","1","admin",code,indValueMsg.getCompareObjDesc());
}else {
driveIndCalResult.setValue(driveIndValue);
}
......@@ -177,7 +177,7 @@ public class DriveIndCalculateActor extends AbstractActor{
if(driveIndCalResult==null) {
driveIndCalResult = new DriveIndCalResultDef(compareId,
driveIndId,compareObj,date,"NaN",unit,
"1","0","admin",code);
"1","0","admin",code,indValueMsg.getCompareObjDesc());
}else {
driveIndCalResult.setValue("NaN");
}
......
......@@ -23,11 +23,12 @@ public class IndGetValueActor extends AbstractActor{
//返回指标值结果
getSender().tell(new IndValueMsg(indCalculateMsg.getIndId()
,indValueMap.get("value").toString()
,indCalculateMsg.getIndValueType(),1,""),getSelf());
,indCalculateMsg.getIndValueType(),
indValueMap.get("compareObjDesc").toString(),1,""),getSelf());
}else {
//返回指标值结果
getSender().tell(new IndValueMsg(indCalculateMsg.getIndId(),null
,indCalculateMsg.getIndValueType(),0,"无法获取指标id:"+
,indCalculateMsg.getIndValueType(),null,0,"无法获取指标id:"+
indCalculateMsg.getIndId()+";维度:"+
indCalculateMsg.getDimValue().get(0).getDimvalue()+","+
indCalculateMsg.getDimValue().get(1).getDimvalue()+" 的指标值"),getSelf());
......
......@@ -187,7 +187,7 @@ public class DriveIndIdObjCalActor extends AbstractActor{
if(driveIndCalResult==null) {
driveIndCalResult = new DriveIndCalResultDef(compareId,
driveIndId,compareObj,date,driveIndValue,unit,
"1","1","admin",code);
"1","1","admin",code,baseIndValueMsg.getCompareObjDesc());
}else {
driveIndCalResult.setCode(code);
driveIndCalResult.setUnit(unit);
......@@ -210,7 +210,7 @@ public class DriveIndIdObjCalActor extends AbstractActor{
if(driveIndCalResult==null) {
driveIndCalResult = new DriveIndCalResultDef(compareId,
driveIndId,compareObj,date,"NaN",unit,
"1","0","admin",code);
"1","0","admin",code,baseIndValueMsg.getCompareObjDesc());
}else {
driveIndCalResult.setCode(code);
driveIndCalResult.setUnit(unit);
......
......@@ -23,10 +23,11 @@ public class GetBaseIndValueActor extends AbstractActor{
if(indValueMap!=null) {
//返回指标值结果
getSender().tell(new BaseIndValueMsg(getBaseIndValueMsg.getIndId()
,indValueMap.get("value").toString(),1,""),getSelf());
,indValueMap.get("value").toString(),
indValueMap.get("compareObjDesc").toString(),1,""),getSelf());
}else {
//返回指标值结果
getSender().tell(new BaseIndValueMsg(getBaseIndValueMsg.getIndId(),null,
getSender().tell(new BaseIndValueMsg(getBaseIndValueMsg.getIndId(),null,null,
0,"无法获取指标id:"+
getBaseIndValueMsg.getIndId()+";维度:"+
getBaseIndValueMsg.getDimValue().get(0).getDimvalue()+","+
......
......@@ -14,15 +14,19 @@ public class IndValueMsg implements Serializable{
private String type;//指标值类型
private String compareObjDesc;
//是否完成标识:1.完成 0.未完成
private Integer isFinish;
//日志报告
private String confirmMessage;
public IndValueMsg(String indId,String value,String type,Integer isFinish,String confirmMessage) {
this.setIndId(indId);
public IndValueMsg(String indId,String value,String type,String compareObjDesc,
Integer isFinish,String confirmMessage) {
this.indId=indId;
this.value = value;
this.type = type;
this.setCompareObjDesc(compareObjDesc);
this.isFinish = isFinish;
this.confirmMessage = confirmMessage;
}
......@@ -66,4 +70,12 @@ public class IndValueMsg implements Serializable{
public void setIndId(String indId) {
this.indId = indId;
}
public String getCompareObjDesc() {
return compareObjDesc;
}
public void setCompareObjDesc(String compareObjDesc) {
this.compareObjDesc = compareObjDesc;
}
}
......@@ -12,14 +12,18 @@ public class BaseIndValueMsg implements Serializable{
private String value;//指标值
private String compareObjDesc;//对标对象描述
//是否完成标识:1.完成 0.未完成
private Integer isFinish;
//日志报告
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.value = value;
this.compareObjDesc = compareObjDesc;
this.isFinish = isFinish;
this.confirmMessage = confirmMessage;
}
......@@ -55,4 +59,12 @@ public class BaseIndValueMsg implements Serializable{
public void setConfirmMessage(String confirmMessage) {
this.confirmMessage = confirmMessage;
}
public String getCompareObjDesc() {
return compareObjDesc;
}
public void setCompareObjDesc(String compareObjDesc) {
this.compareObjDesc = compareObjDesc;
}
}
......@@ -24,6 +24,7 @@ public class DriveIndCalResultDef {
private String compareId;
private String indId;
private String compareObj;
private String compareObjDesc;
private Integer date;
private String value;
private String unit;
......@@ -43,7 +44,7 @@ public class DriveIndCalResultDef {
}
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.indId = indId;
this.compareObj = compareObj;
......@@ -54,5 +55,6 @@ public class DriveIndCalResultDef {
this.isRight = isRight;
this.lastUpdater = lastUpdater;
this.code = code;
this.compareObjDesc = compareObjDesc;
}
}
......@@ -19,6 +19,7 @@ public class ObjScoreCalResult {
private String compareId;//对标单元id
private String compareObj;//对标对象
private String compareObjDesc;//对标对象描述
private String indIds;//对标考核指标id
private Integer date;//对标日期
private String scoreValue;//考核对象得分
......
......@@ -671,6 +671,7 @@ public class IndicatorsValueService {
resultMap.put("value",indicatorsData.get(0).getValue());
resultMap.put("unit", indicatorsData.get(0).getUnit());
resultMap.put("dataType",indicatorsData.get(0).getDataType());
resultMap.put("compareObjDesc", indicatorsData.get(0).getDim1Desc());//对标对象描述
return resultMap;
}
return null;
......
......@@ -122,6 +122,9 @@ public class ScoreRuleService {
List<String> values = new ArrayList<>();
List<String> improveValues = new ArrayList<>();
if(!calResults.isEmpty()) {
//auth:zhangkb time:2020-7-15 desc:填充对标对象描述
objResult.setCompareObjDesc(calResults.get(0).getCompareObjDesc());
for(DriveIndCalResultDef calResult : calResults) {
//根据考核指标id获取考核指标
DriveIndDef driveIndDef = driveIndDefMapper.selectByPrimaryKey(calResult.getIndId());
......@@ -188,6 +191,9 @@ public class ScoreRuleService {
DriveIndCalResultDef calresultOp = driveIndCalResultDefMapper.
findByIndIdAndDateAndCompareObj(indId, date, compareObj);
if(calresultOp!=null) {
//auth:zhangkb time:2020-7-15 desc:填充对标对象描述
objResult.setCompareObjDesc(calresultOp.getCompareObjDesc());
//得分类型:0 指标值直接参与计算
if("0".equals(scoreRule.getScoreType())) {
if(!"NaN".equals(calresultOp.getValue()) && !"Infinite".equals(calresultOp.getValue())) {
......@@ -257,6 +263,9 @@ public class ScoreRuleService {
double scoreValue = 0.0;
double improveValue = 0.0;
if(!calResults.isEmpty()) {
//auth:zhangkb time:2020-7-15 desc:填充对标对象描述
objResult.setCompareObjDesc(calResults.get(0).getCompareObjDesc());
if(StringUtils.isNotBlank(scoreRule.getIndTypeWeightsJson())) {
List<IndTypeWeight> indTypeWeights = gson.
fromJson(scoreRule.getIndTypeWeightsJson(), new TypeToken<List<IndTypeWeight>>(){}.getType());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment