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 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 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 resultMap = new HashMap(); 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 lists= statisticsService.getFeeStationCheckItemScore(obj); int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,totalAll=0; Map scoreTypeMap = new HashMap(); for(StatisticsBean bean:lists){ totalMan+=bean.getPeople_num(); totalcheckedMan+=bean.getChecked_people_num(); totalcheckedCount+=bean.getChecked_num(); totalAll+=bean.getAll_check_score(); List names = bean.getChecked_socre_name(); List scores = bean.getChecked_score(); for(int i=0;i resultMap = new HashMap(); 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 lists= statisticsService.getYearScoreChange(obj); return super.returnSuccessResult(lists); } /** * 收费站 */ @RequestMapping(value = "/score/tollgate/info") public String selectTollgateScoreChange(@RequestBody StatisticsBean obj){ List lists= statisticsService.getFeeStationScoreInfo(obj); return super.returnSuccessResult(lists); } /** * 道管中心3 */ @RequestMapping(value = "/score/center/manage/info") public String selectCentermanageScoreChange(@RequestBody StatisticsBean obj){ List lists= statisticsService.getCenterManageScoreInfo(obj); return super.returnSuccessResult(lists); } /** * 道管下收费站 */ @RequestMapping(value = "/score/manage/tollgate/info") public String selectCentermanageTollgateScoreChange(@RequestBody StatisticsBean obj){ List 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 returnList= statisticsService.getCheckedItemScoreInfo(obj); return super.returnSuccessResult(returnList); } /** * 考核扣分项两次占比 */ @RequestMapping(value = "/lost/twice/itemscore/rate") public String getTwiceCheckedItemInfoRate(@RequestBody StatisticsBean obj){ Map> returnMap= statisticsService.get2CheckedItemScoreInfo(obj); return super.returnSuccessResult(returnMap); } /** * 获取导管中心前10名,后10名 或者收费站排名 */ @RequestMapping(value = "/stuff/score/info") public String getPersonalStuffItemInfo(@RequestBody StatisticsBean obj){ List returnList= statisticsService.getPersonalScoreInfo(obj); return super.returnSuccessResult(returnList); } /** * 获取收费站排名前5名 */ @RequestMapping(value = "/fs/up/five") public String getFsUp5PersonInfo(@RequestBody StatisticsBean obj){ List returnList= statisticsService.getFSUp5Person(obj); return super.returnSuccessResult(returnList); } /** * 获取收费站中人的12月情况 */ @RequestMapping(value = "/one/person/year/info") public String getFsOnePersonInfo(@RequestBody StatisticsBean obj){ List returnList= statisticsService.getOneFSCheckedInfo(obj); return super.returnSuccessResult(returnList); } /** * 获取收费站各项扣分情况 */ @RequestMapping(value = "/one/person/checkedItem/info") public String getFsOnePersonCheckedItemInfo(@RequestBody StatisticsBean obj){ List 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 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 returnObj= statisticsService.getFsWorkStatisticInfo(obj); return super.returnSuccessResultTime(returnObj); } /** * 获取顶岗考勤列表情况 */ @RequestMapping(value = "/fs/unregular/work/info") public String getFsUnregularworkInfo(@RequestBody StatisticsFsWork obj){ List returnObj= statisticsService.getUnregularFsWorkStatisticInfo(obj); return super.returnSuccessResultTime(returnObj); } /** * 正常在岗人数 */ @RequestMapping(value = "/fs/work/person") public String getFsworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){ List returnObj= statisticsService.getFsWorkPerson(obj); return super.returnSuccessResultTime(returnObj); } /** * 顶岗人数统计 */ @RequestMapping(value = "/fs/unregular/work/person") public String getFsUnregularworkInfoPersonNumber(@RequestBody StatisticsFsWork obj){ List returnObj= statisticsService.getFsWorkUnregularWorkPerson(obj); return super.returnSuccessResultTime(returnObj); } /** * 申诉统计 */ @RequestMapping(value = "/check/appeal") public String getCheckAppeal(@RequestBody CheckAppealStatistic obj){ List returnObj= statisticsService.getCheckAppealStatistic(obj); return super.returnSuccessResultTime(returnObj); } }