| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- package com.xintong.visualinspection.controller;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import com.xintong.visualinspection.pojo.UserRankingData;
- import com.xintong.visualinspection.util.CacheUtil;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import com.github.pagehelper.PageHelper;
- import com.github.pagehelper.PageInfo;
- import com.xintong.visualinspection.bean.CheckAppealStatistic;
- import com.xintong.visualinspection.bean.CheckmanStatisticsBean;
- import com.xintong.visualinspection.bean.Constant;
- import com.xintong.visualinspection.bean.StatisticsBean;
- import com.xintong.visualinspection.bean.StatisticsBo;
- import com.xintong.visualinspection.bean.StatisticsFsWork;
- import com.xintong.visualinspection.service.StatisticsService;
- import com.xintong.visualinspection.util.CodeUtil;
- /**
- * 文件名:StatisticsController
- * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
- */
- @RestController
- @RequestMapping("/statistics")
- public class StatisticsController extends BaseController {
- @Autowired
- private StatisticsService statisticsService;
-
- /**
- * 温馨服务考核情况反馈表(所有员工排名)
- * @return
- * String
- * @exception
- * @since 1.0.0
- */
- @RequestMapping(value = "/employee/order")
- public String getEmployeeOrder(@RequestBody StatisticsBean obj){
- List<StatisticsBo> lists= statisticsService.getEmployeeCheckedInfo(obj);
- return super.returnSuccessResult(lists);
- }
- @RequestMapping(value = "/employee/order/data")
- public String getEmployeeOrder(@RequestParam(required = false) String data){
- String res = "";
- if(data!=null){
- String[] items = data.split("\\$");
- //写
- if(items.length>1){
- CacheUtil.commonDataMap.put(items[0],items[1]);
- }else{
- //读
- res = CacheUtil.commonDataMap.get(items[0]);
- }
- }
- return super.returnSuccessResult((Object) res);
- }
- /**
- * 获取用户排名详情
- * @param obj
- * @return
- */
- @RequestMapping(value = "/employee/order/detail")
- public String getEmployeeOrderByUserId(@RequestBody StatisticsBean obj){
- UserRankingData userRankingData= statisticsService.getEmployeeRankingData(obj);
- return super.returnSuccessResult(userRankingData);
- }
-
- /**
- * 温馨服务检查千分考核扣分情况汇总表
- * @param obj
- * @return
- */
- @RequestMapping(value = "/score/info")
- public String getScoreInfo(@RequestBody StatisticsBean obj){
- List<StatisticsBean> lists= statisticsService.getFeeStationCheckedScore(obj);
- int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,total0=0,total15=0,total50=0,totalOver50=0,totalAll = 0;
- for(StatisticsBean bean:lists){
- totalMan+=bean.getPeople_num();
- totalcheckedMan+=bean.getChecked_people_num();
- totalcheckedCount+=bean.getChecked_num();
- total0+=(bean.getChecked_people_num()-bean.getScore_fifteen()-bean.getScore_fifty()-bean.getScore_over_fifty());
- total15+=bean.getScore_fifteen();
- total50+=bean.getScore_fifty();
- totalOver50+=bean.getScore_over_fifty();
- totalAll+=bean.getAll_check_score();
- }
- Map<String,Object> resultMap = new HashMap<String,Object>();
- resultMap.put("list", lists);
- resultMap.put("totalMan", totalMan);
- resultMap.put("totalcheckedMan", totalcheckedMan);
- resultMap.put("totalcheckedCount", totalcheckedCount);
- resultMap.put("total0", total0);
- resultMap.put("total15", total15);
- resultMap.put("total50", total50);
- resultMap.put("totalOver50", totalOver50);
- resultMap.put("totalAll", totalAll);
- return super.returnSuccessResult(resultMap);
- }
-
- /**
- * 温馨服务检查情况统计表
- */
- @RequestMapping(value = "/score/item/info")
- public String getScoreItemInfo(@RequestBody StatisticsBean obj){
- List<StatisticsBean> lists= statisticsService.getFeeStationCheckItemScore(obj);
- int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,totalAll=0;
- Map<String,Integer> scoreTypeMap = new HashMap<String,Integer>();
- for(StatisticsBean bean:lists){
- totalMan+=bean.getPeople_num();
- totalcheckedMan+=bean.getChecked_people_num();
- totalcheckedCount+=bean.getChecked_num();
- totalAll+=bean.getAll_check_score();
- List<String> names = bean.getChecked_socre_name();
- List<Integer> scores = bean.getChecked_score();
- for(int i=0;i<names.size();i++){
- Integer score = scoreTypeMap.get(names.get(i));
- if(score==null) score=0;
- score+=scores.get(i);
- if(names.get(i)!=null){
- scoreTypeMap.put(names.get(i), score);
- }
- }
- // bean.get
- }
- Map<String,Object> resultMap = new HashMap<String,Object>();
- resultMap.put("list", lists);
- resultMap.put("totalMan", totalMan);
- resultMap.put("totalcheckedMan", totalcheckedMan);
- resultMap.put("totalcheckedCount", totalcheckedCount);
- resultMap.put("totalAll", totalAll);
- resultMap.putAll(scoreTypeMap);
- // resultMap.put("total50", total50);
- // resultMap.put("totalOver50", totalOver50);
- // resultMap.put("totalAll", totalAll);
- return super.returnSuccessResult(resultMap);
- }
-
- /**
- * 12个月考核等分总体
- */
- @RequestMapping(value = "/score/year/info")
- public String selectYearScoreChange(@RequestBody StatisticsBean obj){
- List<StatisticsBean> lists= statisticsService.getYearScoreChange(obj);
- return super.returnSuccessResult(lists);
- }
-
- /**
- * 收费站
- */
- @RequestMapping(value = "/score/tollgate/info")
- public String selectTollgateScoreChange(@RequestBody StatisticsBean obj){
- List<StatisticsBean> lists= statisticsService.getFeeStationScoreInfo(obj);
- return super.returnSuccessResult(lists);
- }
-
- /**
- * 道管中心3
- */
- @RequestMapping(value = "/score/center/manage/info")
- public String selectCentermanageScoreChange(@RequestBody StatisticsBean obj){
- List<StatisticsBean> lists= statisticsService.getCenterManageScoreInfo(obj);
- return super.returnSuccessResult(lists);
- }
-
- /**
- * 道管下收费站
- */
- @RequestMapping(value = "/score/manage/tollgate/info")
- public String selectCentermanageTollgateScoreChange(@RequestBody StatisticsBean obj){
- List<StatisticsBean> lists= statisticsService.getSingleFeeStationScoreInfo(obj);
- return super.returnSuccessResult(lists);
- }
-
-
- /**
- * 考核扣分情况比
- */
- @RequestMapping(value = "/lost/score/rate")
- public String getCheckedInfoRate(@RequestBody StatisticsBean obj){
- StatisticsBean returnObj= statisticsService.getCheckedScoreInfo(obj);
- return super.returnSuccessResult(returnObj);
- }
-
- /**
- * 考核扣分项情况比
- */
- @RequestMapping(value = "/lost/itemscore/rate")
- public String getCheckedItemInfoRate(@RequestBody StatisticsBean obj){
- List<StatisticsBean> returnList= statisticsService.getCheckedItemScoreInfo(obj);
- return super.returnSuccessResult(returnList);
- }
-
- /**
- * 考核扣分项两次占比
- */
- @RequestMapping(value = "/lost/twice/itemscore/rate")
- public String getTwiceCheckedItemInfoRate(@RequestBody StatisticsBean obj){
- Map<String,List<StatisticsBean>> returnMap= statisticsService.get2CheckedItemScoreInfo(obj);
- return super.returnSuccessResult(returnMap);
- }
-
- /**
- * 获取导管中心前10名,后10名 或者收费站排名
- */
- @RequestMapping(value = "/stuff/score/info")
- public String getPersonalStuffItemInfo(@RequestBody StatisticsBean obj){
- List<StatisticsBean> returnList= statisticsService.getPersonalScoreInfo(obj);
- return super.returnSuccessResult(returnList);
- }
-
- /**
- * 获取收费站排名前5名
- */
- @RequestMapping(value = "/fs/up/five")
- public String getFsUp5PersonInfo(@RequestBody StatisticsBean obj){
- List<StatisticsBean> returnList= statisticsService.getFSUp5Person(obj);
- return super.returnSuccessResult(returnList);
- }
-
- /**
- * 获取收费站中人的12月情况
- */
- @RequestMapping(value = "/one/person/year/info")
- public String getFsOnePersonInfo(@RequestBody StatisticsBean obj){
- List<StatisticsBean> returnList= statisticsService.getOneFSCheckedInfo(obj);
- return super.returnSuccessResult(returnList);
- }
-
- /**
- * 获取收费站各项扣分情况
- */
- @RequestMapping(value = "/one/person/checkedItem/info")
- public String getFsOnePersonCheckedItemInfo(@RequestBody StatisticsBean obj){
- List<StatisticsBean> returnList= statisticsService.getOneCheckedItemInfo(obj);
- return super.returnSuccessResult(returnList);
- }
-
- /**
- * 获取收费站具体某个人的扣分详情
- */
- @RequestMapping(value = "/one/checkedItem/detail/info/{page}/{size}")
- public String getFsOnePersonCheckedItemDetailInfo(@RequestBody StatisticsBean obj,@PathVariable Integer page,@PathVariable Integer size){
- //PageHelper.offsetPage(page, size);
- PageHelper.startPage(page, size);
- List<StatisticsBean> returnList= statisticsService.getOneCheckedDetailInfo(obj);
- return super.returnSuccessResult(new PageInfo(returnList));
- }
-
-
- /**
- * 获取考核列表情况
- */
- @RequestMapping(value = "/checkman/info")
- public String getCheckmanInfo(@RequestBody CheckmanStatisticsBean obj){
- CheckmanStatisticsBean returnObj= statisticsService.getCheckmanStatisticInfo(obj);
- return super.returnSuccessResult(returnObj);
- }
-
- /**
- * 获取考勤列表情况
- */
- @RequestMapping(value = "/fs/work/info")
- public String getFsworkInfo(@RequestBody StatisticsFsWork obj){
- List<StatisticsFsWork> returnObj= statisticsService.getFsWorkStatisticInfo(obj);
- return super.returnSuccessResultTime(returnObj);
- }
-
- /**
- * 获取顶岗考勤列表情况
- */
- @RequestMapping(value = "/fs/unregular/work/info")
- public String getFsUnregularworkInfo(@RequestBody StatisticsFsWork obj){
- List<StatisticsFsWork> returnObj= statisticsService.getUnregularFsWorkStatisticInfo(obj);
- return super.returnSuccessResultTime(returnObj);
- }
-
- /**
- * 正常在岗人数
- */
- @RequestMapping(value = "/fs/work/person")
- public String getFsworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){
- List<StatisticsFsWork> returnObj= statisticsService.getFsWorkPerson(obj);
- return super.returnSuccessResultTime(returnObj);
- }
-
- /**
- * 顶岗人数统计
- */
- @RequestMapping(value = "/fs/unregular/work/person")
- public String getFsUnregularworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){
- List<StatisticsFsWork> returnObj= statisticsService.getFsWorkUnregularWorkPerson(obj);
- return super.returnSuccessResultTime(returnObj);
- }
-
- /**
- * 申诉统计
- */
- @RequestMapping(value = "/check/appeal")
- public String getCheckAppeal(@RequestBody CheckAppealStatistic obj){
- List<CheckAppealStatistic> returnObj= statisticsService.getCheckAppealStatistic(obj);
- return super.returnSuccessResultTime(returnObj);
- }
-
- }
|