StatisticsBo.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. private int score = 0;
  31. private Integer check_t_num = 0;
  32. private Integer check_t_score = 0;
  33. private Integer check_x_num = 0;
  34. private Integer check_x_score = 0;
  35. private Integer check_s_num = 0;
  36. private Integer check_s_score = 0;
  37. private Integer check_all_num = 0;
  38. // 比较大小 1 小 , -1 大
  39. public int compareTo(StatisticsBo o2){
  40. double a = 1000.0 ,b=1000.0 ;
  41. int a_c = this.getChecked_num()+this.getChecked_m_num();
  42. int b_c = o2.getChecked_num()+o2.getChecked_m_num();
  43. if(a_c!=0 ){
  44. a = (this.getCheck_all_score()+this.getCheck_all_m_score()) / (a_c+0.00);
  45. }
  46. if(b_c!=0){
  47. b = (o2.getCheck_all_score()+o2.getCheck_all_m_score()) /(b_c+0.00);
  48. }
  49. if (a > b ) {
  50. return 1;
  51. } else if (a < b) {
  52. return -1;
  53. } else {
  54. if(a_c == 0 && b_c!=0 ){
  55. return -1 ;
  56. }else if(b_c ==0 && a_c != 0){
  57. return 1;
  58. }else{
  59. return 0;
  60. }
  61. }
  62. }
  63. public int compareTo2(StatisticsBo o2){
  64. double a = 1000.0 ,b=1000.0 ;
  65. int a_c = this.getCheck_all_num() ;
  66. int b_c = o2.getCheck_all_num();
  67. if(a_c!=0 ){
  68. a = (this.getCheck_all_score()) / (a_c+0.00);
  69. }
  70. if(b_c!=0){
  71. b = (o2.getCheck_all_score()) /(b_c+0.00);
  72. }
  73. if (a > b ) {
  74. return 1;
  75. } else if (a < b) {
  76. return -1;
  77. } else {
  78. if(a_c == 0 && b_c!=0 ){
  79. return -1 ;
  80. }else if(b_c ==0 && a_c != 0){
  81. return 1;
  82. }else{
  83. return 0;
  84. }
  85. }
  86. }
  87. }