Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
New file |
| | |
| | | package com.dg.core.api; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.controller.BaseController; |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IAutomessagePolicyDocumentsService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = {"获取法律法规政策文件小程序接口"}) |
| | | @RestController |
| | | @RequestMapping("/applets/AutomessagePolicyDocumentsController") |
| | | public class AutomessagePolicyDocumentsAppletsController extends BaseController { |
| | | |
| | | @Resource |
| | | private IAutomessagePolicyDocumentsService iAutomessagePolicyDocumentsService; |
| | | |
| | | |
| | | /** |
| | | * 获取法律法规政策文件列表(不分页) |
| | | * @param name |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取法律法规政策文件列表(不分页)",response = AutomessagePolicyDocuments.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)", required = true, dataType = "String", paramType = "query") |
| | | }) |
| | | @GetMapping("/selectList") |
| | | public ResultData selectConfigList(@RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "type",required = false) String type, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId){ |
| | | List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(name,type,departmentId); |
| | | return ResultData.success(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取法律法规政策文件数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 根据id获取法律法规政策文件数据 ",response = AutomessagePolicyDocuments.class) |
| | | @GetMapping("/selectAutomessagePolicyDocumentById") |
| | | @Authorization |
| | | public ResultData selectAutomessagePolicyDocumentById(@RequestParam(value = "id") Integer id){ |
| | | AutomessagePolicyDocuments automessagePolicyDocuments = iAutomessagePolicyDocumentsService.selectAutomessagePolicyDocumentById(id); |
| | | if (automessagePolicyDocuments!=null){ |
| | | return ResultData.success(automessagePolicyDocuments); |
| | | }else { |
| | | return ResultData.error("查找失败"); |
| | | } |
| | | } |
| | | } |
| | |
| | | WxUtil wxUtil=new WxUtil(); |
| | | String accessToken="0"; |
| | | try { |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | String userId=null; |
| | | if( StringUtils.equals("2",sysUser.getRoleIds())) |
| | | { |
| | | userId=sysUser.getUserId()+""; |
| | | ids=new ArrayList<>(); |
| | | ids.add(sysUser.getDepartmentId()); |
| | | if(StringUtils.equals("1",sysUser.getIsDivisionHead())) |
| | | { |
| | | ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | } |
| | | else |
| | | { |
| | | userId=sysUser.getUserId()+""; |
| | | ids=new ArrayList<>(); |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | } |
| | | else |
| | | { |
New file |
| | |
| | | package com.dg.core.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IAutomessagePolicyDocumentsService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.Data; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = {"获取法律法规政策文件接口"}) |
| | | @RestController |
| | | @RequestMapping("/AutomessagePolicyDocumentsController") |
| | | public class AutomessagePolicyDocumentsController extends BaseController { |
| | | |
| | | @Resource |
| | | private IAutomessagePolicyDocumentsService iAutomessagePolicyDocumentsService; |
| | | |
| | | /** |
| | | * 获取法律法规政策文件列表(分页) |
| | | * @param name |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取法律法规政策文件列表(分页)",response = AutomessagePolicyDocuments.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)", required = true, dataType = "String", paramType = "query") |
| | | }) |
| | | @GetMapping("/selectConfigList") |
| | | @Authorization |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "type",required = false) String type, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId, |
| | | @CurrentUser SysUser sysUser){ |
| | | Page<AutomessagePolicyDocuments> pageParam = new Page<>(pageNum,pageSize); |
| | | List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(pageParam,pageSize,name,type,sysUser,departmentId); |
| | | return getDataTable(list,iAutomessagePolicyDocumentsService.selectCountList(name,type,departmentId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取法律法规政策文件列表(不分页) |
| | | * @param name |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取法律法规政策文件列表(不分页)",response = AutomessagePolicyDocuments.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)", required = true, dataType = "String", paramType = "query") |
| | | }) |
| | | @GetMapping("/selectList") |
| | | public ResultData selectConfigList(@RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "type",required = false) String type, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId){ |
| | | List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(name,type,departmentId); |
| | | return ResultData.success(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增法律法规政策文件 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 新增法律法规政策文件 ",response = AutomessagePolicyDocuments.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)传参中的type 传入1则是新增的法律规范2则是政策文件", required = true, dataType = "String", paramType = "query") |
| | | }) |
| | | @PostMapping("/add") |
| | | @Authorization |
| | | public ResultData add(@RequestBody AutomessagePolicyDocuments automessagePolicyDocuments,@CurrentUser SysUser sysUser){ |
| | | automessagePolicyDocuments.setCreateUserId(sysUser.getUserId()); |
| | | automessagePolicyDocuments.setUpdateUserId(sysUser.getUserId()); |
| | | int add = iAutomessagePolicyDocumentsService.add(automessagePolicyDocuments); |
| | | if (add>0){ |
| | | return ResultData.success("新增成功"); |
| | | }else { |
| | | return ResultData.error("新增失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改法律法规政策文件 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 新增法律法规政策文件 ",response = AutomessagePolicyDocuments.class) |
| | | @PostMapping("/update") |
| | | @Authorization |
| | | public ResultData update(@RequestBody AutomessagePolicyDocuments automessagePolicyDocuments,@CurrentUser SysUser sysUser){ |
| | | automessagePolicyDocuments.setUpdateUserId(sysUser.getUserId()); |
| | | int update = iAutomessagePolicyDocumentsService.update(automessagePolicyDocuments); |
| | | if (update>0){ |
| | | return ResultData.success("修改成功"); |
| | | }else { |
| | | return ResultData.error("修改失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除法律法规政策文件 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 删除法律法规政策文件 ",response = AutomessagePolicyDocuments.class) |
| | | @DeleteMapping("/delete") |
| | | @Authorization |
| | | public ResultData delete(@RequestParam(value = "id") Integer id){ |
| | | int delete = iAutomessagePolicyDocumentsService.delete(id); |
| | | if (delete>0){ |
| | | return ResultData.success("删除成功"); |
| | | }else { |
| | | return ResultData.error("删除失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据id获取法律法规政策文件数据 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = " 根据id获取法律法规政策文件数据 ",response = AutomessagePolicyDocuments.class) |
| | | @GetMapping("/selectAutomessagePolicyDocumentById") |
| | | @Authorization |
| | | public ResultData selectAutomessagePolicyDocumentById(@RequestParam(value = "id") Integer id){ |
| | | AutomessagePolicyDocuments automessagePolicyDocuments = iAutomessagePolicyDocumentsService.selectAutomessagePolicyDocumentById(id); |
| | | if (automessagePolicyDocuments!=null){ |
| | | return ResultData.success(automessagePolicyDocuments); |
| | | }else { |
| | | return ResultData.error("查找失败"); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.dg.core.CorsConfig; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.db.gen.AjaxResult; |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | @Resource |
| | | RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | |
| | | @RequestMapping("/hello") |
| | |
| | | public ResultData getWeather(@RequestParam(value = "code", required = false) String code) { |
| | | TestDate td = new TestDate(); |
| | | Map weather; |
| | | if (code == null) { |
| | | weather = td.getWeather("510400"); |
| | | if (code == null) {//默认为攀枝花 则从redis上获取redis上定时任务15分钟获取一次天气 |
| | | HashMap weather1 = (HashMap) redisTemplate.opsForValue().get("weather"); |
| | | return ResultData.success(weather1.get("lives")); |
| | | } else { |
| | | weather = td.getWeather(code); |
| | | return ResultData.success(td.getWeather(code)); |
| | | } |
| | | return ResultData.success(weather); |
| | | } |
| | | |
| | | |
| | |
| | | user.setPhonenumber(config.getPhonenumber()); |
| | | user.setLoginName(config.getLoginName()); |
| | | user.setMasterIds(config.getMasterIds()); |
| | | user.setRoleIds("2"); |
| | | //是否是部门领导(1是 2不是) |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | user.setRoleIds("13"); |
| | | } |
| | | else |
| | | { |
| | | user.setRoleIds("2"); |
| | | } |
| | | user.setUserType("2"); |
| | | user.setIsDivisionHead("1"); |
| | | user.setStatus(config.getStatus()); |
| | |
| | | //提示用户名或密码错误 |
| | | return toAjax(IUserService.updateConfig(user)); |
| | | } |
| | | config.setRoleIds(2+""); |
| | | //是否是部门领导(1是 2不是) |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | config.setRoleIds("13"); |
| | | } |
| | | else |
| | | { |
| | | config.setRoleIds("2"); |
| | | } |
| | | config.setCreateTime(LocalDateTime.now()); |
| | | config.setUpdateTime(LocalDateTime.now()); |
| | | config.setUserId(Snowflake.getId()+""); |
| | |
| | | |
| | | config.setUserType("2"); |
| | | |
| | | //是否是部门领导(1是 2不是) |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | config.setRoleIds("13"); |
| | | } |
| | | else |
| | | { |
| | | config.setRoleIds("2"); |
| | | } |
| | | |
| | | SysUser user=IUserService.selectData(null,config.getPhonenumber(),null); |
| | | if (user != null && !(user.getUserId().equals(config.getUserId()))) |
| | | { |
| | | //提示用户名或密码错误 |
| | | return ResultData.error("该手机账户已存在!请更换手机号"); |
| | | } |
| | | return toAjax(IUserService.updateConfig(config)); |
| | | } |
| | | |
| | |
| | | WxUtil wxUtil=new WxUtil(); |
| | | String accessToken="0"; |
| | | try { |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | String userId=null; |
| | | if( StringUtils.equals("2",sysUser.getRoleIds())) |
| | | { |
| | | // if(StringUtils.equals("1",sysUser.getIsDivisionHead())) |
| | | // { |
| | | // userId=null; |
| | | // } |
| | | // else |
| | | // { |
| | | // ids=null; |
| | | // userId=sysUser.getUserId()+""; |
| | | // } |
| | | userId=sysUser.getUserId()+""; |
| | | ids=new ArrayList<>(); |
| | | ids.add(sysUser.getDepartmentId()); |
| | | if(StringUtils.equals("1",sysUser.getIsDivisionHead())) |
| | | { |
| | | ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | } |
| | | else |
| | | { |
| | | userId=sysUser.getUserId()+""; |
| | | ids=new ArrayList<>(); |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | String userId=null; |
| | | if( StringUtils.equals("2",sysUser.getRoleIds())) |
| | | { |
| | | // if(StringUtils.equals("1",sysUser.getIsDivisionHead())) |
| | | // { |
| | | // userId=null; |
| | | // } |
| | | // else |
| | | // { |
| | | // ids=null; |
| | | // userId=sysUser.getUserId()+""; |
| | | // } |
| | | userId=sysUser.getUserId()+""; |
| | | // ids=new ArrayList<>(); |
| | | // ids.add(sysUser.getDepartmentId()); |
| | | if(StringUtils.equals("1",sysUser.getIsDivisionHead())) |
| | | { |
| | | ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | } |
| | | else |
| | | { |
| | | userId=sysUser.getUserId()+""; |
| | | ids=new ArrayList<>(); |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | PieChartAll pieChartAll=new PieChartAll(); |
| | | pieChartAll.setWorkOrderNum(iGuideRepairOrderService.countStatisticsNum("",null,null,null,null,null,null,null)+""); |
| | | pieChartAll.setFingerpostNum(homeStatisticsService.countStatisticsNum(null)+""); |
| | | pieChartAll.setFingerpostNum(homeStatisticsService.countStatisticsNum(null,null)+""); |
| | | List<PieChart> workOrderList=new ArrayList<>(); |
| | | List<PieChart> fingerpostList=new ArrayList<>(); |
| | | List<ClassifyAdministration> oneIds=homeStatisticsService.getClassify(null,"1"); |
| | |
| | | if(clasIds.size()>0) |
| | | { |
| | | workOrderNum=iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,clasIds,null,null); |
| | | fingerpostNum=homeStatisticsService.countStatisticsNum(clasIds); |
| | | fingerpostNum=homeStatisticsService.countStatisticsNum(clasIds,null); |
| | | } |
| | | workOrder.setNum(workOrderNum+""); |
| | | fingerpost.setNum(fingerpostNum+""); |
| | |
| | | @GetMapping("/getGuidePlate") |
| | | public TableDataInfo<GuidePlate> getGuidePlate(@RequestParam("type") String type) |
| | | { |
| | | int allNum=homeStatisticsService.staffNum(); |
| | | int allNum=homeStatisticsService.staffNum(null); |
| | | |
| | | if(StringUtils.equals("1",type)) |
| | | { |
| | | //安评价 |
| | | return getDataTable(homeStatisticsService.score(),allNum); |
| | | return getDataTable(homeStatisticsService.score(null),allNum); |
| | | } |
| | | else if(StringUtils.equals("2",type)) |
| | | { |
| | | //2 按办结量 |
| | | return getDataTable(homeStatisticsService.guidePlatePeople(),allNum); |
| | | return getDataTable(homeStatisticsService.guidePlatePeople(null),allNum); |
| | | } |
| | | else |
| | | { |
| | | //3 按超时 |
| | | return getDataTable(homeStatisticsService.timeout(),allNum); |
| | | return getDataTable(homeStatisticsService.timeout(null),allNum); |
| | | } |
| | | } |
| | | |
| | |
| | | @GetMapping("/getGuidance") |
| | | public TableDataInfo<Guidance> getGuidance(@RequestParam("type") String type) |
| | | { |
| | | int allNum=homeStatisticsService.countWork(); |
| | | int allNum=homeStatisticsService.countWork(null); |
| | | if(StringUtils.equals("1",type)) |
| | | { |
| | | return getDataTable(homeStatisticsService.guidanceBrowse(),allNum); |
| | | return getDataTable(homeStatisticsService.guidanceBrowse(null),allNum); |
| | | } |
| | | else |
| | | { |
| | | return getDataTable(homeStatisticsService.guidanceTransaction(),allNum); |
| | | return getDataTable(homeStatisticsService.guidanceTransaction(null),allNum); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | /*************************************************** 部门数据统计 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) |
| | | { |
| | | |
| | | 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,null,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("/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.guidePlatePeople(ids),allNum); |
| | | } |
| | | else if(StringUtils.equals("3",type)) |
| | | { |
| | | //3 按超时 |
| | | return getDataTable(homeStatisticsService.timeout(ids),allNum); |
| | | } |
| | | else if(StringUtils.equals("4",type)) |
| | | { |
| | | //按工单量 |
| | | return getDataTable(homeStatisticsService.workunit(ids),allNum); |
| | | } |
| | | else |
| | | { |
| | | //按未办结量 |
| | | return getDataTable(homeStatisticsService.tosettled(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 **********************************************************/ |
| | | |
| | | |
| | | |
| | | |
| | |
| | | package com.dg.core.db.gen.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | /** |
| | | * 跳转链接类型(1.富文本2.微信文章) |
| | | */ |
| | | @ApiModelProperty("名称") |
| | | @ApiModelProperty(" 跳转链接类型(1.富文本2.微信文章)") |
| | | private String linkType; |
| | | |
| | | /** |
| | |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty("创建人") |
| | | private Integer createUserId; |
| | | private String createUserId; |
| | | |
| | | /** |
| | | * 修改时间 |
| | |
| | | * 修改人 |
| | | */ |
| | | @ApiModelProperty("修改人") |
| | | private Integer updateUserId; |
| | | private String updateUserId; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("部门名称") |
| | | private String departmentName; |
| | | |
| | | /** |
| | | * 修改人名称 |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("修改人名称") |
| | | private String updateUserName; |
| | | |
| | | /** |
| | | * 创建人名称 |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("创建人名称") |
| | | private String createUserName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("是否能够删除1.可以删除修改 2.不能删除修改") |
| | | private Integer isDelete; |
| | | } |
| | |
| | | /** |
| | | * 用户类型(1系统后台用户 2导办人员用户) |
| | | */ |
| | | @ApiModelProperty("用户类型(1系统后台用户 2导办人员用户 3.部门领导 4.普通用户(小程序用户))") |
| | | @ApiModelProperty("用户类型(1系统后台用户 2导办人员用户 3.普通用户 4.小程序用户") |
| | | private String userType; |
| | | |
| | | |
| | |
| | | package com.dg.core.db.gen.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface AutomessagePolicyDocumentsMapper extends BaseMapper<AutomessagePolicyDocuments> { |
| | | |
| | | List<AutomessagePolicyDocuments> selectConfigList(); |
| | | /** |
| | | * 获取法律法规政策文件 (分页) |
| | | * @param page |
| | | * @param state |
| | | * @param name 名称 |
| | | * @param type 类型 |
| | | * @return |
| | | */ |
| | | List<AutomessagePolicyDocuments> selectConfigList(IPage<AutomessagePolicyDocuments> page, Integer state, @Param("name") String name, @Param("type") String type, @Param("departmentId") Integer departmentId); |
| | | |
| | | |
| | | /** |
| | | * 获取法律法规政策文件 (不分页) |
| | | * @param name 名称 |
| | | * @param type 类型 |
| | | * @return |
| | | */ |
| | | List<AutomessagePolicyDocuments> selectConfigList(@Param("name") String name, @Param("type") String type, @Param("departmentId") Integer departmentId); |
| | | |
| | | |
| | | /** |
| | | * 根据id获取法律法规政策文件数据 |
| | | * @return |
| | | */ |
| | | AutomessagePolicyDocuments selectAutomessagePolicyDocumentById(Integer id); |
| | | |
| | | /** |
| | | * 获取法律法规政策文件 (统计) |
| | | * @return |
| | | */ |
| | | Integer selectCountList(@Param("name") String name, @Param("type") String type,@Param("departmentId") Integer departmentId); |
| | | |
| | | } |
| | |
| | | * 按办结量排序 |
| | | * @return |
| | | */ |
| | | List<GuidePlate> guidePlatePeople(); |
| | | List<GuidePlate> guidePlatePeople(List<String> ids); |
| | | |
| | | /** |
| | | *按评分排序 |
| | | * @return |
| | | */ |
| | | List<GuidePlate> score(); |
| | | List<GuidePlate> score(List<String> ids); |
| | | |
| | | /** |
| | | * 按超时 |
| | | * @return |
| | | */ |
| | | List<GuidePlate> timeout(); |
| | | List<GuidePlate> timeout(List<String> ids); |
| | | |
| | | /** |
| | | * 按未办结 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<GuidePlate> tosettled(List<String> ids); |
| | | |
| | | /** |
| | | * 按工单量 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<GuidePlate> workunit(List<String> ids); |
| | | |
| | | /** |
| | | * 导办人员统计数 |
| | | * @return |
| | | */ |
| | | Integer staffNum(); |
| | | Integer staffNum(List<String> ids); |
| | | |
| | | /** |
| | | * 办事指南数量统计 |
| | | * @return |
| | | */ |
| | | Integer countWork(); |
| | | Integer countWork(List<String> ids); |
| | | |
| | | /** |
| | | * 获取一级部门 |
| | |
| | | * 办事指南根据导办数量排序 |
| | | * @return |
| | | */ |
| | | List<Guidance> guidanceTransaction(); |
| | | List<Guidance> guidanceTransaction(List<String> ids); |
| | | |
| | | /** |
| | | * 办事指南根据浏览数量排序 |
| | | * @return |
| | | */ |
| | | List<Guidance> guidanceBrowse(); |
| | | List<Guidance> guidanceBrowse(List<String> ids); |
| | | |
| | | /** |
| | | * 获取统计数据 首页用 勿动 |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | int countStatisticsNum(@Param("classifyIds") List<String> classifyIds, |
| | | @Param("ids") List<String> ids); |
| | | |
| | | |
| | | /** |
| | |
| | | package com.dg.core.db.manual.pojo; |
| | | |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.KeywordEntity; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | |
| | | @ApiModelProperty("办事部门列表") |
| | | private List<OrganizationChartEntity> organizationChartEntityList; |
| | | |
| | | @ApiModelProperty("政策文件列表") |
| | | private List<AutomessagePolicyDocuments> automessagePolicyDocuments; |
| | | |
| | | @ApiModelProperty("法律法规列表") |
| | | private List<AutomessagePolicyDocuments> regulations; |
| | | |
| | | } |
| | |
| | | package com.dg.core.db.manual.pojo; |
| | | |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.KeywordEntity; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | |
| | | |
| | | @ApiModelProperty("办事部门列表") |
| | | private List<OrganizationChartEntity> organizationChartEntityList; |
| | | |
| | | @ApiModelProperty("政策文件列表") |
| | | private List<AutomessagePolicyDocuments> automessagePolicyDocuments; |
| | | |
| | | @ApiModelProperty("法律法规列表") |
| | | private List<AutomessagePolicyDocuments> regulations; |
| | | } |
| | |
| | | @ApiModelProperty("分类id父id") |
| | | private Integer parentClassifyId; |
| | | |
| | | @ApiModelProperty("搜索数据类型1.办事部门2.办事指南 3.推荐办事指南4.分类") |
| | | @ApiModelProperty("搜索数据类型1.办事部门2.办事指南 3.推荐办事指南4.分类 5.政策文件 6.法律法规") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty("办事指南") |
| | |
| | | * 按办结量排序 |
| | | * @return |
| | | */ |
| | | List<GuidePlate> guidePlatePeople(); |
| | | List<GuidePlate> guidePlatePeople(List<String> ids); |
| | | |
| | | /** |
| | | *按评分排序 |
| | | * @return |
| | | */ |
| | | List<GuidePlate> score(); |
| | | List<GuidePlate> score(List<String> ids); |
| | | |
| | | /** |
| | | * 按超时 |
| | | * @return |
| | | */ |
| | | List<GuidePlate> timeout(); |
| | | List<GuidePlate> timeout(List<String> ids); |
| | | |
| | | /** |
| | | * 按未办结 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<GuidePlate> tosettled(List<String> ids); |
| | | |
| | | /** |
| | | * 按工单量 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | List<GuidePlate> workunit(List<String> ids); |
| | | |
| | | /** |
| | | * 评分 |
| | |
| | | * 办事指南根据导办数量排序 |
| | | * @return |
| | | */ |
| | | List<Guidance> guidanceTransaction(); |
| | | List<Guidance> guidanceTransaction(List<String> ids); |
| | | |
| | | /** |
| | | * 办事指南根据浏览数量排序 |
| | | * @return |
| | | */ |
| | | List<Guidance> guidanceBrowse(); |
| | | List<Guidance> guidanceBrowse(List<String> ids); |
| | | |
| | | /** |
| | | * 导办人员统计数 |
| | | * @return |
| | | */ |
| | | Integer staffNum(); |
| | | Integer staffNum(List<String> ids); |
| | | |
| | | /** |
| | | * 办事指南数量统计 |
| | | * @return |
| | | */ |
| | | Integer countWork(); |
| | | Integer countWork(List<String> ids); |
| | | |
| | | /** |
| | | * 获取统计数据 首页用 勿动 |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | int countStatisticsNum(List<String> classifyIds,List<String> ids); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param classifyGrade |
| | | * @return |
| | | */ |
| | | public List<ClassifyAdministration> getClassify(@Param("parentId") String parentId, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | public List<ClassifyAdministration> getClassify(String parentId, |
| | | String classifyGrade); |
| | | |
| | | |
| | | List<String> countId(String district); |
New file |
| | |
| | | package com.dg.core.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IAutomessagePolicyDocumentsService { |
| | | |
| | | /** |
| | | * 获取法律法规政策文件 (分页) |
| | | * @param page |
| | | * @param state |
| | | * @return |
| | | */ |
| | | List<AutomessagePolicyDocuments> selectConfigList(IPage<AutomessagePolicyDocuments> page, Integer state, String name, String type, SysUser sysUser,Integer departmentId); |
| | | |
| | | /** |
| | | * 获取法律法规政策文件 (不分页) |
| | | * @param name 名称 |
| | | * @param type 类型 |
| | | * @return |
| | | */ |
| | | List<AutomessagePolicyDocuments> selectConfigList(String name, String type,Integer departmentId); |
| | | |
| | | |
| | | /** |
| | | * 新增法律法规政策文件 |
| | | * @return |
| | | */ |
| | | int add(AutomessagePolicyDocuments automessagePolicyDocuments); |
| | | |
| | | /** |
| | | * 修改法律法规政策文件 |
| | | * @return |
| | | */ |
| | | int update(AutomessagePolicyDocuments automessagePolicyDocuments); |
| | | |
| | | /** |
| | | * 删除法律法规政策文件 |
| | | * @return |
| | | */ |
| | | int delete(Integer id); |
| | | |
| | | /** |
| | | * 根据id获取法律法规政策文件数据 |
| | | * @return |
| | | */ |
| | | AutomessagePolicyDocuments selectAutomessagePolicyDocumentById(Integer id); |
| | | |
| | | /** |
| | | * 获取法律法规政策文件 (统计) |
| | | * @return |
| | | */ |
| | | Integer selectCountList(String name,String type,Integer departmentI); |
| | | } |
New file |
| | |
| | | package com.dg.core.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.db.gen.entity.AutomessagePolicyDocuments; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.gen.mapper.AutomessagePolicyDocumentsMapper; |
| | | import com.dg.core.service.IAutomessagePolicyDocumentsService; |
| | | import org.springframework.data.repository.query.Param; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class AutomessagePolicyDocumentsServiceImpl extends ServiceImpl<AutomessagePolicyDocumentsMapper, AutomessagePolicyDocuments> implements IAutomessagePolicyDocumentsService { |
| | | |
| | | @Override |
| | | public List<AutomessagePolicyDocuments> selectConfigList(IPage<AutomessagePolicyDocuments> page, Integer state, String name, String type, SysUser sysUser,Integer departmentId) { |
| | | List<AutomessagePolicyDocuments> automessagePolicyDocumentsList = baseMapper.selectConfigList(page, state, name, type, departmentId); |
| | | for (AutomessagePolicyDocuments automessagePolicyDocuments:automessagePolicyDocumentsList) { |
| | | if(sysUser.getUserType().equals("1")){//超级管理员 |
| | | automessagePolicyDocuments.setIsDelete(1); |
| | | }else if (sysUser.getUserType().equals("3") && sysUser.getIsDivisionHead().equals("1")){//部门领导 |
| | | if (sysUser.getDepartmentId().equals(automessagePolicyDocuments.getDepartmentId())){//如果是一个部门则可以删除 |
| | | automessagePolicyDocuments.setIsDelete(1); |
| | | }else { |
| | | automessagePolicyDocuments.setIsDelete(2); |
| | | } |
| | | } |
| | | else if (sysUser.getUserType().equals("2")){ |
| | | if(sysUser.getUserId().equals(automessagePolicyDocuments.getCreateUserId())){//如果它创建的则可以删除 |
| | | automessagePolicyDocuments.setIsDelete(1); |
| | | }else { |
| | | automessagePolicyDocuments.setIsDelete(2); |
| | | } |
| | | } |
| | | } |
| | | return automessagePolicyDocumentsList; |
| | | } |
| | | |
| | | @Override |
| | | public List<AutomessagePolicyDocuments> selectConfigList(String name, String type,Integer departmentId) { |
| | | return baseMapper.selectConfigList(name,type,departmentId); |
| | | } |
| | | |
| | | @Override |
| | | public int add(AutomessagePolicyDocuments automessagePolicyDocuments) { |
| | | automessagePolicyDocuments.setCreateTime(LocalDateTime.now()); |
| | | automessagePolicyDocuments.setUpdateTime(LocalDateTime.now()); |
| | | return baseMapper.insert(automessagePolicyDocuments); |
| | | } |
| | | |
| | | @Override |
| | | public int update(AutomessagePolicyDocuments automessagePolicyDocuments) { |
| | | automessagePolicyDocuments.setCreateTime(LocalDateTime.now()); |
| | | automessagePolicyDocuments.setUpdateTime(LocalDateTime.now()); |
| | | return baseMapper.updateById(automessagePolicyDocuments); |
| | | } |
| | | |
| | | @Override |
| | | public int delete(Integer id) { |
| | | return baseMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public AutomessagePolicyDocuments selectAutomessagePolicyDocumentById(Integer id) { |
| | | return baseMapper.selectAutomessagePolicyDocumentById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCountList(String name,String type,Integer departmentId) { |
| | | return baseMapper.selectCountList(name,type,departmentId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | WxUtil wxUtil = new WxUtil(); |
| | | String accessToken = "0"; |
| | | try { |
| | | accessToken = stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken = stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | import com.dg.core.db.gen.entity.OrganizationEntity; |
| | | import com.dg.core.db.gen.mapper.HomeStatisticsMapper; |
| | | import com.dg.core.service.HomeStatisticsService; |
| | | import org.springframework.data.repository.query.Param; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | { |
| | | |
| | | @Override |
| | | public List<GuidePlate> guidePlatePeople() { |
| | | return baseMapper.guidePlatePeople(); |
| | | public List<GuidePlate> guidePlatePeople(List<String> ids) { |
| | | return baseMapper.guidePlatePeople(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<GuidePlate> score() { |
| | | return baseMapper.score(); |
| | | public List<GuidePlate> score(List<String> ids) { |
| | | return baseMapper.score(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<GuidePlate> timeout() { |
| | | return baseMapper.timeout(); |
| | | public List<GuidePlate> timeout(List<String> ids) { |
| | | return baseMapper.timeout(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<GuidePlate> tosettled(List<String> ids) { |
| | | return baseMapper.tosettled(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<GuidePlate> workunit(List<String> ids) { |
| | | return baseMapper.workunit(ids); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Guidance> guidanceTransaction() { |
| | | return baseMapper.guidanceTransaction(); |
| | | public List<Guidance> guidanceTransaction(List<String> ids) { |
| | | return baseMapper.guidanceTransaction(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<Guidance> guidanceBrowse() { |
| | | return baseMapper.guidanceBrowse(); |
| | | public List<Guidance> guidanceBrowse(List<String> ids) { |
| | | return baseMapper.guidanceBrowse(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer staffNum() { |
| | | return baseMapper.staffNum(); |
| | | public Integer staffNum(List<String> ids) { |
| | | return baseMapper.staffNum(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer countWork() { |
| | | return baseMapper.countWork(); |
| | | public Integer countWork(List<String> ids) { |
| | | return baseMapper.countWork(ids); |
| | | } |
| | | |
| | | @Override |
| | | public int countStatisticsNum(List<String> classifyIds) { |
| | | return baseMapper.countStatisticsNum(classifyIds); |
| | | public int countStatisticsNum(List<String> classifyIds,List<String> ids) { |
| | | return baseMapper.countStatisticsNum(classifyIds,ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<ClassifyAdministration> getClassify(String parentId, String classifyGrade) { |
| | | return baseMapper.getClassify(parentId,classifyGrade); |
| | |
| | | newUser.setUserId(huaChengSysUser.getUserId()+""); |
| | | newUser.setLoginName(huaChengSysUser.getPhone()); |
| | | newUser.setUserName(huaChengSysUser.getNickName()); |
| | | newUser.setUserType("4"); |
| | | newUser.setUserType("3"); |
| | | newUser.setPhonenumber(huaChengSysUser.getPhone()); |
| | | newUser.setSex(huaChengSysUser.getSex()); |
| | | newUser.setAvatar(huaChengSysUser.getImageUrl()); |
| | |
| | | @Resource |
| | | private GuideRepairOrderMapper guideRepairOrderMapper; |
| | | |
| | | |
| | | @Resource |
| | | private AutomessagePolicyDocumentsMapper automessagePolicyDocumentsMapper; |
| | | |
| | | @Override |
| | | public TransactionEvent selectConfigData(String Id, SysUser sysUser) { |
| | | TransactionEvent transactionEvent = baseMapper.selectConfigData(Id); |
| | |
| | | } |
| | | queryResults.setTransactionEventList(searchesAssociate); |
| | | queryResults.setKeywordEntityList(keywordMapper.selectByName(keyWord)); |
| | | queryResults.setAutomessagePolicyDocuments(automessagePolicyDocumentsMapper.selectConfigList(keyWord,"2",null)); |
| | | queryResults.setRegulations(automessagePolicyDocumentsMapper.selectConfigList(keyWord,"1",null)); |
| | | return queryResults; |
| | | } |
| | | |
| | |
| | | } |
| | | recommendResult.setKeywordEntityList(keywordEntityList); |
| | | List<OrganizationChartEntity> organizationChartEntities = organizationChartMapper.selectByKeyWord(keyWord); |
| | | recommendResult.setAutomessagePolicyDocuments(automessagePolicyDocumentsMapper.selectConfigList(keyWord,"2",null)); |
| | | recommendResult.setRegulations(automessagePolicyDocumentsMapper.selectConfigList(keyWord,"1",null)); |
| | | recommendResult.setOrganizationChartEntityList(organizationChartEntities); |
| | | return recommendResult; |
| | | } |
| | |
| | | // } catch (IOException ioe) { |
| | | // ioe.printStackTrace(); |
| | | // } |
| | | accessToken =wxUtil.stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken =wxUtil.stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | return accessToken; |
| | | } |
| | | |
| | |
| | | <if test="type!=null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="departmentId != null"> |
| | | and department_id in (SELECT id from automessage_organization_chart where id=#{departmentId} or parent_id = #{departmentId}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectCountList" resultType="integer"> |
| | | select count(*) from automessage_policy_documents |
| | | <where> |
| | | <if test="name!=null and name!=''"> |
| | | and name like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="type!=null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="departmentId != null"> |
| | | and department_id in (SELECT id from automessage_organization_chart where id=#{departmentId} or parent_id = #{departmentId}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectAutomessagePolicyDocumentById" resultMap="AutomessagePolicyDocumentsResult"> |
| | | <include refid="selectAutomessagePolicyDocumentsResult" /> |
| | | <where> |
| | | id = #{id} |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | id, |
| | | departmental_id, |
| | | IFNULL( |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.to_user_id=user_id and user_type in (1,2,3)), |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.to_user_id=user_id and user_type in (1,2) or is_division_head=1), |
| | | (select user_name from automessage_sys_user where a.to_user_id=user_id))toUserName, |
| | | IFNULL( |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.from_user_id=user_id and user_type in (1,2,3)), |
| | | (select concat(substring(user_name,1,1),'老师') from automessage_sys_user where a.from_user_id=user_id and user_type in (1,2) or is_division_head=1), |
| | | (select user_name from automessage_sys_user where a.from_user_id=user_id))fromUserName, |
| | | to_user_id, |
| | | from_user_id, |
| | |
| | | user_name as userName, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id) as num |
| | | FROM automessage_sys_user WHERE user_type=2 ORDER BY |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | |
| | | user_name, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | ((select sum(IF(evaluate_state='1',10,IF(evaluate_state='2',5,0))) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id)/(select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id)) as num |
| | | FROM automessage_sys_user WHERE user_type=2 ORDER BY |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id and automessage_guide_repair_order.is_timeout=2 |
| | | ) as num |
| | | FROM automessage_sys_user WHERE user_type=2 ORDER BY |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | |
| | | <!-- 按未办结 --> |
| | | <select id="tosettled" resultType="com.dg.core.db.gen.entity.GuidePlate"> |
| | | SELECT |
| | | user_name as userName, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id and automessage_guide_repair_order.state=2 |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | <!-- 按未办结 --> |
| | | <select id="workunit" resultType="com.dg.core.db.gen.entity.GuidePlate"> |
| | | SELECT |
| | | user_name as userName, |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as departmentNmae, |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | |
| | | <!-- 导办人员统计数 --> |
| | | <select id="staffNum" resultType="int"> |
| | | SELECT count(id) |
| | | FROM automessage_sys_user WHERE user_type=2 |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 获取一级组织 --> |
| | |
| | | <!-- 办事指南 根据导办数量排序 --> |
| | | <select id="guidanceTransaction" resultType="com.dg.core.db.gen.entity.Guidance"> |
| | | SELECT matter_name as name ,transaction_num as num from |
| | | automessage_transaction_event ORDER BY |
| | | num DESC |
| | | automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | | <!-- 办事指南 根据导办数量排序 --> |
| | | <select id="guidanceBrowse" resultType="com.dg.core.db.gen.entity.Guidance"> |
| | | SELECT matter_name as name ,browse_num as num from |
| | | automessage_transaction_event ORDER BY |
| | | num DESC |
| | | automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY num DESC |
| | | LIMIT 10 |
| | | </select> |
| | | |
| | |
| | | <!-- 办事指南 统计数量 --> |
| | | <select id="countWork" resultType="int"> |
| | | SELECT count(id) from automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="departmentName != null and departmentName != '' ">,#{departmentName}</if> |
| | | <if test="departmentArea != null and departmentArea != '' ">,#{departmentArea}</if> |
| | | <if test="leisureState != null and leisureState != '' ">,#{leisureState}</if> |
| | | <if test="masterIds != null and masterIds != '' ">,#{masterIds}</if> |
| | | <if test="masterNames != null and masterNames != '' ">,#{masterNames}</if> |
| | | <if test="masterIds != null ">,#{masterIds}</if> |
| | | <if test="masterNames != null ' ">,#{masterNames}</if> |
| | | <if test="transactionIds != null and transactionIds != '' ">,#{transactionIds}</if> |
| | | <if test="transactionNames != null and transactionNames != '' ">,#{transactionNames}</if> |
| | | <if test="openid != null and openid != '' ">,#{openid}</if> |
| | | <if test="isDivisionHead != null and isDivisionHead != '' ">,#{isDivisionHead}</if> |
| | | <if test="mattersIds != null and mattersIds != '' ">,#{mattersIds}</if> |
| | | <if test="mattersIds != null ">,#{mattersIds}</if> |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="departmentName != null and departmentName != '' ">,department_name=#{departmentName}</if> |
| | | <if test="departmentArea != null and departmentArea != '' ">,department_area=#{departmentArea}</if> |
| | | <if test="leisureState != null and leisureState != '' ">,leisure_state=#{leisureState}</if> |
| | | <if test="masterIds != null and masterIds != '' ">,master_ids=#{masterIds}</if> |
| | | <if test="masterNames != null and masterNames != '' ">,master_names=#{masterNames}</if> |
| | | <if test="masterIds != null ">,master_ids=#{masterIds}</if> |
| | | <if test="masterNames != null ">,master_names=#{masterNames}</if> |
| | | <if test="transactionIds != null and transactionIds != '' ">,transaction_ids=#{transactionIds}</if> |
| | | <if test="transactionNames != null and transactionNames != '' ">,transaction_names=#{transactionNames}</if> |
| | | <if test="openid != null and openid != '' ">,openid=#{openid}</if> |
| | | <if test="isDivisionHead != null and isDivisionHead != '' ">,is_division_head=#{isDivisionHead}</if> |
| | | <if test="mattersIds != null and mattersIds != '' ">,matters_ids=#{mattersIds}</if> |
| | | <if test="mattersIds != null ">,matters_ids=#{mattersIds}</if> |
| | | ,update_time=sysdate() |
| | | </set> |
| | | where user_id= #{userId} |
| | |
| | | select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '>',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content, |
| | | browse_num views,2 type from automessage_transaction_event |
| | | browse_num views,2 type from automessage_transaction_event UNION |
| | | SELECT id ,name title,'政策文件' content,null views,5 type FROM automessage_policy_documents where type=2 UNION |
| | | SELECT id ,name title,'法律法规' content,null views,6 type FROM automessage_policy_documents where type=1 |
| | | ) k |
| | | where k.title like concat('%',#{keyWord}, '%') or k.content like concat('%', #{keyWord}, '%') |
| | | </select> |