|
@@ -31,8 +31,7 @@ public class HealthSubService {
|
|
// private Monthlygradeassessmentmain2Service monthlygradeassessmentmain2Service;
|
|
// private Monthlygradeassessmentmain2Service monthlygradeassessmentmain2Service;
|
|
@Resource
|
|
@Resource
|
|
private ShutdowneventService shutdowneventService;
|
|
private ShutdowneventService shutdowneventService;
|
|
- @Resource
|
|
|
|
- private StatejudgmentrecordService statejudgmentrecordService;
|
|
|
|
|
|
+
|
|
@Resource
|
|
@Resource
|
|
private CurvefittingsubService curvefittingsubService;
|
|
private CurvefittingsubService curvefittingsubService;
|
|
@Resource
|
|
@Resource
|
|
@@ -98,11 +97,37 @@ public class HealthSubService {
|
|
|
|
|
|
private double getWtScore(String wtId) throws Exception {
|
|
private double getWtScore(String wtId) throws Exception {
|
|
|
|
|
|
- double score = 0.0;
|
|
|
|
|
|
+ double score = 100.0;
|
|
if (StringUtils.notEmp(wtId)) {
|
|
if (StringUtils.notEmp(wtId)) {
|
|
- String pointid = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJJKZZ).getCode();
|
|
|
|
- PointData po = realApiUtil.getRealData(pointid);
|
|
|
|
- score = po.getPointValueInDouble();
|
|
|
|
|
|
+
|
|
|
|
+ List<Statejudgmentrecord2> ls = statejudgmentrecord2Service.findStatejudgmentrecord2(wtId);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Windturbinetestingpointnew ai = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJZT);
|
|
|
|
+ PointData point=realApiUtil.getRealData(ai);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(StringUtils.notEmp(ls) && !ls.isEmpty() && StringUtils.notEmp(ls.get(0).getScore()))
|
|
|
|
+ {
|
|
|
|
+ score=ls.get(0).getScore();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(StringUtils.notEmp(point))
|
|
|
|
+ {
|
|
|
|
+ if(point.getPointValueInDouble()==2)
|
|
|
|
+ {
|
|
|
|
+ score=score-50;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(score<0)
|
|
|
|
+ {
|
|
|
|
+ score=0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+// String pointid = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJJKZZ).getCode();
|
|
|
|
+// PointData po = realApiUtil.getRealData(pointid);
|
|
|
|
+// score = po.getPointValueInDouble();
|
|
|
|
|
|
}
|
|
}
|
|
return score;
|
|
return score;
|
|
@@ -433,12 +458,10 @@ public class HealthSubService {
|
|
List<XnfxVo> ls = new ArrayList<XnfxVo>();
|
|
List<XnfxVo> ls = new ArrayList<XnfxVo>();
|
|
|
|
|
|
|
|
|
|
- cal.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
|
- cal.set(Calendar.MINUTE, 0);
|
|
|
|
- cal.set(Calendar.SECOND, 0);
|
|
|
|
- Date beginDate = cal.getTime();
|
|
|
|
- cal.add(Calendar.DAY_OF_MONTH, 1);
|
|
|
|
- Date endDate= cal.getTime();
|
|
|
|
|
|
+
|
|
|
|
+ Date endDate = cal.getTime();
|
|
|
|
+ cal.add(Calendar.DAY_OF_MONTH, -1);
|
|
|
|
+ Date beginDate= cal.getTime();
|
|
|
|
|
|
List<Windturbineinfodaytop2> day1ls = windturbineinfodaytop2Service.gaDaytopList(wtId, beginDate, endDate);
|
|
List<Windturbineinfodaytop2> day1ls = windturbineinfodaytop2Service.gaDaytopList(wtId, beginDate, endDate);
|
|
if (!day1ls.isEmpty()) {
|
|
if (!day1ls.isEmpty()) {
|
|
@@ -509,34 +532,31 @@ public class HealthSubService {
|
|
if (StringUtils.notEmp(wtId)) {
|
|
if (StringUtils.notEmp(wtId)) {
|
|
|
|
|
|
|
|
|
|
- List<Statejudgmentrecord> ls = statejudgmentrecordService.getStatejudgmentrecordListBywtId(wtId);
|
|
|
|
|
|
+ List<Statejudgmentrecord2> ls = statejudgmentrecord2Service.findStatejudgmentrecord2(wtId);
|
|
|
|
|
|
|
|
|
|
- if (!ls.isEmpty()) {
|
|
|
|
- String[] str = ls.get(0).getStatejudgment().split("-");
|
|
|
|
- if (str.length == 4) {
|
|
|
|
- ValueVo vo1 = new ValueVo();
|
|
|
|
- ValueVo vo2 = new ValueVo();
|
|
|
|
- ValueVo vo3 = new ValueVo();
|
|
|
|
- ValueVo vo4 = new ValueVo();
|
|
|
|
-
|
|
|
|
|
|
+ Windturbinetestingpointnew ai = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FJZT);
|
|
|
|
+ PointData point=realApiUtil.getRealData(ai);
|
|
|
|
|
|
|
|
+ if(StringUtils.notEmp(point))
|
|
|
|
+ {
|
|
|
|
+ if(point.getPointValueInDouble()==2)
|
|
|
|
+ {
|
|
|
|
+ ValueVo vo1 = new ValueVo();
|
|
vo1.setName("运行状态为故障!");
|
|
vo1.setName("运行状态为故障!");
|
|
- vo2.setName("风机部件温度超出合理值范围!");
|
|
|
|
- vo3.setName("性能损失率连续三天大于基准值");
|
|
|
|
- vo4.setName("曲线偏差率率连续三天大于基准值");
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- setScoreValue(str[0], vo1);
|
|
|
|
- setScoreValue(str[1], vo2);
|
|
|
|
- setScoreValue(str[2], vo3);
|
|
|
|
- setScoreValue(str[3], vo4);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- vols.add(vo1);
|
|
|
|
- vols.add(vo2);
|
|
|
|
- vols.add(vo3);
|
|
|
|
- vols.add(vo4);
|
|
|
|
|
|
+ vo1.setValue("进行扣分处理!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!ls.isEmpty()) {
|
|
|
|
+ String[] str = ls.get(0).getStatejudgment().split(",");
|
|
|
|
+ if (str.length>0) {
|
|
|
|
+ for(int i=0;i<str.length;i++)
|
|
|
|
+ {
|
|
|
|
+ ValueVo vo1 = new ValueVo();
|
|
|
|
+ vo1.setName(str[i]);
|
|
|
|
+ vo1.setValue("进行扣分处理!");
|
|
|
|
+ vols.add(vo1);
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|