| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- package com.xintong.visualinspection.bean;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import org.springframework.format.annotation.DateTimeFormat;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import lombok.Data;
- /**
- * 文件名:Job
- * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
- */
- @Data
- public class StatisticsBean {
- //编号
- private Integer id;
-
- // 父部门id
- private Long parent_dept_id ;
-
- // 部门id
- private Long dept_id;
-
- //开始日期
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
- private Date start_date ;
-
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
- private Date end_date ;
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
- @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
- private Date update_time ;
- private Long task_id;
- private Long user_id ;
-
- private String name ;
-
- private String parent_name ;
-
- private int score;
-
- private Integer item_id ;
- private int checked_num;
-
- private int checked_people_num ;
-
- private int people_num;
-
- private int score_fifteen;
-
- private int score_fifty;
-
- private int score_over_fifty ;
-
- private int all_check_score ;
-
- // 满分
- private int check_no_score ;
-
- // 平均得分
- private String score_avg ;
-
- // 平均人均扣分
- private float check_score_avg;
-
- private List<String> checked_socre_name = new ArrayList<>() ;
-
- private List<Integer> checked_score = new ArrayList<>() ;
-
- private List<Integer> seq_checked_score = new ArrayList<>() ;
-
- private List<Organ> dept_list ;
- private List<Integer> checked_score_ids = new ArrayList<>() ;
-
-
- private String start_score;
- private String end_score;
-
- // 查询标记
- private Integer queryType ;
-
- // 月份
- private String mth ;
-
- // 上月
- private String prev_mth ;
-
- // 收费站名称
- private String feeStationName ;
- private String pfeeStationName ;
-
- private User user;
-
- //
- private Integer order_type ;
-
- // 排名
- private Integer ranking ;
-
- // 排名变化
- private Integer ranking_change;
-
- // 照片
- private String pics ;
-
- // 稽查人员id
- private Integer checkman_id ;
-
- private String checkman_name ;
-
- // 被考核人的姓名
- private String checked_name ;
-
-
- private String check_task_name ;
-
- private String check_task_time_name ;
-
- private List<Integer> position_ids;
-
- private Integer score_flag ;
-
- // 其他稽查不同类型
- private Integer check_type;
- // 扣分合计
- private Integer check_total_score = 0;
- // 公司受检次数
- private Integer company_check_num = 0;
- // 公司扣分合计
- private Integer company_total_score= 0;
- // 第三方暗访受检次数
- private Integer third_check_num = 0;
- // 第三方暗访扣分合计
- private Integer third_total_score = 0;
- // 特情受检次数
- private Integer special_check_num = 0;
- // 特情访扣分合计
- private Integer special_total_score = 0;
- // 现场受检次数
- private Integer onsite_check_num = 0;
- // 现场扣分合计
- private Integer onsite_total_score = 0;
- // 数据平台受检次数
- private Integer data_check_num = 0;
- // 数据平台扣分合计
- private Integer data_total_score = 0;
- // 总平均扣分
- private String check_total_avg = "0";
- // 公司排名
- private Integer company_ranking2;
- // 道管排名
- private Integer fee_station_ranking2;
-
- 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;
-
- private Integer check_all_score = 0;
-
- // 比较大小 1 小 , -1 大
- public int compareTo(StatisticsBean o2){
- if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){
- double a = this.getAll_check_score() / (this.getChecked_num()+0.00) /*/ this.getPeople_num()*/;
- double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00) /*/ o2.getPeople_num()*/;
- if (a > b ) {
- return 1;
- } else if (a < b) {
- return -1;
- } else {
- return 0;
- }
- }else{
- if(this.getChecked_num() == 0 && o2.getChecked_num()!=0 ){
- return -1 ;
- }else if(o2.getChecked_num() ==0 && this.getChecked_num() != 0){
- return 1;
- }else{
- return 0;
- }
- }
- }
-
- // 比较大小 1 小 , -1 大
- // 方法2
- public int compare2To(StatisticsBean o2){
- double a = -1 ,b=-1 ;
- if(this.getChecked_num()!=0 ){
- a = this.getAll_check_score() / (this.getChecked_num()+0.00);
- }
- if(o2.getChecked_num()!=0){
- b = o2.getAll_check_score()/(o2.getChecked_num()+0.00);
- }
- if (a > b ) {
- return 1;
- } else if (a < b) {
- return -1;
- } else {
- return 0;
- }
- }
-
- //比较大小 1 小 , -1 大
- // 方法3
- public int compare3To(StatisticsBean o2){
- double a = -1 ,b=-1 ;
- if(Float.valueOf(this.getCheck_total_avg())!=0 ){
- a = Float.valueOf(this.getCheck_total_avg());
- }
- if(Float.valueOf(o2.getCheck_total_avg())!=0){
- b = Float.valueOf(o2.getCheck_total_avg());
- }
- if (a > b ) {
- return 1;
- } else if (a < b) {
- return -1;
- } else {
- return 0;
- }
- }
-
- //比较大小 1 小 , -1 大
- // 方法3
- public int compare4To(StatisticsBean o2){
- if (this.getId() > o2.getId()) {
- return 1;
- } else if (this.getId() == o2.getId()) {
- if (Float.valueOf(this.getCheck_total_avg()) != 0 && Float.valueOf(o2.getCheck_total_avg()) != 0) {
- if (Float.valueOf(this.getCheck_total_avg()) < Float.valueOf(o2.getCheck_total_avg())) {
- return -1;
- } else if (Float.valueOf(this.getCheck_total_avg()) > Float.valueOf(o2.getCheck_total_avg())) {
- return 1;
- } else {
- return 0;
- }
- } else {
- if (Float.valueOf(this.getCheck_total_avg()) == 0) {
- return -1;
- } else if (Float.valueOf(o2.getCheck_total_avg()) == 0) {
- return 1;
- } else {
- return 0;
- }
- }
- } else {
- return -1;
- }
- }
-
- }
|