| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- package com.xintong.visualinspection.bean;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import lombok.Data;
- /**
- * 文件名:Job
- * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
- */
- @Data
- public class StatisticsBo {
- //编号
- private Integer id;
-
- private int checked_num = 0 ;
-
- private int checked_m_num = 0 ;
-
- private int check_all_m_score =0 ;
-
- private int check_all_score =0 ;
-
- private List<String> checked_socre_name = new ArrayList<>() ;
-
- private List<Integer> checked_score = new ArrayList<>() ;
-
- private User user;
-
- private List<Integer> emp_item_score = new ArrayList<>();
-
- private String check_score_avg;
-
- private String check_score;
-
- // 公司排名
- private Integer company_ranking;
- // 道管排名
- private Integer center_ranking;
-
- // 收费站排名
- private Integer fee_station_ranking;
-
- private int score = 0;
-
- private Integer check_t_num = 0;
-
- private Integer check_t_score = 0;
-
- private Integer check_x_num = 0;
-
- private Integer check_x_score = 0;
-
- private Integer check_s_num = 0;
-
- private Integer check_s_score = 0;
-
- private Integer check_all_num = 0;
-
- // 比较大小 1 小 , -1 大
- public int compareTo(StatisticsBo o2){
- double a = 1000.0 ,b=1000.0 ;
- int a_c = this.getChecked_num()+this.getChecked_m_num();
- int b_c = o2.getChecked_num()+o2.getChecked_m_num();
- if(a_c!=0 ){
- a = (this.getCheck_all_score()+this.getCheck_all_m_score()) / (a_c+0.00);
- }
- if(b_c!=0){
- b = (o2.getCheck_all_score()+o2.getCheck_all_m_score()) /(b_c+0.00);
- }
-
- if (a > b ) {
- return 1;
- } else if (a < b) {
- return -1;
- } else {
- if(a_c == 0 && b_c!=0 ){
- return -1 ;
- }else if(b_c ==0 && a_c != 0){
- return 1;
- }else{
- return 0;
- }
- }
- }
-
- public int compareTo2(StatisticsBo o2){
- double a = 1000.0 ,b=1000.0 ;
- int a_c = this.getCheck_all_num() ;
- int b_c = o2.getCheck_all_num();
- if(a_c!=0 ){
- a = (this.getCheck_all_score()) / (a_c+0.00);
- }
- if(b_c!=0){
- b = (o2.getCheck_all_score()) /(b_c+0.00);
- }
-
- if (a > b ) {
- return 1;
- } else if (a < b) {
- return -1;
- } else {
- if(a_c == 0 && b_c!=0 ){
- return -1 ;
- }else if(b_c ==0 && a_c != 0){
- return 1;
- }else{
- return 0;
- }
- }
- }
- }
|