|
@@ -556,10 +556,10 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
|
|
|
}
|
|
|
//构造实体对象
|
|
|
MonitorIndicatorRecord monitorIndicatorRecord = new MonitorIndicatorRecord();
|
|
|
+ monitorIndicatorRecord.setProject(projectId);
|
|
|
+ monitorIndicatorRecord.setObjId(objId);
|
|
|
monitorIndicatorRecord.setMonitorIndicatorId(saveIndicatorType.getCode());
|
|
|
monitorIndicatorRecord.setDataTime(start);
|
|
|
- monitorIndicatorRecord.setObjId(objId);
|
|
|
- monitorIndicatorRecord.setProject(projectId);
|
|
|
monitorIndicatorRecord.setDataValue(Double.valueOf(dayNum));
|
|
|
monitorIndicatorRecordService.saveOrUpdateByPk(monitorIndicatorRecord);
|
|
|
}
|
|
@@ -590,6 +590,7 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
|
|
|
checkDate = record.getDataTime();
|
|
|
}
|
|
|
//继续往前找报警开始日期
|
|
|
+ checkDate = com.persagy.apm.diagnose.utils.DateUtils.addDays(checkDate,-1);
|
|
|
return getStartAlarmDate(checkDate, projectId, objId, indicatorId, operator, tempFormula);
|
|
|
}
|
|
|
return alarmDate;
|
|
@@ -600,29 +601,16 @@ public class ProjectDataRecordServiceImpl implements IProjectDataRecordService {
|
|
|
*/
|
|
|
public boolean isAccordWith(String operator, Double limitVal, Double checkVal) {
|
|
|
if (!StringUtils.isBlank(operator) && null != limitVal && null != checkVal) {
|
|
|
- switch (operator) {
|
|
|
- case "≥":
|
|
|
- if (checkVal >= limitVal) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- case ">":
|
|
|
- if (checkVal > limitVal) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- case "≤":
|
|
|
- if (checkVal <= limitVal) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- case "<":
|
|
|
- if (checkVal < limitVal) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- case "=":
|
|
|
- if (checkVal == limitVal) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- default:
|
|
|
- return false;
|
|
|
+ if ("≥".equals(operator) && checkVal >= limitVal){
|
|
|
+ return true;
|
|
|
+ }else if (">".equals(operator) && checkVal > limitVal){
|
|
|
+ return true;
|
|
|
+ }else if ("≤".equals(operator) && checkVal <= limitVal){
|
|
|
+ return true;
|
|
|
+ }else if ("<".equals(operator) && checkVal < limitVal){
|
|
|
+ return true;
|
|
|
+ }else if ("=".equals(operator) && checkVal == limitVal){
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
return false;
|