Browse Source

修改等级评估不生成问题

xieshengjie 3 years ago
parent
commit
f5de864976

+ 3 - 3
gradeevaluation/src/main/java/com/gyee/gradeevaluation/service/gradeevaluation/QuartService.java

@@ -165,7 +165,7 @@ public class QuartService {
                 dayw.setDayqrfs(inputMap.get(wt.getId()).getInputsmall());
                 dayw.setDayedfs((double)RandomUtil.getRandomForIntegerBounded(11,15));
                 dayw.setDaydfqcfs(inputMap.get(wt.getId()).getOutputbig());
-                dayw.setQxpcl(curMap.get(wt.getId()).getDeviationrate2());
+                dayw.setQxpcl(curMap.get(wt.getId())!=null?curMap.get(wt.getId()).getDeviationrate2():0);
                 dayw.setDfpcl((double)RandomUtil.getRandomForIntegerBounded(-15,15));
                 Wtmttrandmtbfday wtmttrandmtbfday = mttrmtbfMap.get(wt.getId());
                 dayw.setPjgzjgsj(wtmttrandmtbfday.getStoprtimes()!=0?24/wtmttrandmtbfday.getStoprtimes():0);   //mtbf
@@ -204,7 +204,7 @@ public class QuartService {
                 monthw.setDayqrfs(inputMap.get(wt.getId()).getMonthinputsmall());
                 monthw.setDayedfs((double)RandomUtil.getRandomForIntegerBounded(11,15));
                 monthw.setDaydfqcfs(inputMap.get(wt.getId()).getMonthoutputbig());
-                monthw.setQxpcl(curmonthMap.get(wt.getId()).getDeviationrate2());
+                monthw.setQxpcl(curmonthMap.get(wt.getId())!=null?curmonthMap.get(wt.getId()).getDeviationrate2():0);
                 monthw.setDfpcl((double)RandomUtil.getRandomForIntegerBounded(-15,15));
                 Wtmttrandmtbfmonth wtmttrandmtbfmonth = mttrmtbfmonthMap.get(wt.getId());
                 monthw.setPjgzjgsj(wtmttrandmtbfmonth.getStoprtimes()!=0?24/wtmttrandmtbfmonth.getStoprtimes():0);   //mtbf
@@ -244,7 +244,7 @@ public class QuartService {
                 yearw.setDayqrfs(inputMap.get(wt.getId()).getYearinputsmall());
                 yearw.setDayedfs((double)RandomUtil.getRandomForIntegerBounded(11,15));
                 yearw.setDaydfqcfs(inputMap.get(wt.getId()).getYearoutputbig());
-                yearw.setQxpcl(curmonthMap.get(wt.getId()).getDeviationrate2());  //因没有年曲线偏差率,暂时取月的
+                yearw.setQxpcl(curmonthMap.get(wt.getId())!=null?curmonthMap.get(wt.getId()).getDeviationrate2():0);  //因没有年曲线偏差率,暂时取月的
                 yearw.setDfpcl((double)RandomUtil.getRandomForIntegerBounded(-15,15));
                 Wtmttrandmtbfyear wtmttrandmtbfyear = mttrmtbfyearMap.get(wt.getId());
                 yearw.setPjgzjgsj(wtmttrandmtbfyear.getStoprtimes()!=0?24/wtmttrandmtbfyear.getStoprtimes():0);   //mtbf