StatisticsController.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. package com.xintong.visualinspection.controller;
  2. import java.util.HashMap;
  3. import java.util.List;
  4. import java.util.Map;
  5. import com.xintong.visualinspection.pojo.UserRankingData;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.web.bind.annotation.PathVariable;
  8. import org.springframework.web.bind.annotation.RequestBody;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RestController;
  11. import com.github.pagehelper.PageHelper;
  12. import com.github.pagehelper.PageInfo;
  13. import com.xintong.visualinspection.bean.CheckAppealStatistic;
  14. import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
  15. import com.xintong.visualinspection.bean.Constant;
  16. import com.xintong.visualinspection.bean.StatisticsBean;
  17. import com.xintong.visualinspection.bean.StatisticsBo;
  18. import com.xintong.visualinspection.bean.StatisticsFsWork;
  19. import com.xintong.visualinspection.service.StatisticsService;
  20. import com.xintong.visualinspection.util.CodeUtil;
  21. /**
  22. * 文件名:StatisticsController
  23. * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  24. */
  25. @RestController
  26. @RequestMapping("/statistics")
  27. public class StatisticsController extends BaseController {
  28. @Autowired
  29. private StatisticsService statisticsService;
  30. /**
  31. * 温馨服务考核情况反馈表(所有员工排名)
  32. * @return
  33. * String
  34. * @exception
  35. * @since 1.0.0
  36. */
  37. @RequestMapping(value = "/employee/order")
  38. public String getEmployeeOrder(@RequestBody StatisticsBean obj){
  39. List<StatisticsBo> lists= statisticsService.getEmployeeCheckedInfo(obj);
  40. return super.returnSuccessResult(lists);
  41. }
  42. /**
  43. * 获取用户排名详情
  44. * @param obj
  45. * @return
  46. */
  47. @RequestMapping(value = "/employee/order/detail")
  48. public String getEmployeeOrderByUserId(@RequestBody StatisticsBean obj){
  49. UserRankingData userRankingData= statisticsService.getEmployeeRankingData(obj);
  50. return super.returnSuccessResult(userRankingData);
  51. }
  52. /**
  53. * 温馨服务检查千分考核扣分情况汇总表
  54. * @param obj
  55. * @return
  56. */
  57. @RequestMapping(value = "/score/info")
  58. public String getScoreInfo(@RequestBody StatisticsBean obj){
  59. List<StatisticsBean> lists= statisticsService.getFeeStationCheckedScore(obj);
  60. int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,total0=0,total15=0,total50=0,totalOver50=0,totalAll = 0;
  61. for(StatisticsBean bean:lists){
  62. totalMan+=bean.getPeople_num();
  63. totalcheckedMan+=bean.getChecked_people_num();
  64. totalcheckedCount+=bean.getChecked_num();
  65. total0+=(bean.getChecked_people_num()-bean.getScore_fifteen()-bean.getScore_fifty()-bean.getScore_over_fifty());
  66. total15+=bean.getScore_fifteen();
  67. total50+=bean.getScore_fifty();
  68. totalOver50+=bean.getScore_over_fifty();
  69. totalAll+=bean.getAll_check_score();
  70. }
  71. Map<String,Object> resultMap = new HashMap<String,Object>();
  72. resultMap.put("list", lists);
  73. resultMap.put("totalMan", totalMan);
  74. resultMap.put("totalcheckedMan", totalcheckedMan);
  75. resultMap.put("totalcheckedCount", totalcheckedCount);
  76. resultMap.put("total0", total0);
  77. resultMap.put("total15", total15);
  78. resultMap.put("total50", total50);
  79. resultMap.put("totalOver50", totalOver50);
  80. resultMap.put("totalAll", totalAll);
  81. return super.returnSuccessResult(resultMap);
  82. }
  83. /**
  84. * 温馨服务检查情况统计表
  85. */
  86. @RequestMapping(value = "/score/item/info")
  87. public String getScoreItemInfo(@RequestBody StatisticsBean obj){
  88. List<StatisticsBean> lists= statisticsService.getFeeStationCheckItemScore(obj);
  89. int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,totalAll=0;
  90. Map<String,Integer> scoreTypeMap = new HashMap<String,Integer>();
  91. for(StatisticsBean bean:lists){
  92. totalMan+=bean.getPeople_num();
  93. totalcheckedMan+=bean.getChecked_people_num();
  94. totalcheckedCount+=bean.getChecked_num();
  95. totalAll+=bean.getAll_check_score();
  96. List<String> names = bean.getChecked_socre_name();
  97. List<Integer> scores = bean.getChecked_score();
  98. for(int i=0;i<names.size();i++){
  99. Integer score = scoreTypeMap.get(names.get(i));
  100. if(score==null) score=0;
  101. score+=scores.get(i);
  102. scoreTypeMap.put(names.get(i), score);
  103. }
  104. // bean.get
  105. }
  106. Map<String,Object> resultMap = new HashMap<String,Object>();
  107. resultMap.put("list", lists);
  108. resultMap.put("totalMan", totalMan);
  109. resultMap.put("totalcheckedMan", totalcheckedMan);
  110. resultMap.put("totalcheckedCount", totalcheckedCount);
  111. resultMap.put("totalAll", totalAll);
  112. resultMap.putAll(scoreTypeMap);
  113. // resultMap.put("total50", total50);
  114. // resultMap.put("totalOver50", totalOver50);
  115. // resultMap.put("totalAll", totalAll);
  116. return super.returnSuccessResult(resultMap);
  117. }
  118. /**
  119. * 12个月考核等分总体
  120. */
  121. @RequestMapping(value = "/score/year/info")
  122. public String selectYearScoreChange(@RequestBody StatisticsBean obj){
  123. List<StatisticsBean> lists= statisticsService.getYearScoreChange(obj);
  124. return super.returnSuccessResult(lists);
  125. }
  126. /**
  127. * 收费站
  128. */
  129. @RequestMapping(value = "/score/tollgate/info")
  130. public String selectTollgateScoreChange(@RequestBody StatisticsBean obj){
  131. List<StatisticsBean> lists= statisticsService.getFeeStationScoreInfo(obj);
  132. return super.returnSuccessResult(lists);
  133. }
  134. /**
  135. * 道管中心3
  136. */
  137. @RequestMapping(value = "/score/center/manage/info")
  138. public String selectCentermanageScoreChange(@RequestBody StatisticsBean obj){
  139. List<StatisticsBean> lists= statisticsService.getCenterManageScoreInfo(obj);
  140. return super.returnSuccessResult(lists);
  141. }
  142. /**
  143. * 道管下收费站
  144. */
  145. @RequestMapping(value = "/score/manage/tollgate/info")
  146. public String selectCentermanageTollgateScoreChange(@RequestBody StatisticsBean obj){
  147. List<StatisticsBean> lists= statisticsService.getSingleFeeStationScoreInfo(obj);
  148. return super.returnSuccessResult(lists);
  149. }
  150. /**
  151. * 考核扣分情况比
  152. */
  153. @RequestMapping(value = "/lost/score/rate")
  154. public String getCheckedInfoRate(@RequestBody StatisticsBean obj){
  155. StatisticsBean returnObj= statisticsService.getCheckedScoreInfo(obj);
  156. return super.returnSuccessResult(returnObj);
  157. }
  158. /**
  159. * 考核扣分项情况比
  160. */
  161. @RequestMapping(value = "/lost/itemscore/rate")
  162. public String getCheckedItemInfoRate(@RequestBody StatisticsBean obj){
  163. List<StatisticsBean> returnList= statisticsService.getCheckedItemScoreInfo(obj);
  164. return super.returnSuccessResult(returnList);
  165. }
  166. /**
  167. * 考核扣分项两次占比
  168. */
  169. @RequestMapping(value = "/lost/twice/itemscore/rate")
  170. public String getTwiceCheckedItemInfoRate(@RequestBody StatisticsBean obj){
  171. Map<String,List<StatisticsBean>> returnMap= statisticsService.get2CheckedItemScoreInfo(obj);
  172. return super.returnSuccessResult(returnMap);
  173. }
  174. /**
  175. * 获取导管中心前10名,后10名 或者收费站排名
  176. */
  177. @RequestMapping(value = "/stuff/score/info")
  178. public String getPersonalStuffItemInfo(@RequestBody StatisticsBean obj){
  179. List<StatisticsBean> returnList= statisticsService.getPersonalScoreInfo(obj);
  180. return super.returnSuccessResult(returnList);
  181. }
  182. /**
  183. * 获取收费站排名前5名
  184. */
  185. @RequestMapping(value = "/fs/up/five")
  186. public String getFsUp5PersonInfo(@RequestBody StatisticsBean obj){
  187. List<StatisticsBean> returnList= statisticsService.getFSUp5Person(obj);
  188. return super.returnSuccessResult(returnList);
  189. }
  190. /**
  191. * 获取收费站中人的12月情况
  192. */
  193. @RequestMapping(value = "/one/person/year/info")
  194. public String getFsOnePersonInfo(@RequestBody StatisticsBean obj){
  195. List<StatisticsBean> returnList= statisticsService.getOneFSCheckedInfo(obj);
  196. return super.returnSuccessResult(returnList);
  197. }
  198. /**
  199. * 获取收费站各项扣分情况
  200. */
  201. @RequestMapping(value = "/one/person/checkedItem/info")
  202. public String getFsOnePersonCheckedItemInfo(@RequestBody StatisticsBean obj){
  203. List<StatisticsBean> returnList= statisticsService.getOneCheckedItemInfo(obj);
  204. return super.returnSuccessResult(returnList);
  205. }
  206. /**
  207. * 获取收费站具体某个人的扣分详情
  208. */
  209. @RequestMapping(value = "/one/checkedItem/detail/info/{page}/{size}")
  210. public String getFsOnePersonCheckedItemDetailInfo(@RequestBody StatisticsBean obj,@PathVariable Integer page,@PathVariable Integer size){
  211. //PageHelper.offsetPage(page, size);
  212. PageHelper.startPage(page, size);
  213. List<StatisticsBean> returnList= statisticsService.getOneCheckedDetailInfo(obj);
  214. return super.returnSuccessResult(new PageInfo(returnList));
  215. }
  216. /**
  217. * 获取考核列表情况
  218. */
  219. @RequestMapping(value = "/checkman/info")
  220. public String getCheckmanInfo(@RequestBody CheckmanStatisticsBean obj){
  221. CheckmanStatisticsBean returnObj= statisticsService.getCheckmanStatisticInfo(obj);
  222. return super.returnSuccessResult(returnObj);
  223. }
  224. /**
  225. * 获取考勤列表情况
  226. */
  227. @RequestMapping(value = "/fs/work/info")
  228. public String getFsworkInfo(@RequestBody StatisticsFsWork obj){
  229. List<StatisticsFsWork> returnObj= statisticsService.getFsWorkStatisticInfo(obj);
  230. return super.returnSuccessResultTime(returnObj);
  231. }
  232. /**
  233. * 获取顶岗考勤列表情况
  234. */
  235. @RequestMapping(value = "/fs/unregular/work/info")
  236. public String getFsUnregularworkInfo(@RequestBody StatisticsFsWork obj){
  237. List<StatisticsFsWork> returnObj= statisticsService.getUnregularFsWorkStatisticInfo(obj);
  238. return super.returnSuccessResultTime(returnObj);
  239. }
  240. /**
  241. * 正常在岗人数
  242. */
  243. @RequestMapping(value = "/fs/work/person")
  244. public String getFsworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){
  245. List<StatisticsFsWork> returnObj= statisticsService.getFsWorkPerson(obj);
  246. return super.returnSuccessResultTime(returnObj);
  247. }
  248. /**
  249. * 顶岗人数统计
  250. */
  251. @RequestMapping(value = "/fs/unregular/work/person")
  252. public String getFsUnregularworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){
  253. List<StatisticsFsWork> returnObj= statisticsService.getFsWorkUnregularWorkPerson(obj);
  254. return super.returnSuccessResultTime(returnObj);
  255. }
  256. /**
  257. * 申诉统计
  258. */
  259. @RequestMapping(value = "/check/appeal")
  260. public String getCheckAppeal(@RequestBody CheckAppealStatistic obj){
  261. List<CheckAppealStatistic> returnObj= statisticsService.getCheckAppealStatistic(obj);
  262. return super.returnSuccessResultTime(returnObj);
  263. }
  264. }