StatisticsBean.java 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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 double score;
  35. private double deptwscore;
  36. private Integer item_id ;
  37. private int checked_num;
  38. private int checked_people_num ;
  39. private int people_num;
  40. private double score_fifteen;
  41. private double score_fifty;
  42. private double score_over_fifty ;
  43. private double all_check_score ;
  44. private double all_check_deptw_score ;
  45. // 满分
  46. private double check_no_score ;
  47. // 平均得分
  48. private String score_avg ;
  49. // 平均人均扣分
  50. private double check_score_avg;
  51. private List<String> checked_socre_name = new ArrayList<>() ;
  52. private List<Double> checked_score = new ArrayList<>() ;
  53. private List<Double> seq_checked_score = new ArrayList<>() ;
  54. private List<Organ> dept_list ;
  55. private List<Integer> checked_score_ids = new ArrayList<>() ;
  56. private String start_score;
  57. private String end_score;
  58. // 查询标记
  59. private Integer queryType ;
  60. // 月份
  61. private String mth ;
  62. // 上月
  63. private String prev_mth ;
  64. // 收费站名称
  65. private String feeStationName ;
  66. private String pfeeStationName ;
  67. private User user;
  68. //
  69. private Integer order_type ;
  70. // 排名
  71. private Integer ranking ;
  72. // 排名变化
  73. private Integer ranking_change;
  74. // 照片
  75. private String pics ;
  76. // 稽查人员id
  77. private Integer checkman_id ;
  78. private String checkman_name ;
  79. // 被考核人的姓名
  80. private String checked_name ;
  81. private String check_task_name ;
  82. private String check_task_time_name ;
  83. private List<Integer> position_ids;
  84. private Integer score_flag ;
  85. // 其他稽查不同类型
  86. private Integer check_type;
  87. // 扣分合计
  88. private Double check_total_score = 0.00;
  89. // 公司受检次数
  90. private Integer company_check_num = 0;
  91. // 公司扣分合计
  92. private Double company_total_score= 0.00;
  93. // 第三方暗访受检次数
  94. private Integer third_check_num = 0;
  95. // 第三方暗访扣分合计
  96. private Double third_total_score = 0.00;
  97. // 特情受检次数
  98. private Integer special_check_num = 0;
  99. // 特情访扣分合计
  100. private Double special_total_score = 0.00;
  101. // 现场受检次数
  102. private Integer onsite_check_num = 0;
  103. // 现场扣分合计
  104. private Double onsite_total_score = 0.00;
  105. // 数据平台受检次数
  106. private Integer data_check_num = 0;
  107. // 数据平台扣分合计
  108. // 其他
  109. private Integer other_check_num =0;
  110. private Double other_total_score = 0.00 ;
  111. private Double data_total_score = 0.00;
  112. // 总平均扣分
  113. private String check_total_avg = "0";
  114. // 公司排名
  115. private Integer company_ranking2;
  116. // 道管排名
  117. private Integer fee_station_ranking2;
  118. private Integer check_t_num = 0;
  119. private Double check_t_score = 0.00;
  120. private Integer check_x_num = 0;
  121. private Double check_x_score = 0.00;
  122. private Integer check_s_num = 0;
  123. private Double check_s_score = 0.00;
  124. private Integer check_all_num = 0;
  125. private Double check_all_score = 0.00;
  126. private List<CheckItem> itemList;
  127. // 比较大小 1 小 , -1 大
  128. public int compareTo(StatisticsBean o2){
  129. if(this.getChecked_num()!=0 && o2.getChecked_num()!=0){
  130. double a = this.getAll_check_score() / (this.getChecked_num()+0.00) /*/ this.getPeople_num()*/;
  131. double b = o2.getAll_check_score() /(o2.getChecked_num()+0.00) /*/ o2.getPeople_num()*/;
  132. if (a > b ) {
  133. return 1;
  134. } else if (a < b) {
  135. return -1;
  136. } else {
  137. return 0;
  138. }
  139. }else{
  140. if(this.getChecked_num() == 0 && o2.getChecked_num()!=0 ){
  141. return -1 ;
  142. }else if(o2.getChecked_num() ==0 && this.getChecked_num() != 0){
  143. return 1;
  144. }else{
  145. return 0;
  146. }
  147. }
  148. }
  149. public int compareNewTo(StatisticsBean o2) {
  150. double a = 100.0 ,b=100.0 ;
  151. a = a - this.getAll_check_score();
  152. b = b - o2.getAll_check_score();
  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. // 方法2
  163. public int compare2To(StatisticsBean o2){
  164. double a = -1 ,b=-1 ;
  165. if(this.getChecked_num()!=0 ){
  166. a = this.getAll_check_score() / (this.getChecked_num()+0.00);
  167. }
  168. if(o2.getChecked_num()!=0){
  169. b = o2.getAll_check_score()/(o2.getChecked_num()+0.00);
  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 compare3To(StatisticsBean o2){
  182. double a = -1 ,b=-1 ;
  183. if(Float.valueOf(this.getCheck_total_avg())!=0 ){
  184. a = Float.valueOf(this.getCheck_total_avg());
  185. }
  186. if(Float.valueOf(o2.getCheck_total_avg())!=0){
  187. b = Float.valueOf(o2.getCheck_total_avg());
  188. }
  189. if (a > b ) {
  190. return 1;
  191. } else if (a < b) {
  192. return -1;
  193. } else {
  194. return 0;
  195. }
  196. }
  197. //比较大小 1 小 , -1 大
  198. // 方法3
  199. public int compare4To(StatisticsBean o2){
  200. if (this.getId() > o2.getId()) {
  201. return 1;
  202. } else if (this.getId() == o2.getId()) {
  203. if (Float.valueOf(this.getCheck_total_avg()) != 0 && Float.valueOf(o2.getCheck_total_avg()) != 0) {
  204. if (Float.valueOf(this.getCheck_total_avg()) < Float.valueOf(o2.getCheck_total_avg())) {
  205. return -1;
  206. } else if (Float.valueOf(this.getCheck_total_avg()) > Float.valueOf(o2.getCheck_total_avg())) {
  207. return 1;
  208. } else {
  209. return 0;
  210. }
  211. } else {
  212. if (Float.valueOf(this.getCheck_total_avg()) == 0) {
  213. return -1;
  214. } else if (Float.valueOf(o2.getCheck_total_avg()) == 0) {
  215. return 1;
  216. } else {
  217. return 0;
  218. }
  219. }
  220. } else {
  221. return -1;
  222. }
  223. }
  224. }