From 08f1b1f1804a8bd833d42f257908d80e88387b55 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期五, 14 三月 2025 11:27:47 +0800 Subject: [PATCH] 3.5增加登录验证、修改密码、人员列表调整 --- flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java | 655 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 649 insertions(+), 6 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java b/flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java index 9b50967..a1a61b8 100644 --- a/flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java +++ b/flower_city/src/main/java/com/dg/core/controller/HomeStatisticsController.java @@ -1,37 +1,680 @@ package com.dg.core.controller; import com.dg.core.ResultData; -import com.dg.core.db.gen.entity.WorkOrder; +import com.dg.core.db.gen.entity.*; +import com.dg.core.db.manual.pojo.AppletUserCount; +import com.dg.core.service.*; +import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; + +import java.util.*; @Api(tags = {"首页统计接口"}) @RestController @RequestMapping("/Home") -public class HomeStatisticsController +public class HomeStatisticsController extends BaseController { + //导办工单接口 + @Autowired + IGuideRepairOrderService iGuideRepairOrderService; + + //导办进展 + @Autowired + IGuideEvolveService iGuideEvolveService; + @Autowired + HomeStatisticsService homeStatisticsService; + @Autowired + com.dg.core.service.ISysUserService IUserService; + @Autowired + IOrganizationChartService iOrganizationChartService; + @Autowired + IAreaCodeService iAreaCodeService; + + @Autowired + private ISysUserRecordService iSysUserRecordService; + + @Autowired(required = true) + IAutomessageSmartConsultingService iAutomessageSmartConsultingService; + + + @ApiOperation("首页统计不同状态工单数") @GetMapping("/getWorkOrder") - public ResultData getWorkOrder() + public ResultData<WorkOrder> getWorkOrder() + { + WorkOrder workOrder=new WorkOrder(); + //状态(1待分配 2 待办结 3 已办结 4 待评价 5 已取消) + workOrder.setAllNum(iGuideRepairOrderService.countStatisticsNum("",null,null,null,null,null,null,null)); + workOrder.setWaitDistribution(iGuideRepairOrderService.countStatisticsNum("1",null,null,null,null,null,null,null)); + workOrder.setWaitDealWith(iGuideRepairOrderService.countStatisticsNum("2",null,null,null,null,null,null,null)); + workOrder.setHaveDealWith(iGuideRepairOrderService.countStatisticsNum("3",null,null,null,null,null,null,null)); + workOrder.setRemainEvaluated(iGuideRepairOrderService.countStatisticsNum("4",null,null,null,null,null,null,null)); + workOrder.setCanceled(iGuideRepairOrderService.countStatisticsNum("5",null,null,null,null,null,null,null)); + // //服务状态(1.已解决 2.未解决) + workOrder.setUnsolved(iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,null,"2",null)); + workOrder.setResolved(iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,null,"1",null)); + + //是否超时 (1 未超时 2已超时) 超时未办结 + workOrder.setOvertime(iGuideRepairOrderService.countStatisticsNum(null,null,null,"2",null,null,null,null)); +// 超时未办结 + workOrder.setOvertimeWaitDealWith(iGuideRepairOrderService.countStatisticsNum("2",null,null,"2",null,null,null,null)); + return ResultData.success(workOrder); + } + + + @ApiOperation("首页统计不同时间段的工单数量") + @GetMapping("/getTimeWorkOrder") + public ResultData<TimeWorkOrder> getTimeWorkOrder() + { + //1 今天 2昨天 3本月 4本年度 + //累计全部 本年 本月 今日 昨日 + TimeWorkOrder timeWorkOrder=new TimeWorkOrder(); + timeWorkOrder.setAllNum(iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,null,null,null)); + timeWorkOrder.setYearNum(iGuideRepairOrderService.countStatisticsNum(null,null,"4",null,null,null,null,null)); + timeWorkOrder.setMonthNum(iGuideRepairOrderService.countStatisticsNum(null,null,"3",null,null,null,null,null)); + timeWorkOrder.setTodayNum(iGuideRepairOrderService.countStatisticsNum(null,null,"1",null,null,null,null,null)); + timeWorkOrder.setYesterdayNum(iGuideRepairOrderService.countStatisticsNum(null,null,"2",null,null,null,null,null)); + return ResultData.success(timeWorkOrder); + } + + + @ApiOperation("根据选择的时间段 筛选导办工单数 timeType:1 本年度 15 近15天的 30 近30天的") + @GetMapping("/getSelectionTimeOrder") + public ResultData<CountList> getSelectionTimeOrder(@RequestParam("timeType") Integer timeType) + { + if(timeType<1) + { + return ResultData.error("请输入时间"); + } + + if(timeType==1) + { + Calendar calendar=Calendar.getInstance(); + timeType=calendar.get(Calendar.DAY_OF_YEAR); + } +// System.out.println(timeType); + //1 本年度 15 近15天的 30 近30天的 + List<CountListNum> listOne=iGuideRepairOrderService.countListNum("2",null,timeType); + List<CountListNum> listTwo=iGuideRepairOrderService.countListNum("3",null,timeType); + CountList countList=new CountList(); + countList.setWaitDealWithList(listOne); + countList.setHaveDealWith(listTwo); + return ResultData.success(countList); + } + + + + @ApiOperation("获取效率比值") + @GetMapping("/getEfficiency") + public ResultData<EfficiencyEntity> getEfficiency() + { + EfficiencyEntity entity=new EfficiencyEntity(); + //总工单数 + int allNum=iGuideRepairOrderService.countStatisticsNum("",null,null,null,null,null,null,null); + + java.text.DecimalFormat weekDf=new java.text.DecimalFormat("##.##%");//传入格式模板 + + int bj=iGuideRepairOrderService.countStatisticsNum("3",null,null,null,null,null,null,null); + if(bj!=0) + { + // 好评率=评价为满意的导办工单数量/已办结状态工单数量 + String goodReputationEfficiency=weekDf.format((float)(iGuideRepairOrderService.countStatisticsNum(null,null,null,null,"1",null,null,null) + /(float)bj)); + entity.setGoodReputationEfficiency(goodReputationEfficiency); + + // 解决率=已解决状态的导办工单数量/已办结状态工单数量 + String resolveEfficiency=weekDf.format((float)(iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,null,"1",null) + /(float)bj)); + entity.setResolveEfficiency(resolveEfficiency); + + if(allNum!=0) + { +// 办结率=待评价+已办结状态的导办工单数量/总工单数量 + String workEfficiency=weekDf.format((float)((iGuideRepairOrderService.countStatisticsNum("4",null,null,null,null,null,null,null) + +bj)/(float)allNum)); + entity.setWorkEfficiency(workEfficiency); + } + } + + int cs=iGuideRepairOrderService.countStatisticsNum(null,null,null,"2",null,null,null,null); + if(cs!=0) + { + // 超时办结率=超时状态下的待评价+已办结状态的导办工单数量/超时状态的导办工单数量 + String timeoutEfficiency=weekDf.format((float)((iGuideRepairOrderService.countStatisticsNum("4",null,null,"2",null,null,null,null) + +iGuideRepairOrderService.countStatisticsNum("3",null,null,"2",null,null,null,null)) + /(float)cs)); + entity.setTimeoutEfficiency(timeoutEfficiency); + + } + + if(allNum!=0) + { + // 回复率=最新进展里大于0条回复的导办工单数量/总工单数量 + //状态(1待分配 2 待办结 3 已办结 4 待评价 5 已取消 6未解决 7已解决 8 系统自动分配 9 回复 10转派 11手动分配) + + String num=(homeStatisticsService.reversionRate("9",null)); + if(!StringUtils.isEmpty(num)) + { + String reversionRate=weekDf.format(Float.valueOf(num)/(float)allNum); + entity.setReversionRate(reversionRate); + } + + + } + + return ResultData.success(entity); + } + + @ApiOperation("工单 办事指南饼状图数据") + @GetMapping("/getPieChart") + public ResultData<PieChartAll> getPieChart() + { + PieChartAll pieChartAll=new PieChartAll(); + pieChartAll.setWorkOrderNum(iGuideRepairOrderService.countStatisticsNum("",null,null,null,null,null,null,null)+""); + pieChartAll.setFingerpostNum(homeStatisticsService.countStatisticsNum(null,null)+""); + List<PieChart> workOrderList=new ArrayList<>(); + List<PieChart> fingerpostList=new ArrayList<>(); + List<ClassifyAdministration> oneIds=homeStatisticsService.getClassify(null,"1"); + for (ClassifyAdministration oneClassify:oneIds) + { + PieChart workOrder=new PieChart(); + PieChart fingerpost=new PieChart(); + workOrder.setName(oneClassify.getClassifyName()); + fingerpost.setName(oneClassify.getClassifyName()); + List<ClassifyAdministration> twoIds = homeStatisticsService.getClassify(oneClassify.getId()+"",null); + + List clasIds=new ArrayList(); + + clasIds.add(oneClassify.getId()); + for (ClassifyAdministration classify:twoIds) + { + clasIds.add(classify.getId()); + } + int workOrderNum=0; + int fingerpostNum=0; + if(clasIds.size()>0) + { + workOrderNum=iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,clasIds,null,null); + fingerpostNum=homeStatisticsService.countStatisticsNum(clasIds,null); + } + workOrder.setNum(workOrderNum+""); + fingerpost.setNum(fingerpostNum+""); + workOrderList.add(workOrder); + fingerpostList.add(fingerpost); + } + + pieChartAll.setWorkOrderList(workOrderList); + pieChartAll.setFingerpostList(fingerpostList); + + return ResultData.success(pieChartAll); + } + + + + + + @ApiOperation("组织排行榜 type 1 安评价 2 按办结量") + @GetMapping("/getOrganization") + public TableDataInfo<OrganizationEntity> getOrganization(@RequestParam("type") String type) + { + List<OrganizationEntity> guidePlates=homeStatisticsService.getDepartment(); + + if(StringUtils.equals("1",type)) + { + for (OrganizationEntity bean:guidePlates) + { + bean.setNum(0+""); + List<String> ids=iOrganizationChartService.getIds(bean.getId()+""); + + //总评分 + String scoreNum=homeStatisticsService.organizationScore(ids)+""; + int score=0; + if(!StringUtils.isEmpty(scoreNum) && !StringUtils.equals("null",scoreNum)) + { + score=Integer.valueOf(scoreNum); + } + + //总数量 + int allNum=homeStatisticsService.organizationNum(ids); + + if(allNum>0 && score>0) + { + java.text.DecimalFormat weekDf=new java.text.DecimalFormat("##.#");//传入格式模板 + String workEfficiency=weekDf.format((float)score/(float)allNum); + bean.setNum(workEfficiency); + } + } + } + else + { + for (OrganizationEntity bean:guidePlates) + { + bean.setNum(0+""); + List<String> ids=iOrganizationChartService.getIds(bean.getId()+""); + //总数量 + int allNum=homeStatisticsService.organizationNum(ids); + if(allNum>0) + { + bean.setNum(allNum+""); + } + } + } + + OrganizationEntity entity=null; + for(int i = 0 ;i< guidePlates.size() -1; i++) { + for (int j = 0; j < guidePlates.size() - 1 - i; j++) { + + if(Float.valueOf(guidePlates.get(j).getNum())>Float.valueOf(guidePlates.get(j+1).getNum())) + { + entity=guidePlates.get(j); + guidePlates.set(j,guidePlates.get(j+1)); + guidePlates.set(j+1,entity); + } + } + } + + Collections.reverse(guidePlates); + + return getDataTable(guidePlates,guidePlates.size()); + } + + + + @ApiOperation("导办人员排行榜 type 1 安评价 2 按办结量 3 按超时") + @GetMapping("/getGuidePlate") + public TableDataInfo<GuidePlate> getGuidePlate(@RequestParam("type") String type) + { + int allNum=homeStatisticsService.staffNum(null); + + if(StringUtils.equals("1",type)) + { + //安评价 + return getDataTable(homeStatisticsService.score(null),allNum); + } + else if(StringUtils.equals("2",type)) + { + //2 按办结量 + return getDataTable(homeStatisticsService.guidePlatePeople(null),allNum); + } + else + { + //3 按超时 + return getDataTable(homeStatisticsService.timeout(null),allNum); + } + } + + + @ApiOperation("办事指南排行榜 type 1 按浏览量 2 按办结量") + @GetMapping("/getGuidance") + public TableDataInfo<Guidance> getGuidance(@RequestParam("type") String type) + { + int allNum=homeStatisticsService.countWork(null); + if(StringUtils.equals("1",type)) + { + return getDataTable(homeStatisticsService.guidanceBrowse(null),allNum); + } + else + { + return getDataTable(homeStatisticsService.guidanceTransaction(null),allNum); + } + + } + + + + @ApiOperation("导办工单按区域统计") + @GetMapping("/getRangeStatistics") + public TableDataInfo<RangeStatistics> getRangeStatistics() + { + List<AreaCode2022> code2022s=iAreaCodeService.getListByPCode("510400000000"); + + List<RangeStatistics> rangeStatistics=new ArrayList<>(); + + for (AreaCode2022 bean:code2022s) + { + RangeStatistics range=new RangeStatistics(); + range.setName(bean.getName()); + + List<String> ids; + + if(bean.getCode()==510401000000L) + { + ids=homeStatisticsService.countId(""); + } + else + { + ids=homeStatisticsService.countId(bean.getCode()+""); + } + int num=0; + if(ids!=null&&ids.size()>0) + { + num=homeStatisticsService.rangeStatistics(ids); + } + range.setNum(num+""); + rangeStatistics.add(range); + } + + + return getDataTable(rangeStatistics); + } + + + /** + * 小程序用户访问量统计1.累计访问量2.本年访问量 3.本月访问量 4.今日访问量 5.昨日访问 + * @return + */ + @ApiOperation(value = "小程序用户访问量统计1.累计访问量2.本年访问量 3.本月访问量 4.今日访问量 5.昨日访问",response = AppletUserCount.class) + @GetMapping("/selectUserRecordCount") + public ResultData selectUserRecordCount(){ + return iSysUserRecordService.selectUserRecordCount(); + } + + /** + * 小程序用户访问量统计1.近15天 2.近30天 3.近一年 + * @return + */ + @ApiOperation(value = "小程序用户访问量统计1.近15天 2.近30天 3.近一年",response = AppletUserCount.class) + @GetMapping("/selectByDateType") + public ResultData selectByDateType(@RequestParam("dateType") Integer dateType){ + return iSysUserRecordService.selectByDateType(dateType); + } + + + + + /*************************************************** 部门数据统计 start **********************************************************/ + + + @ApiOperation("部门数据根据选择的时间段 筛选导办工单数 timeType:1 本年度 15 近15天的 30 近30天的") + @GetMapping("/department/getSelectionTimeOrder") + public ResultData<CountList> getDepartmentOrder(@RequestParam("timeType") Integer timeType,@RequestParam("ids") List<String> ids) + { + if(ids==null || ids.size()<1) + { + return ResultData.success(); + } + + if(timeType<1) + { + return ResultData.error("请输入时间"); + } + + if(timeType==1) + { + Calendar calendar=Calendar.getInstance(); + timeType=calendar.get(Calendar.DAY_OF_YEAR); + } +// System.out.println(timeType); + //1 本年度 15 近15天的 30 近30天的 + List<CountListNum> listOne=iGuideRepairOrderService.countListNum("2",ids,timeType); + List<CountListNum> listTwo=iGuideRepairOrderService.countListNum("3",ids,timeType); + CountList countList=new CountList(); + countList.setWaitDealWithList(listOne); + countList.setHaveDealWith(listTwo); + return ResultData.success(countList); + } + + @ApiOperation("部门数据首页统计不同时间段的工单数量") + @GetMapping("/department/getTimeWorkOrder") + public ResultData<TimeWorkOrder> getDepartmentTimeWorkOrder(@RequestParam("ids") List<String> ids) + { + if(ids==null || ids.size()<1) + { + return ResultData.success(); + } + + + //1 今天 2昨天 3本月 4本年度 + //累计全部 本年 本月 今日 昨日 + TimeWorkOrder timeWorkOrder=new TimeWorkOrder(); + timeWorkOrder.setAllNum(iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,null,null,null,null)); + timeWorkOrder.setYearNum(iGuideRepairOrderService.countStatisticsNum(null,ids,"4",null,null,null,null,null)); + timeWorkOrder.setMonthNum(iGuideRepairOrderService.countStatisticsNum(null,ids,"3",null,null,null,null,null)); + timeWorkOrder.setTodayNum(iGuideRepairOrderService.countStatisticsNum(null,ids,"1",null,null,null,null,null)); + timeWorkOrder.setYesterdayNum(iGuideRepairOrderService.countStatisticsNum(null,ids,"2",null,null,null,null,null)); + return ResultData.success(timeWorkOrder); + } + + + @ApiOperation("部门数据首页统计不同状态工单数") + @GetMapping("/department/getWorkOrder") + public ResultData<WorkOrder> getDepartmentWorkOrder(@RequestParam("ids") List<String> ids) + { + if(ids==null || ids.size()<1) + { + return ResultData.success(); + } + WorkOrder workOrder=new WorkOrder(); + //状态(1待分配 2 待办结 3 已办结 4 待评价 5 已取消) + workOrder.setAllNum(iGuideRepairOrderService.countStatisticsNum("",ids,null,null,null,null,null,null)); + workOrder.setWaitDistribution(iGuideRepairOrderService.countStatisticsNum("1",ids,null,null,null,null,null,null)); + workOrder.setWaitDealWith(iGuideRepairOrderService.countStatisticsNum("2",ids,null,null,null,null,null,null)); + workOrder.setHaveDealWith(iGuideRepairOrderService.countStatisticsNum("3",ids,null,null,null,null,null,null)); + workOrder.setRemainEvaluated(iGuideRepairOrderService.countStatisticsNum("4",ids,null,null,null,null,null,null)); + workOrder.setCanceled(iGuideRepairOrderService.countStatisticsNum("5",ids,null,null,null,null,null,null)); + // //服务状态(1.已解决 2.未解决) + workOrder.setUnsolved(iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,null,null,"2",null)); + workOrder.setResolved(iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,null,null,"1",null)); + + //是否超时 (1 未超时 2已超时) 超时未办结 + workOrder.setOvertime(iGuideRepairOrderService.countStatisticsNum(null,ids,null,"2",null,null,null,null)); +// 超时未办结 + workOrder.setOvertimeWaitDealWith(iGuideRepairOrderService.countStatisticsNum("2",ids,null,"2",null,null,null,null)); + return ResultData.success(workOrder); + } + + @ApiOperation("部门数据获取效率比值") + @GetMapping("/department/getEfficiency") + public ResultData<EfficiencyEntity> getDepartmentEfficiency(@RequestParam("ids") List<String> ids) { - WorkOrder workOrder=new WorkOrder(); + if(ids==null || ids.size()<1) + { + return ResultData.success(); + } + + EfficiencyEntity entity=new EfficiencyEntity(); + //总工单数 + int allNum=iGuideRepairOrderService.countStatisticsNum("",ids,null,null,null,null,null,null); + + java.text.DecimalFormat weekDf=new java.text.DecimalFormat("##.##%");//传入格式模板 + + int bj=iGuideRepairOrderService.countStatisticsNum("3",ids,null,null,null,null,null,null); + if(bj!=0) + { + // 好评率=评价为满意的导办工单数量/已办结状态工单数量 + String goodReputationEfficiency=weekDf.format((float)(iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,"1",null,null,null) + /(float)bj)); + entity.setGoodReputationEfficiency(goodReputationEfficiency); + + // 解决率=已解决状态的导办工单数量/已办结状态工单数量 + String resolveEfficiency=weekDf.format((float)(iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,null,null,"1",null) + /(float)bj)); + entity.setResolveEfficiency(resolveEfficiency); + + if(allNum!=0) + { +// 办结率=待评价+已办结状态的导办工单数量/总工单数量 + String workEfficiency=weekDf.format((float)((iGuideRepairOrderService.countStatisticsNum("4",ids,null,null,null,null,null,null) + +bj)/(float)allNum)); + entity.setWorkEfficiency(workEfficiency); + } + } + + int cs=iGuideRepairOrderService.countStatisticsNum(null,ids,null,"2",null,null,null,null); + if(cs!=0) + { + // 超时办结率=超时状态下的待评价+已办结状态的导办工单数量/超时状态的导办工单数量 + String timeoutEfficiency=weekDf.format((float)((iGuideRepairOrderService.countStatisticsNum("4",ids,null,"2",null,null,null,null) + +iGuideRepairOrderService.countStatisticsNum("3",ids,null,"2",null,null,null,null)) + /(float)cs)); + entity.setTimeoutEfficiency(timeoutEfficiency); + + } + + if(allNum!=0) + { + // 回复率=最新进展里大于0条回复的导办工单数量/总工单数量 + //状态(1待分配 2 待办结 3 已办结 4 待评价 5 已取消 6未解决 7已解决 8 系统自动分配 9 回复 10转派 11手动分配) + + String num=(homeStatisticsService.reversionRate("9",null)); + if(!StringUtils.isEmpty(num)) + { + String reversionRate=weekDf.format(Float.valueOf(num)/(float)allNum); + entity.setReversionRate(reversionRate); + } + } - - return ResultData.success(); + return ResultData.success(entity); } + @ApiOperation("部门数据 工单 办事指南饼状图数据") + @GetMapping("/department/getPieChart") + public ResultData<PieChartAll> getDepartmentPieChart(@RequestParam("ids") List<String> ids) + { + if(ids==null || ids.size()<1) + { + return ResultData.success(); + } + + PieChartAll pieChartAll=new PieChartAll(); + pieChartAll.setWorkOrderNum(iGuideRepairOrderService.countStatisticsNum("",ids,null,null,null,null,null,null)+""); + pieChartAll.setFingerpostNum(homeStatisticsService.countStatisticsNum(null,ids)+""); + List<PieChart> workOrderList=new ArrayList<>(); + List<PieChart> fingerpostList=new ArrayList<>(); + List<ClassifyAdministration> oneIds=homeStatisticsService.getClassify(null,"1"); + for (ClassifyAdministration oneClassify:oneIds) + { + PieChart workOrder=new PieChart(); + PieChart fingerpost=new PieChart(); + workOrder.setName(oneClassify.getClassifyName()); + fingerpost.setName(oneClassify.getClassifyName()); + List<ClassifyAdministration> twoIds = homeStatisticsService.getClassify(oneClassify.getId()+"",null); + + List clasIds=new ArrayList(); + + clasIds.add(oneClassify.getId()); + for (ClassifyAdministration classify:twoIds) + { + clasIds.add(classify.getId()); + } + int workOrderNum=0; + int fingerpostNum=0; + if(clasIds.size()>0) + { + workOrderNum=iGuideRepairOrderService.countStatisticsNum(null,ids,null,null,null,clasIds,null,null); + fingerpostNum=homeStatisticsService.countStatisticsNum(clasIds,ids); + } + workOrder.setNum(workOrderNum+""); + fingerpost.setNum(fingerpostNum+""); + workOrderList.add(workOrder); + fingerpostList.add(fingerpost); + } + + pieChartAll.setWorkOrderList(workOrderList); + pieChartAll.setFingerpostList(fingerpostList); + + return ResultData.success(pieChartAll); + } + + + @ApiOperation("部门数据导办人员排行榜 type 1 安评价 2按工单量 3按办结量 4 按未办结量 5 按超时") + @GetMapping("/department/getGuidePlate") + public TableDataInfo<GuidePlate> getDepartmentGuidePlate(@RequestParam("type") String type,@RequestParam("ids") List<String> ids) + { + if(ids==null || ids.size()<1) + { + return getDataTable(new ArrayList<>()); + } + + int allNum=homeStatisticsService.staffNum(ids); + + if(StringUtils.equals("1",type)) + { + //安评价 + return getDataTable(homeStatisticsService.score(ids),allNum); + } + else if(StringUtils.equals("2",type)) + { + //2按工单量 + return getDataTable(homeStatisticsService.workunit(ids),allNum); + } + else if(StringUtils.equals("3",type)) + { + //3 按办结量 + return getDataTable(homeStatisticsService.guidePlatePeople(ids),allNum); + } + else if(StringUtils.equals("4",type)) + { + //4按未办结量 + return getDataTable(homeStatisticsService.tosettled(ids),allNum); + } + else + { + //5 按超时 + return getDataTable(homeStatisticsService.timeout(ids),allNum); + } + + } + + + @ApiOperation("部门数据办事指南排行榜 type 1 按浏览量 2 按办结量") + @GetMapping("/department/getGuidance") + public TableDataInfo<Guidance> getDepartmentGuidance(@RequestParam("type") String type,@RequestParam("ids") List<String> ids) + { + if(ids==null || ids.size()<1) + { + return getDataTable(new ArrayList<>()); + } + + int allNum=homeStatisticsService.countWork(ids); + if(StringUtils.equals("1",type)) + { + return getDataTable(homeStatisticsService.guidanceBrowse(ids),allNum); + } + else + { + return getDataTable(homeStatisticsService.guidanceTransaction(ids),allNum); + } + + } + + + + /*************************************************** 部门数据统计 end **********************************************************/ + + + /** + * 统计访问量 + * @return + */ + @ApiOperation("统计访问量") + @GetMapping("/countSmartConsulting") + public ResultData countSmartConsulting(){ + return ResultData.success(iAutomessageSmartConsultingService.countSmartConsulting()) ; + } + + + + + + } -- Gitblit v1.7.1