StatisticsBo.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package com.xintong.visualinspection.bean;
  2. import java.util.ArrayList;
  3. import java.util.Date;
  4. import java.util.List;
  5. import lombok.Data;
  6. /**
  7. * 文件名:Job
  8. * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  9. */
  10. @Data
  11. public class StatisticsBo {
  12. //编号
  13. private Integer id;
  14. private int checked_num = 0 ;
  15. private int checked_m_num = 0 ;
  16. private int check_all_m_score =0 ;
  17. private int check_all_score =0 ;
  18. private List<String> checked_socre_name = new ArrayList<>() ;
  19. private List<Integer> checked_score = new ArrayList<>() ;
  20. private User user;
  21. private List<Integer> emp_item_score = new ArrayList<>();
  22. private String check_score_avg;
  23. private String check_score;
  24. // 公司排名
  25. private Integer company_ranking;
  26. // 道管排名
  27. private Integer center_ranking;
  28. // 收费站排名
  29. private Integer fee_station_ranking;
  30. // 比较大小 1 小 , -1 大
  31. public int compareTo(StatisticsBo o2){
  32. double a = 1000.0 ,b=1000.0 ;
  33. if((this.getChecked_num()+this.getChecked_m_num())!=0 ){
  34. a = (this.getCheck_all_score()+this.getCheck_all_m_score()) / (this.getChecked_num()+this.getChecked_m_num()+0.00);
  35. }
  36. if((o2.getChecked_num()+o2.getChecked_m_num())!=0){
  37. b = (o2.getCheck_all_score()+o2.getCheck_all_m_score()) /(o2.getChecked_num()+o2.getChecked_m_num()+0.00);
  38. }
  39. if (a > b ) {
  40. return 1;
  41. } else if (a < b) {
  42. return -1;
  43. } else {
  44. return 0;
  45. }
  46. }
  47. }