StatisticsController.java 10 KB

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