Commit 82229af3 by hzc

简化对标运算日志

parent 2e4a2e22
...@@ -164,6 +164,9 @@ public class BeforeCompareUnitCalActor extends AbstractActor{ ...@@ -164,6 +164,9 @@ public class BeforeCompareUnitCalActor extends AbstractActor{
if(compCalLog!=null) { if(compCalLog!=null) {
compCalLog.setEndTime(System.currentTimeMillis()+""); compCalLog.setEndTime(System.currentTimeMillis()+"");
compCalLog.setRunStatus("1"); compCalLog.setRunStatus("1");
if(compCalLog.getStatus()==1){
compCalLog.setLogInfo("运算成功");
}
compareUnitCalLogService.saveOrUndate(compCalLog); compareUnitCalLogService.saveOrUndate(compCalLog);
} }
LogManager.logInfo(Constants.LOG_INDICATOR_UNIT_CAL_API,"完成对标单元id:{},日期:{} 的试运行计算",compCalLogId,currentDate ); LogManager.logInfo(Constants.LOG_INDICATOR_UNIT_CAL_API,"完成对标单元id:{},日期:{} 的试运行计算",compCalLogId,currentDate );
......
...@@ -151,14 +151,15 @@ public class DriveIndIdObjCalActor extends AbstractActor{ ...@@ -151,14 +151,15 @@ public class DriveIndIdObjCalActor extends AbstractActor{
//日志填充 //日志填充
if(compCalLog!=null) { if(compCalLog!=null) {
String logInfo = compCalLog.getLogInfo(); // String logInfo = compCalLog.getLogInfo();
compCalLog.setStatus(0); // compCalLog.setStatus(0);
if(StringUtils.isNotBlank(logInfo)) { // if(StringUtils.isNotBlank(logInfo)) {
logInfo+=baseIndValueMsg.getConfirmMessage()+"</n>"; // logInfo+=baseIndValueMsg.getConfirmMessage()+"</n>";
compCalLog.setLogInfo(logInfo); // compCalLog.setLogInfo(logInfo);
}else { // }else {
compCalLog.setLogInfo(baseIndValueMsg.getConfirmMessage()+"</n>"); // compCalLog.setLogInfo(baseIndValueMsg.getConfirmMessage()+"</n>");
} // }
compCalLog.setLogInfo("运算失败:指标为空");
} }
logger.info("日志信息::{},日志id{}",baseIndValueMsg.getConfirmMessage(),compCalLogId); logger.info("日志信息::{},日志id{}",baseIndValueMsg.getConfirmMessage(),compCalLogId);
} }
...@@ -184,17 +185,18 @@ public class DriveIndIdObjCalActor extends AbstractActor{ ...@@ -184,17 +185,18 @@ public class DriveIndIdObjCalActor extends AbstractActor{
//运算失败 //运算失败
if(compCalLog!=null){ if(compCalLog!=null){
compCalLog.setStatus(0); compCalLog.setStatus(0);
String logInfo = compCalLog.getLogInfo(); //String logInfo = compCalLog.getLogInfo();
if(StringUtils.isNotBlank(logInfo)) { // if(StringUtils.isNotBlank(logInfo)) {
logInfo+="替换公式值出错:driveIndId:"+driveIndId+";"+ // logInfo+="替换公式值出错:driveIndId:"+driveIndId+";"+
"formula:"+driveIndFormula+";"+ // "formula:"+driveIndFormula+";"+
"errorValue:"+indValue+";"+"paramEnv:"+env+"</n>"; // "errorValue:"+indValue+";"+"paramEnv:"+env+"</n>";
compCalLog.setLogInfo(logInfo); // compCalLog.setLogInfo(logInfo);
}else { // }else {
compCalLog.setLogInfo("替换公式值出错:driveIndId:"+driveIndId+";"+ // compCalLog.setLogInfo("替换公式值出错:driveIndId:"+driveIndId+";"+
"formula:"+driveIndFormula+";"+ // "formula:"+driveIndFormula+";"+
"errorValue:"+indValue+";"+"paramEnv:"+env+"</n>"); // "errorValue:"+indValue+";"+"paramEnv:"+env+"</n>");
} // }
compCalLog.setLogInfo("运算公式出错");
//保存日志 //保存日志
compareUnitCalLogService.saveOrUndate(compCalLog); compareUnitCalLogService.saveOrUndate(compCalLog);
} }
...@@ -276,18 +278,20 @@ public class DriveIndIdObjCalActor extends AbstractActor{ ...@@ -276,18 +278,20 @@ public class DriveIndIdObjCalActor extends AbstractActor{
logger.error("driveIndId:"+driveIndId+";"+ logger.error("driveIndId:"+driveIndId+";"+
"paramEnv:"+env+";formula:"+driveIndFormula); "paramEnv:"+env+";formula:"+driveIndFormula);
//日志记录 //日志记录
String logInfo = compCalLog.getLogInfo(); // String logInfo = compCalLog.getLogInfo();
if(StringUtils.isNotBlank(logInfo)) { // if(StringUtils.isNotBlank(logInfo)) {
logInfo+="计算考核指标出错:driveIndId:"+driveIndId+";"+ // logInfo+="计算考核指标出错:driveIndId:"+driveIndId+";"+
"paramEnv:"+env+";formula:"+driveIndFormula+"</n>"; // "paramEnv:"+env+";formula:"+driveIndFormula+"</n>";
compCalLog.setLogInfo(logInfo); // compCalLog.setLogInfo(logInfo);
}else { // }else {
compCalLog.setLogInfo("计算考核指标出错:driveIndId:"+driveIndId+";"+ // compCalLog.setLogInfo("计算考核指标出错:driveIndId:"+driveIndId+";"+
"paramEnv:"+env+";formula:"+driveIndFormula+"</n>"); // "paramEnv:"+env+";formula:"+driveIndFormula+"</n>");
} // }
compCalLog.setStatus(0);
//保存日志 //保存日志
if(compCalLog!=null) { if(compCalLog!=null) {
compCalLog.setLogInfo("计算考核指标出错");
compCalLog.setStatus(0);
compareUnitCalLogService.saveOrUndate(compCalLog); compareUnitCalLogService.saveOrUndate(compCalLog);
} }
//表示计算错误,不生成考核结果 //表示计算错误,不生成考核结果
......
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