StatisticsBean.java 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. package com.xintong.visualinspection.bean;
  2. import java.util.ArrayList;
  3. import java.util.Date;
  4. import java.util.List;
  5. import org.springframework.format.annotation.DateTimeFormat;
  6. import com.fasterxml.jackson.annotation.JsonFormat;
  7. import lombok.Data;
  8. /**
  9. * 文件名:Job
  10. * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  11. */
  12. @Data
  13. public class StatisticsBean {
  14. //编号
  15. private Integer id;
  16. // 父部门id
  17. private Long parent_dept_id ;
  18. // 部门id
  19. private Long dept_id;
  20. //开始日期
  21. @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  22. @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  23. private Date start_date ;
  24. @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  25. @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  26. private Date end_date ;
  27. @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  28. @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
  29. private Date update_time ;
  30. private Long task_id;
  31. private Long user_id ;
  32. private String name ;
  33. private String parent_name ;
  34. private int score;
  35. private Integer item_id ;
  36. private int checked_num;
  37. private int checked_people_num ;
  38. private int people_num;
  39. private int score_fifteen;
  40. private int score_fifty;
  41. private int score_over_fifty ;
  42. private int all_check_score ;
  43. // 满分
  44. private int check_no_score ;
  45. // 平均得分
  46. private String score_avg ;
  47. // 平均人均扣分
  48. private float check_score_avg;
  49. private List<String> checked_socre_name = new ArrayList<>() ;
  50. private List<Integer> checked_score = new ArrayList<>() ;
  51. private List<Integer> seq_checked_score = new ArrayList<>() ;
  52. private List<Organ> dept_list ;
  53. private List<Integer> checked_score_ids = new ArrayList<>() ;
  54. private String start_score;
  55. private String end_score;
  56. // 查询标记
  57. private Integer queryType ;
  58. // 月份
  59. private String mth ;
  60. // 上月
  61. private String prev_mth ;
  62. // 收费站名称
  63. private String feeStationName ;
  64. private String pfeeStationName ;
  65. private User user;
  66. //
  67. private Integer order_type ;
  68. // 排名
  69. private Integer ranking ;
  70. // 排名变化
  71. private Integer ranking_change;
  72. // 照片
  73. private String pics ;
  74. // 稽查人员id
  75. private Integer checkman_id ;
  76. private String checkman_name ;
  77. // 被考核人的姓名
  78. private String checked_name ;
  79. private String check_task_name ;
  80. private String check_task_time_name ;
  81. private List<Integer> position_ids;
  82. private Integer score_flag ;
  83. // 其他稽查不同类型
  84. private Integer check_type;
  85. // 扣分合计
  86. private Integer check_total_score = 0;
  87. // 公司受检次数
  88. private Integer company_check_num = 0;
  89. // 公司扣分合计
  90. private Integer company_total_score= 0;
  91. // 第三方暗访受检次数
  92. private Integer third_check_num = 0;
  93. // 第三方暗访扣分合计
  94. private Integer third_total_score = 0;
  95. // 特情受检次数
  96. private Integer special_check_num = 0;
  97. // 特情访扣分合计
  98. private Integer special_total_score = 0;
  99. // 现场受检次数
  100. private Integer onsite_check_num = 0;
  101. // 现场扣分合计
  102. private Integer onsite_total_score = 0;
  103. // 数据平台受检次数
  104. private Integer data_check_num = 0;
  105. // 数据平台扣分合计
  106. private Integer data_total_score = 0;
  107. // 总平均扣分
  108. private String check_total_avg = "0";
  109. // 公司排名
  110. private Integer company_ranking2;
  111. // 道管排名
  112. private Integer fee_station_ranking2;
  113. private Integer check_t_num = 0;
  114. private Integer check_t_score = 0;
  115. private Integer check_x_num = 0;
  116. private Integer check_x_score = 0;
  117. private Integer check_s_num = 0;
  118. private Integer check_s_score = 0;
  119. private Integer check_all_num = 0;
  120. private Integer check_all_score = 0;
  121. // 比较大小 1 小 , -1 大
  122. public int compareTo(StatisticsBean o2){
  123. if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){
  124. double a = this.getAll_check_score() / (this.getChecked_num()+0.00) /*/ this.getPeople_num()*/;
  125. double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00) /*/ o2.getPeople_num()*/;
  126. if (a > b ) {
  127. return 1;
  128. } else if (a < b) {
  129. return -1;
  130. } else {
  131. return 0;
  132. }
  133. }else{
  134. if(this.getChecked_num() == 0 && o2.getChecked_num()!=0 ){
  135. return -1 ;
  136. }else if(o2.getChecked_num() ==0 && this.getChecked_num() != 0){
  137. return 1;
  138. }else{
  139. return 0;
  140. }
  141. }
  142. }
  143. // 比较大小 1 小 , -1 大
  144. // 方法2
  145. public int compare2To(StatisticsBean o2){
  146. double a = -1 ,b=-1 ;
  147. if(this.getChecked_num()!=0 ){
  148. a = this.getAll_check_score() / (this.getChecked_num()+0.00);
  149. }
  150. if(o2.getChecked_num()!=0){
  151. b = o2.getAll_check_score()/(o2.getChecked_num()+0.00);
  152. }
  153. if (a > b ) {
  154. return 1;
  155. } else if (a < b) {
  156. return -1;
  157. } else {
  158. return 0;
  159. }
  160. }
  161. //比较大小 1 小 , -1 大
  162. // 方法3
  163. public int compare3To(StatisticsBean o2){
  164. double a = -1 ,b=-1 ;
  165. if(Float.valueOf(this.getCheck_total_avg())!=0 ){
  166. a = Float.valueOf(this.getCheck_total_avg());
  167. }
  168. if(Float.valueOf(o2.getCheck_total_avg())!=0){
  169. b = Float.valueOf(o2.getCheck_total_avg());
  170. }
  171. if (a > b ) {
  172. return 1;
  173. } else if (a < b) {
  174. return -1;
  175. } else {
  176. return 0;
  177. }
  178. }
  179. //比较大小 1 小 , -1 大
  180. // 方法3
  181. public int compare4To(StatisticsBean o2){
  182. if (this.getId() > o2.getId()) {
  183. return 1;
  184. } else if (this.getId() == o2.getId()) {
  185. if (Float.valueOf(this.getCheck_total_avg()) != 0 && Float.valueOf(o2.getCheck_total_avg()) != 0) {
  186. if (Float.valueOf(this.getCheck_total_avg()) < Float.valueOf(o2.getCheck_total_avg())) {
  187. return -1;
  188. } else if (Float.valueOf(this.getCheck_total_avg()) > Float.valueOf(o2.getCheck_total_avg())) {
  189. return 1;
  190. } else {
  191. return 0;
  192. }
  193. } else {
  194. if (Float.valueOf(this.getCheck_total_avg()) == 0) {
  195. return -1;
  196. } else if (Float.valueOf(o2.getCheck_total_avg()) == 0) {
  197. return 1;
  198. } else {
  199. return 0;
  200. }
  201. }
  202. } else {
  203. return -1;
  204. }
  205. }
  206. }