|
|
@@ -1906,19 +1906,19 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
StatisticsBean value = station.getValue();
|
|
|
// 设置总平均扣分
|
|
|
if (value.getCompany_check_num() > 0) {
|
|
|
- avg += value.getCompany_total_score() / value.getCompany_check_num()/4.0;
|
|
|
+ avg += value.getCompany_total_score() /4.0/ value.getCompany_check_num();
|
|
|
}
|
|
|
if (value.getThird_check_num() > 0) {
|
|
|
- avg += value.getThird_total_score() / value.getThird_check_num()/4.0;
|
|
|
+ avg += value.getThird_total_score() /4.0/ value.getThird_check_num();
|
|
|
}
|
|
|
if (value.getSpecial_check_num() > 0) {
|
|
|
- avg += value.getSpecial_total_score() / value.getSpecial_check_num()/4.0;
|
|
|
+ avg += value.getSpecial_total_score() /4.0/ value.getSpecial_check_num();
|
|
|
}
|
|
|
if (value.getOnsite_check_num() > 0) {
|
|
|
- avg += value.getOnsite_total_score() / value.getOnsite_check_num()/4.0;
|
|
|
+ avg += value.getOnsite_total_score() /4.0/ value.getOnsite_check_num();
|
|
|
}
|
|
|
if (value.getData_check_num() > 0) {
|
|
|
- avg += value.getData_total_score() / value.getData_check_num()/4.0;
|
|
|
+ avg += value.getData_total_score() / 4.0 / value.getData_check_num();
|
|
|
}
|
|
|
// value.setCheck_total_avg(df.format(avg / value.getPeople_num()));
|
|
|
value.setCheck_total_avg(df.format(avg ));
|
|
|
@@ -2108,27 +2108,32 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
}
|
|
|
|
|
|
List<StatisticsBo> lists = new ArrayList<>(statisticBoMap.values());
|
|
|
- // 进行排序
|
|
|
- lists.sort(new Comparator<StatisticsBo>() {
|
|
|
- @Override
|
|
|
- public int compare(StatisticsBo o1, StatisticsBo o2) {
|
|
|
- return o1.compareTo2(o2);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
for (int i = 0; i < lists.size(); i++) {
|
|
|
-
|
|
|
+
|
|
|
StatisticsBo statisticsBo = lists.get(i);
|
|
|
if (statisticsBo.getCheck_all_num()== 0) {
|
|
|
continue;
|
|
|
}
|
|
|
// 计算平均扣分
|
|
|
DecimalFormat df = new DecimalFormat(".##");
|
|
|
- double count = statisticsBo.getCheck_all_num();
|
|
|
- Double sc = (statisticsBo.getCheck_all_score()) * 1.00
|
|
|
- / (count == 0 ? 1 : count);
|
|
|
+ Integer count = statisticsBo.getChecked_num() ;
|
|
|
+// double count = statisticsBo.getCheck_all_num();
|
|
|
+// Double sc = (statisticsBo.getCheck_all_score()) * 1.00
|
|
|
+// / (count == 0 ? 1 : count);
|
|
|
+ Double sc = statisticsBo.getScore()/1.0 / (count == 0 ? 1 : count) +
|
|
|
+ statisticsBo.getCheck_t_score()/1.0/ ( statisticsBo.getCheck_t_num()==0?1:statisticsBo.getCheck_t_num() ) +
|
|
|
+ statisticsBo.getCheck_x_score()/1.0/ ( statisticsBo.getCheck_x_num()==0?1:statisticsBo.getCheck_x_num() ) +
|
|
|
+ statisticsBo.getCheck_s_score()/1.0/ ( statisticsBo.getCheck_s_num()==0?1:statisticsBo.getCheck_s_num() );
|
|
|
statisticsBo.setCheck_score_avg(sc == 0 ? "0" : df.format(sc));
|
|
|
}
|
|
|
+ // 进行排序
|
|
|
+ lists.sort(new Comparator<StatisticsBo>() {
|
|
|
+ @Override
|
|
|
+ public int compare(StatisticsBo o1, StatisticsBo o2) {
|
|
|
+ return o1.compareTo3(o2);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 这边进行赛选一下;
|
|
|
List<StatisticsBo> reList = new ArrayList<>();
|
|
|
for (int i = 0; i < lists.size(); i++) {
|