|
@@ -144,7 +144,7 @@ public class HealthJudgeService {
|
|
|
|
|
|
// 出现故障状态,直接降到10分 差
|
|
// 出现故障状态,直接降到10分 差
|
|
if (fjzt ==StatusDetailValue.GZ.getCode() || fjzt ==StatusDetailValue.JX.getCode()) {
|
|
if (fjzt ==StatusDetailValue.GZ.getCode() || fjzt ==StatusDetailValue.JX.getCode()) {
|
|
- score = 10.0;
|
|
|
|
|
|
+ score = 9.0;
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
} else {
|
|
} else {
|
|
statejudgment.append("0-");
|
|
statejudgment.append("0-");
|
|
@@ -152,11 +152,11 @@ public class HealthJudgeService {
|
|
|
|
|
|
if(clxzt==4 || fdjzt==4 || bjzt==4 || zkzt==4)
|
|
if(clxzt==4 || fdjzt==4 || bjzt==4 || zkzt==4)
|
|
{
|
|
{
|
|
- score = setScoreValue(score);
|
|
|
|
|
|
+ score = score=setScoreValue(score);
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
}else if(clxzt==3 || fdjzt==3 || bjzt==3 || zkzt==3)
|
|
}else if(clxzt==3 || fdjzt==3 || bjzt==3 || zkzt==3)
|
|
{
|
|
{
|
|
- score = setScoreValue(score);
|
|
|
|
|
|
+ score = score=setScoreValue(score);
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
}else {
|
|
}else {
|
|
statejudgment.append("0-");
|
|
statejudgment.append("0-");
|
|
@@ -168,7 +168,7 @@ public class HealthJudgeService {
|
|
if (xnmap.containsKey(wt.getId())) {
|
|
if (xnmap.containsKey(wt.getId())) {
|
|
double djpgscore = xnmap.get(wt.getId());
|
|
double djpgscore = xnmap.get(wt.getId());
|
|
if (djpgscore < 60) {
|
|
if (djpgscore < 60) {
|
|
- setScoreValue(score);
|
|
|
|
|
|
+ score=setScoreValue(score);
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
}else {
|
|
}else {
|
|
statejudgment.append("0-");
|
|
statejudgment.append("0-");
|
|
@@ -192,7 +192,7 @@ public class HealthJudgeService {
|
|
double xfqrqc =xfpdmap.get(wt.getId());
|
|
double xfqrqc =xfpdmap.get(wt.getId());
|
|
//小风曲线偏差
|
|
//小风曲线偏差
|
|
if (xfqrqc > 5) {
|
|
if (xfqrqc > 5) {
|
|
- setScoreValue(score);
|
|
|
|
|
|
+ score=setScoreValue(score);
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
} else {
|
|
} else {
|
|
statejudgment.append("0-");
|
|
statejudgment.append("0-");
|
|
@@ -211,7 +211,7 @@ public class HealthJudgeService {
|
|
double zcclqc =clpdmap.get(wt.getId());
|
|
double zcclqc =clpdmap.get(wt.getId());
|
|
//正常出力曲线偏差
|
|
//正常出力曲线偏差
|
|
if (zcclqc > 5) {
|
|
if (zcclqc > 5) {
|
|
- setScoreValue(score);
|
|
|
|
|
|
+ score=setScoreValue(score);
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
} else {
|
|
} else {
|
|
statejudgment.append("0-");
|
|
statejudgment.append("0-");
|
|
@@ -230,7 +230,7 @@ public class HealthJudgeService {
|
|
double dfqrqc =dfpdmap.get(wt.getId());
|
|
double dfqrqc =dfpdmap.get(wt.getId());
|
|
//大风曲线偏差
|
|
//大风曲线偏差
|
|
if (dfqrqc > 5) {
|
|
if (dfqrqc > 5) {
|
|
- setScoreValue(score);
|
|
|
|
|
|
+ score=setScoreValue(score);
|
|
statejudgment.append("1-");
|
|
statejudgment.append("1-");
|
|
} else {
|
|
} else {
|
|
statejudgment.append("0-");
|
|
statejudgment.append("0-");
|
|
@@ -240,6 +240,7 @@ public class HealthJudgeService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
po.setStateJudgment(String.valueOf(statejudgment.substring(0, statejudgment.length() - 1)));
|
|
po.setStateJudgment(String.valueOf(statejudgment.substring(0, statejudgment.length() - 1)));
|
|
|
|
|
|
pols.add(po);
|
|
pols.add(po);
|
|
@@ -264,12 +265,16 @@ public class HealthJudgeService {
|
|
}
|
|
}
|
|
|
|
|
|
private double setScoreValue(double score) {
|
|
private double setScoreValue(double score) {
|
|
- if (score >= 60) {
|
|
|
|
- score = score - 20.0;
|
|
|
|
|
|
+ if (score >= 90) {
|
|
|
|
+ score = score - 12.0;
|
|
|
|
+ } else if (score < 90 && score >= 60) {
|
|
|
|
+ score = score -9;
|
|
} else if (score < 60 && score >= 30) {
|
|
} else if (score < 60 && score >= 30) {
|
|
- score = score -10;
|
|
|
|
|
|
+ score = score -6;
|
|
|
|
+ } else if (score < 30 && score >= 10) {
|
|
|
|
+ score = score -3;
|
|
} else {
|
|
} else {
|
|
- score = 10.0;
|
|
|
|
|
|
+ score = 9.0;
|
|
}
|
|
}
|
|
return score;
|
|
return score;
|
|
}
|
|
}
|
|
@@ -400,106 +405,91 @@ public class HealthJudgeService {
|
|
|
|
|
|
}
|
|
}
|
|
if (polist != null && polist.size() > 0) {
|
|
if (polist != null && polist.size() > 0) {
|
|
- for (ProEconHealthSystem hs : hsls) {
|
|
|
|
- List<ProEconStateJudgmentDay> rlist = new ArrayList<>();
|
|
|
|
- for (ProEconStateJudgmentDay po : polist) {
|
|
|
|
- if (hs.getModelId().equals(CacheContext.wtmap.get(po.getWtId()).getModelId()) && hs.getWpId().equals(po.getWpId())) {
|
|
|
|
- rlist.add(po);
|
|
|
|
-
|
|
|
|
|
|
+ Collections.sort(polist, new Comparator<ProEconStateJudgmentDay>() {
|
|
|
|
+ @Override
|
|
|
|
+ public int compare(ProEconStateJudgmentDay o1, ProEconStateJudgmentDay o2) {
|
|
|
|
+ // 从小到大
|
|
|
|
+ return o1.getScore().compareTo(o2.getScore());
|
|
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
- if (rlist != null && rlist.size() > 0) {
|
|
|
|
- Collections.sort(rlist, new Comparator<ProEconStateJudgmentDay>() {
|
|
|
|
- @Override
|
|
|
|
- public int compare(ProEconStateJudgmentDay o1, ProEconStateJudgmentDay o2) {
|
|
|
|
- // 从小到大
|
|
|
|
- return o1.getScore().compareTo(o2.getScore());
|
|
|
|
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
|
|
+ });
|
|
|
|
|
|
- for (int i = 0; i < rlist.size(); i++) {
|
|
|
|
- ProEconStateJudgmentDay po = rlist.get(i);
|
|
|
|
- Boolean isHave = false;
|
|
|
|
|
|
+ for (int i = 0; i < polist.size(); i++) {
|
|
|
|
+ ProEconStateJudgmentDay po = polist.get(i);
|
|
|
|
+ Boolean isHave = false;
|
|
|
|
|
|
// Boolean isHave = wobugeqsService
|
|
// Boolean isHave = wobugeqsService
|
|
// .isQueryThreeDayWobugeqs(po.getWtId());
|
|
// .isQueryThreeDayWobugeqs(po.getWtId());
|
|
- List<String> parts = relevancePartTopThree(CacheContext.wtmap.get(po.getWtId()));
|
|
|
|
- int size = parts.size();
|
|
|
|
- if (size > 0) {
|
|
|
|
- if (size == 3) {
|
|
|
|
- if (parts.get(0) != null) {
|
|
|
|
- po.setTop1(parts.get(0));
|
|
|
|
- } else {
|
|
|
|
- po.setTop1(null);
|
|
|
|
- }
|
|
|
|
- if (parts.get(1) != null) {
|
|
|
|
- po.setTop2(parts.get(1));
|
|
|
|
- } else {
|
|
|
|
- po.setTop2(null);
|
|
|
|
- }
|
|
|
|
- if (parts.get(2) != null) {
|
|
|
|
- po.setTop3(parts.get(2));
|
|
|
|
- } else {
|
|
|
|
- po.setTop3(null);
|
|
|
|
- }
|
|
|
|
- } else if (size == 2) {
|
|
|
|
- if (parts.get(0) != null) {
|
|
|
|
- po.setTop1(parts.get(0));
|
|
|
|
- } else {
|
|
|
|
- po.setTop1(null);
|
|
|
|
- }
|
|
|
|
- if (parts.get(1) != null) {
|
|
|
|
- po.setTop2(parts.get(1));
|
|
|
|
- } else {
|
|
|
|
- po.setTop2(null);
|
|
|
|
- }
|
|
|
|
- po.setTop3(null);
|
|
|
|
- } else if (size == 1) {
|
|
|
|
- if (parts.get(0) != null) {
|
|
|
|
- po.setTop1(parts.get(0));
|
|
|
|
- } else {
|
|
|
|
- po.setTop1(null);
|
|
|
|
- }
|
|
|
|
- po.setTop2(null);
|
|
|
|
- po.setTop3(null);
|
|
|
|
- }
|
|
|
|
|
|
+ List<String> parts = relevancePartTopThree(CacheContext.wtmap.get(po.getWtId()));
|
|
|
|
+ int size = parts.size();
|
|
|
|
+ if (size > 0) {
|
|
|
|
+ if (size == 3) {
|
|
|
|
+ if (parts.get(0) != null) {
|
|
|
|
+ po.setTop1(parts.get(0));
|
|
|
|
+ } else {
|
|
|
|
+ po.setTop1(null);
|
|
}
|
|
}
|
|
- if (isHave == true) {
|
|
|
|
- po.setJudgmentDescribe("此风机近期有故障记录,故不在推荐范围之内!");
|
|
|
|
- } else if (po.getScore() <= judgescore) {
|
|
|
|
-
|
|
|
|
- if (maps.containsKey(po.getWpId())) {
|
|
|
|
- int temp = maps.get(po.getWpId()) + 1;
|
|
|
|
- if (temp > 2) {
|
|
|
|
- po.setJudgmentDescribe("设备健康情况不良,但推荐等级偏低,还需继续观察!");
|
|
|
|
- } else {
|
|
|
|
- po.setJudgmentDescribe("健康报告达到推荐级别,推荐检修!");
|
|
|
|
- }
|
|
|
|
- maps.put(po.getWpId(), temp);
|
|
|
|
- } else {
|
|
|
|
- po.setJudgmentDescribe("健康报告达到推荐级别,推荐检修!");
|
|
|
|
- maps.put(po.getWpId(), 1);
|
|
|
|
- }
|
|
|
|
- //po.setJudgmentDescribe("健康报告达到推荐级别,推荐检修!");
|
|
|
|
|
|
+ if (parts.get(1) != null) {
|
|
|
|
+ po.setTop2(parts.get(1));
|
|
} else {
|
|
} else {
|
|
- po.setJudgmentDescribe("健康指标未达到推荐级别,不予推荐!");
|
|
|
|
|
|
+ po.setTop2(null);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- // proEconStateJudgmentDayService.save(po);
|
|
|
|
|
|
+ if (parts.get(2) != null) {
|
|
|
|
+ po.setTop3(parts.get(2));
|
|
|
|
+ } else {
|
|
|
|
+ po.setTop3(null);
|
|
|
|
+ }
|
|
|
|
+ } else if (size == 2) {
|
|
|
|
+ if (parts.get(0) != null) {
|
|
|
|
+ po.setTop1(parts.get(0));
|
|
|
|
+ } else {
|
|
|
|
+ po.setTop1(null);
|
|
|
|
+ }
|
|
|
|
+ if (parts.get(1) != null) {
|
|
|
|
+ po.setTop2(parts.get(1));
|
|
|
|
+ } else {
|
|
|
|
+ po.setTop2(null);
|
|
|
|
+ }
|
|
|
|
+ po.setTop3(null);
|
|
|
|
+ } else if (size == 1) {
|
|
|
|
+ if (parts.get(0) != null) {
|
|
|
|
+ po.setTop1(parts.get(0));
|
|
|
|
+ } else {
|
|
|
|
+ po.setTop1(null);
|
|
|
|
+ }
|
|
|
|
+ po.setTop2(null);
|
|
|
|
+ po.setTop3(null);
|
|
}
|
|
}
|
|
-
|
|
|
|
- proEconStateJudgmentDayService.saveOrUpdateBatch(rlist);
|
|
|
|
|
|
+ }
|
|
|
|
+ if (isHave == true) {
|
|
|
|
+ po.setJudgmentDescribe("此风机近期有故障记录,故不在推荐范围之内!");
|
|
|
|
+ } else if (po.getScore() <= judgescore) {
|
|
|
|
+
|
|
|
|
+ if (maps.containsKey(po.getWpId())) {
|
|
|
|
+ int temp = maps.get(po.getWpId()) + 1;
|
|
|
|
+ if (temp > 2) {
|
|
|
|
+ po.setJudgmentDescribe("设备健康情况不良,但推荐等级偏低,还需继续观察!");
|
|
|
|
+ } else {
|
|
|
|
+ po.setJudgmentDescribe("健康报告达到推荐级别,推荐检修!");
|
|
|
|
+ }
|
|
|
|
+ maps.put(po.getWpId(), temp);
|
|
|
|
+ } else {
|
|
|
|
+ po.setJudgmentDescribe("健康报告达到推荐级别,推荐检修!");
|
|
|
|
+ maps.put(po.getWpId(), 1);
|
|
|
|
+ }
|
|
|
|
+ //po.setJudgmentDescribe("健康报告达到推荐级别,推荐检修!");
|
|
|
|
+ } else {
|
|
|
|
+ po.setJudgmentDescribe("健康指标未达到推荐级别,不予推荐!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ // proEconStateJudgmentDayService.save(po);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ proEconStateJudgmentDayService.saveOrUpdateBatch(polist);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|