Merge branch 'huacheng_test' into haucheng_panzhihua
| | |
| | | */ |
| | | @ApiOperation(value = "获取法律法规政策文件列表(分页)",response = AutomessagePolicyDocuments.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)", required = true, dataType = "String", paramType = "query") |
| | | @ApiImplicitParam(name = "type", value = "类型(1.法律法规2.政策文件)", required = true, dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "isPortal", value = "是否门户网(1.是 2.否) 不传则是门户网", required = true, dataType = "String", paramType = "query") |
| | | |
| | | }) |
| | | @GetMapping("/selectConfigList") |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | |
| | | @RequestParam(value = "name",required = false) String name, |
| | | @RequestParam(value = "type",required = false) String type, |
| | | @RequestParam(value = "departmentId",required = false) Integer departmentId, |
| | | @RequestParam(value = "isPortal",required = false) String isPortal, |
| | | @CurrentUser SysUser sysUser){ |
| | | Page<AutomessagePolicyDocuments> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids=null; |
| | | if (sysUser!=null&&(sysUser.getUserType().equals("2")||sysUser.getIsDivisionHead().equals("1"))){ |
| | | ids=iOrganizationChartService.getDepartmentId(sysUser.getDepartmentId()); |
| | | if ( (isPortal != null && isPortal.equals("2"))&&sysUser!=null&&(sysUser.getUserType().equals("2")||sysUser.getIsDivisionHead().equals("1"))){ |
| | | if (sysUser.getDepartmentId()!=null) |
| | | ids=iOrganizationChartService.getDepartmentId(sysUser.getDepartmentId()); |
| | | } |
| | | List<AutomessagePolicyDocuments> list = iAutomessagePolicyDocumentsService.selectConfigList(pageParam,pageSize,name,type,sysUser,departmentId,ids); |
| | | return getDataTable(list,iAutomessagePolicyDocumentsService.selectCountList(name,type,departmentId,ids)); |
| | |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Page<ElseAccessoryEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<String> ids= PermissionUtil.getStairDepartment(sysUser,iOrganizationChartService); |
| | | List<ElseAccessoryEntity> list; |
| | | if (sysUser.getUserType().equals("1")||sysUser.getIsDivisionHead().equals("1")){ |
| | | list = iElseAccessoryService.selectConfigList(pageParam,pageSize,name,ids,null); |
| | |
| | | public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "keyword",required = false) String keyword, |
| | | @RequestParam(value = "isDivisionHead",required = false) String isDivisionHead, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(pageNum, "pageNum can not be empty"); |
| | | Assert.notNull(pageSize, "pageSize can not be empty"); |
| | | Page<SysUser> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<SysUser> list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword,ids,null); |
| | | |
| | | int num=IUserService.selectNum("2",keyword,ids,null); |
| | | List<SysUser> list ; |
| | | int num; |
| | | if (isDivisionHead!=null&&!isDivisionHead.equals("")){ |
| | | list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword,ids,isDivisionHead); |
| | | num=IUserService.selectNum("2",keyword,ids,isDivisionHead); |
| | | } |
| | | else{ |
| | | list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword,ids,null); |
| | | num=IUserService.selectNum("2",keyword,ids,null); |
| | | } |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增导办用户接口") |
| | | @PostMapping("/add") |
| | | @Authorization |
| | | public ResultData insertConfig(@RequestBody SysUser config) |
| | | public ResultData insertConfig(@RequestBody SysUser config,@CurrentUser SysUser sysUser) |
| | | { |
| | | Assert.notNull(config, "parameter can not be empty"); |
| | | |
| | |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | user.setRoleIds("13"); |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | user.setDataPermission(config.getMoreDepartmentIds()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | user.setDataPermission(config.getDepartmentId()); |
| | | } |
| | | user.setRoleIds("2"); |
| | | } |
| | | user.setUserType("2"); |
| | | user.setIsDivisionHead(config.getIsDivisionHead()); |
| | | user.setStatus(config.getStatus()); |
| | | user.setUpdateTime(LocalDateTime.now()); |
| | | user.setDepartmentIds(config.getDepartmentIds()); |
| | | user.setDepartmentIdStr(config.getDepartmentIdStr()); |
| | | user.setMoreDepartmentIds(config.getMoreDepartmentIds()); |
| | | user.setMattersIds(config.getMattersIds()); |
| | | user.setMasterNames(config.getMasterNames()); |
| | | user.setMattersNames(config.getMattersNames()); |
| | | if (config.getMoreDepartmentIds()!=null&&config.getMoreDepartmentIds().indexOf(",")>0) |
| | | user.setDataPermission(config.getMoreDepartmentIds().substring(config.getMoreDepartmentIds().indexOf(",")+1)); |
| | | //提示用户名或密码错误 |
| | | return toAjax(IUserService.updateConfig(user)); |
| | | } |
| | |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | config.setRoleIds("13"); |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | config.setDataPermission(config.getMoreDepartmentIds()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | config.setDataPermission(config.getDepartmentId()); |
| | | } |
| | | config.setRoleIds("2"); |
| | | } |
| | | config.setCreateBy(sysUser.getUserId()); |
| | | config.setCreateTime(LocalDateTime.now()); |
| | | config.setUpdateTime(LocalDateTime.now()); |
| | | config.setUserId(Snowflake.getId()+""); |
| | | if (config.getMoreDepartmentIds()!=null&&config.getMoreDepartmentIds().indexOf(",")>0) |
| | | config.setDataPermission(config.getMoreDepartmentIds().substring(config.getMoreDepartmentIds().indexOf(",")+1)); |
| | | config.setIsDivisionHead(config.getIsDivisionHead()); |
| | | return toAjax(IUserService.insertConfig(config)); |
| | | } |
| | |
| | | //是否是部门领导(1是 2不是) |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | config.setRoleIds("13"); |
| | | if (config.getMoreDepartmentIds()!=null&&config.getMoreDepartmentIds().indexOf(",")>0) |
| | | config.setDataPermission(config.getMoreDepartmentIds().substring(config.getMoreDepartmentIds().indexOf(",")+1)); |
| | | else |
| | | config.setDataPermission("0"); |
| | | config.setRoleIds("13"); |
| | | } |
| | | else |
| | | { |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | config.setDataPermission(config.getDepartmentId()); |
| | | } |
| | | config.setRoleIds("2"); |
| | | } |
| | | |
| | |
| | | { |
| | | // 超时办结率=超时状态下的待评价+已办结状态的导办工单数量/超时状态的导办工单数量 |
| | | String timeoutEfficiency=weekDf.format((float)((iGuideRepairOrderService.countStatisticsNum("4",null,null,"2",null,null,null,null) |
| | | +iGuideRepairOrderService.countStatisticsNum("3",null,null,null,null,null,null,null)) |
| | | +iGuideRepairOrderService.countStatisticsNum("3",null,null,"2",null,null,null,null)) |
| | | /(float)cs)); |
| | | entity.setTimeoutEfficiency(timeoutEfficiency); |
| | | |
| | |
| | | { |
| | | // 超时办结率=超时状态下的待评价+已办结状态的导办工单数量/超时状态的导办工单数量 |
| | | 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)) |
| | | +iGuideRepairOrderService.countStatisticsNum("3",ids,null,"2",null,null,null,null)) |
| | | /(float)cs)); |
| | | entity.setTimeoutEfficiency(timeoutEfficiency); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("部门数据导办人员排行榜 type 1 安评价 2 按办结量 3 按超时 4按工单量 5 按未办结量") |
| | | @ApiOperation("部门数据导办人员排行榜 type 1 安评价 2按工单量 3按办结量 4 按未办结量 5 按超时") |
| | | @GetMapping("/department/getGuidePlate") |
| | | public TableDataInfo<GuidePlate> getDepartmentGuidePlate(@RequestParam("type") String type,@RequestParam("ids") List<String> ids) |
| | | { |
| | |
| | | } |
| | | else if(StringUtils.equals("2",type)) |
| | | { |
| | | //2 按办结量 |
| | | return getDataTable(homeStatisticsService.guidePlatePeople(ids),allNum); |
| | | //2按工单量 |
| | | return getDataTable(homeStatisticsService.workunit(ids),allNum); |
| | | } |
| | | else if(StringUtils.equals("3",type)) |
| | | { |
| | | //3 按超时 |
| | | return getDataTable(homeStatisticsService.timeout(ids),allNum); |
| | | //3 按办结量 |
| | | return getDataTable(homeStatisticsService.guidePlatePeople(ids),allNum); |
| | | } |
| | | else if(StringUtils.equals("4",type)) |
| | | { |
| | | //按工单量 |
| | | return getDataTable(homeStatisticsService.workunit(ids),allNum); |
| | | //4按未办结量 |
| | | return getDataTable(homeStatisticsService.tosettled(ids),allNum); |
| | | } |
| | | else |
| | | { |
| | | //按未办结量 |
| | | return getDataTable(homeStatisticsService.tosettled(ids),allNum); |
| | | //5 按超时 |
| | | return getDataTable(homeStatisticsService.timeout(ids),allNum); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询机构列表 |
| | | */ |
| | | @ApiOperation(value = "查询可切换机构列表",response = OrganizationChartEntity.class) |
| | | @GetMapping("switch/getList") |
| | | @Authorization |
| | | public TableDataInfo switchGetList(@CurrentUser SysUser sysUser) |
| | | { |
| | | List<String> ids=new ArrayList<>(); |
| | | if(!StringUtils.isEmpty(sysUser.getMoreDepartmentIds())) |
| | | { |
| | | if(sysUser.getMoreDepartmentIds().indexOf(",")==-1) |
| | | { |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | else |
| | | { |
| | | String[] list=sysUser.getMoreDepartmentIds().split(","); |
| | | for (String id:list) |
| | | { |
| | | ids.add(id); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ids.add(sysUser.getDepartmentId()); |
| | | } |
| | | |
| | | return getDataTable(iOrganizationChartService.selectConfigList(ids)); |
| | | } |
| | | } |
| | |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<String> ids=PermissionUtil.getStairDepartment(sysUser,iOrganizationChartService); |
| | | List<ReplyTemplateEntity> list; |
| | | if (sysUser.getUserType().equals("1")||sysUser.getIsDivisionHead().equals("1")){ |
| | | list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids,null); |
| | |
| | | @ApiOperation(value = "修改设置信息",response = AutomessageSysSettings.class) |
| | | @PostMapping("/update") |
| | | @Authorization |
| | | ResultData update(@RequestBody AutomessageSysSettings automessageSysSettings,@CurrentUser SysUser sysUser){ |
| | | public ResultData update(@RequestBody AutomessageSysSettings automessageSysSettings,@CurrentUser SysUser sysUser){ |
| | | automessageSysSettings.setUpdateUserId(sysUser.getUserId()); |
| | | automessageSysSettings.setUpdateTime(LocalDateTime.now()); |
| | | if (automessageSysSettings.getTimeoutRemindNum()>(automessageSysSettings.getTimeoutNotificationNum()*60)){ |
| | | return ResultData.error("系统提醒时间不能大于系统通知时间*60"); |
| | | } |
| | | return sysSettingsService.update(automessageSysSettings); |
| | | } |
| | | |
| | |
| | | public TableDataInfo<TransactionEvent> selectConfigList(@RequestBody List<String> DepartmentId, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | // List<String> ids=iOrganizationChartService.getIds(DepartmentId); |
| | | if(DepartmentId==null||DepartmentId.size()<1) |
| | | { |
| | | DepartmentId=null; |
| | | } |
| | | List<TransactionEvent> list = iTransactionEventService.selectConfigList(null,null,DepartmentId); |
| | | int num=iTransactionEventService.countNum(null,null,DepartmentId); |
| | | return getDataTable(list,num); |
| | |
| | | @GetMapping("/queryByClassifyIdConfigList") |
| | | public TableDataInfo queryByClassifyIdConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam("classifyId") String classifyId, |
| | | @RequestParam(value = "classifyId",required = false) String classifyId, |
| | | @RequestParam(required = false,name="departmentId") Integer departmentId){ |
| | | Assert.notNull(pageNum, "pageNum 不能为空"); |
| | | Assert.notNull(pageSize, "pageSize 不能为空"); |
| | |
| | | { |
| | | boolean a = false; |
| | | String fileName = file.getOriginalFilename(); |
| | | Integer b = iTransactionEventService.batchImport(fileName, file); |
| | | Integer b = iTransactionEventService.batchImport(fileName, file); |
| | | if (b == 3) {// |
| | | return ResultData.success("全部导入成功");//全部导入成功 |
| | | } else if (b == 2) { |
| | |
| | | map.put("userType", user.getUserType()); |
| | | map.put("departmentId", user.getDepartmentId()); |
| | | map.put("departmentName", user.getDepartmentName()); |
| | | map.put("moreDepartmentIds", user.getMoreDepartmentIds()); |
| | | |
| | | return ResultData.success(map); |
| | | } |
| | |
| | | map.put("userType", user.getUserType()); |
| | | map.put("departmentId", user.getDepartmentId()); |
| | | map.put("departmentName", user.getDepartmentName()); |
| | | map.put("moreDepartmentIds", user.getMoreDepartmentIds()); |
| | | |
| | | return ResultData.success(map); |
| | | } |
| | |
| | | return error("账户不能为空"); |
| | | } |
| | | |
| | | config.setUserType("3"); |
| | | |
| | | config.setUpdateBy(sys.getUserId()+""); |
| | | |
| | | return toAjax(IUserService.updateConfig(config)); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation("切换部门接口") |
| | | @GetMapping(value = "/switch/department") |
| | | public ResultData switchDepartment(@RequestParam(value = "departmentId",required = false) String departmentId, |
| | | @CurrentUser SysUser sysUse) |
| | | { |
| | | sysUse.setDepartmentId(departmentId); |
| | | return toAjax(IUserService.updateConfig(sysUse)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | /** |
| | | * 创建人id |
| | | */ |
| | | @ApiModelProperty(name = "id", value = "创建人id") |
| | | @ApiModelProperty(name = "createUserId", value = "创建人id") |
| | | private String createUserId; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(name = "isDelete", value = "是否能删除修改") |
| | | private Integer isDelete; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "createUserName", value = "创建人") |
| | | private String createUserName; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty("角色id") |
| | | private String roleIds; |
| | | |
| | | /** |
| | | * 前端使用 |
| | | */ |
| | | @ApiModelProperty("前端使用") |
| | | private String departmentIdStr; |
| | | |
| | | /** |
| | | * 数据权限 |
| | | */ |
| | |
| | | private String departmentIds; |
| | | |
| | | |
| | | @ApiModelProperty("多部门ids") |
| | | private String moreDepartmentIds; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("办理事项名称") |
| | | private String mattersNames; |
| | |
| | | */ |
| | | public List<OrganizationChartEntity> selectConfigList(String parentId,String grade,List<String> ids); |
| | | |
| | | |
| | | public List<OrganizationChartEntity> selectConfigList(List<String> ids); |
| | | |
| | | /** |
| | | * 新增机构 |
| | | */ |
| | |
| | | */ |
| | | List<String> getDepartmentId(String id); |
| | | |
| | | |
| | | /** |
| | | * 获取该部门的一级部门 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | String getStairId(String id); |
| | | |
| | | } |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | for (GuideRepairOrder guideRepairOrder : guideRepairOrders) { |
| | | transactionEventMapper.selectOne(new QueryWrapper<TransactionEvent>().lambda().eq(TransactionEvent::getId, guideRepairOrder.getMatterId())); |
| | | SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, guideRepairOrder.getGuideUserId())); |
| | | if (sysUser != null) { |
| | | smsUtil.sendSmsOvertime(sysUser.getPhonenumber(), sysUser.getUserName()); |
| | |
| | | baseMapper.updateById(guideRepairOrder); |
| | | return ResultData.success("删除评论成功"); |
| | | } else { |
| | | ResultData.error("已办结的单据才能进行删除评论操作"); |
| | | return ResultData.error("已办结的单据才能进行删除评论操作"); |
| | | } |
| | | } else { |
| | | ResultData.error("只能部门领导和超级管理员才能删除评论"); |
| | | return ResultData.error("只能部门领导和超级管理员才能删除评论"); |
| | | } |
| | | return ResultData.error(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<OrganizationChartEntity> selectConfigList(List<String> ids) { |
| | | List<OrganizationChartEntity> ocList=baseMapper.selectConfigList(null,null,ids); |
| | | return ocList; |
| | | } |
| | | |
| | | @Override |
| | | public int insertConfig(OrganizationChartEntity entity) { |
| | | return baseMapper.insertConfig(entity); |
| | | } |
| | |
| | | return departmentIds; |
| | | } |
| | | |
| | | @Override |
| | | public String getStairId(String id) |
| | | { |
| | | OrganizationChartEntity entity= baseMapper.selectConfigById(id); |
| | | if(entity!=null && StringUtils.isEmpty(entity.getParentId())) |
| | | { |
| | | return entity.getId()+""; |
| | | } |
| | | else |
| | | { |
| | | return getParentId(entity.getParentId()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id 获取一级部门id 递归 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public String getParentId(String id) |
| | | { |
| | | String ultimatelyId; |
| | | OrganizationChartEntity entity= baseMapper.selectConfigById(id); |
| | | if(entity==null) |
| | | { |
| | | return id; |
| | | } |
| | | |
| | | if(!StringUtils.isEmpty(entity.getParentId())) |
| | | { |
| | | ultimatelyId= getParentId(entity.getParentId()); |
| | | return ultimatelyId; |
| | | } |
| | | else |
| | | { |
| | | ultimatelyId=entity.getId()+""; |
| | | return ultimatelyId; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public String parentId(String id){ |
| | | String parentId=id; |
| | |
| | | package com.dg.core.util; |
| | | |
| | | import com.dg.core.controller.OrganizationController; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.service.impl.OrganizationChartImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过部门id 获取一级部门下的全部子部门以及一级部门 |
| | | * @param sysUser |
| | | * @param iOrganizationChartService |
| | | * @return |
| | | */ |
| | | public static List<String> getStairDepartment(SysUser sysUser,IOrganizationChartService iOrganizationChartService) |
| | | { |
| | | if(StringUtils.equals("1", sysUser.getUserType())) |
| | | { |
| | | //管理员 |
| | | List<String> ids=null; |
| | | return ids; |
| | | } |
| | | else |
| | | { |
| | | //获取一级部门id |
| | | String stairId= iOrganizationChartService.getStairId(sysUser.getDepartmentId()); |
| | | List<String> ids=iOrganizationChartService.getIds(stairId); |
| | | return ids; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <resultMap type="com.dg.core.db.gen.entity.ElseAccessoryEntity" id="ElseAccessoryEntityResult"> |
| | | <id property="id" column="id" /> |
| | | <id property="departmentId" column="department_id" /> |
| | | <id property="createUserId" column="create_user_id" /> |
| | | <id property="createTime" column="create_time" /> |
| | | <id property="updateTime" column="update_time" /> |
| | | <id property="name" column="name" /> |
| | |
| | | SELECT |
| | | id, |
| | | department_id, |
| | | create_user_id, |
| | | (select organization_name from automessage_organization_chart where automessage_organization_chart.id=automessage_else_accessory.department_id) as departmentName, |
| | | create_time, |
| | | update_time, |
| | | (select automessage_sys_user.user_name from automessage_sys_user where automessage_sys_user.user_id=automessage_sys_user.create_user_id) as createUserName, |
| | | url, |
| | | name |
| | | FROM |
| | |
| | | url, |
| | | name, |
| | | create_user_id, |
| | | (select automessage_sys_user.user_name from automessage_sys_user where |
| | | automessage_sys_user.user_id=automessage_else_accessory.create_user_id) as createUserName, |
| | | <if test="userId!=null and userId!=''"> |
| | | (case create_user_id when #{userId} then 1 else 0 end)isDelete |
| | | </if> |
| | |
| | | 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 |
| | | (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=3 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if>) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | |
| | | 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 |
| | | ( format((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 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | )/(select count(id) from automessage_guide_repair_order |
| | | WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if>),1) |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | |
| | | 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.is_timeout=2 |
| | | (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 <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | |
| | | 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 |
| | | (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 |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | ) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | |
| | | 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 |
| | | (select count(id) from automessage_guide_repair_order WHERE automessage_guide_repair_order.guide_user_id=automessage_sys_user.user_id |
| | | <if test="ids != null"> |
| | | and guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if>) as num |
| | | FROM automessage_sys_user |
| | | <where> |
| | | user_type=2 |
| | |
| | | |
| | | <!-- 组织排行榜 按评价 --> |
| | | <select id="organizationScore" resultType="int"> |
| | | SELECT sum(IF(evaluate_state='1',10,IF(evaluate_state='2',5,0))) |
| | | SELECT sum(IF(evaluate_state='1',10,IF(evaluate_state='2',5,0))) |
| | | FROM automessage_guide_repair_order |
| | | WHERE department_id in |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </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 |
| | | SELECT matter_name as name ,(select count(id) from automessage_guide_repair_order |
| | | where automessage_guide_repair_order.matter_id=automessage_transaction_event.id |
| | | <if test="ids != null"> |
| | | and automessage_guide_repair_order.guide_department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | ) as num |
| | | from automessage_transaction_event |
| | | <where> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | |
| | | <result property="isDivisionHead" column="is_division_head" /> |
| | | <result property="mattersIds" column="matters_ids" /> |
| | | <result property="departmentIds" column="department_ids" /> |
| | | <result property="moreDepartmentIds" column="more_department_ids" /> |
| | | <result property="departmentIdStr" column="department_id_str" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSysUserVo"> |
| | |
| | | second_level_id, |
| | | matters_ids, |
| | | department_ids, |
| | | more_department_ids, |
| | | department_id_str, |
| | | (SELECT GROUP_CONCAT(matter_name) FROM automessage_transaction_event WHERE id in (SELECT |
| | | substring_index(substring_index(matters_ids,',', b.help_topic_id + 1), ',', -1) result |
| | | FROM |
| | |
| | | automessage_guide_repair_order.guide_department_id=automessage_sys_user.department_id) as transactionEndNum, |
| | | (select role_name from automessage_role_management where automessage_role_management.id=role_ids) as roleName, |
| | | (select permission from automessage_role_management where automessage_role_management.id=role_ids) as permission, |
| | | (select organization_name from automessage_organization_chart where automessage_sys_user.department_id=automessage_organization_chart.id) as department_name |
| | | (SELECT organization_name FROM automessage_organization_chart WHERE automessage_organization_chart.id=department_id) as department_name |
| | | FROM |
| | | automessage_sys_user |
| | | </sql> |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectData" parameterType="string" resultMap="SysUserResult"> |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectListByDepartmentId" resultMap="SysUserResult"> |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''"> |
| | | and (matters_ids like concat('%',#{classifyIdFront}, '%') or matters_ids like concat('%',#{classifyIdAfter}, '%')) |
| | | and (concat(',',matters_ids, ',') like concat('%',#{classifyIdFront}, '%') or concat(',',matters_ids, ',') like concat('%',#{classifyIdAfter}, '%')) |
| | | </if> |
| | | |
| | | </where> |
| | | order by transaction_num |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.SysUser"> |
| | | insert ignore into automessage_sys_user ( |
| | |
| | | <if test="isDivisionHead != null and isDivisionHead != '' ">,is_division_head</if> |
| | | <if test="mattersIds != null ">,matters_ids</if> |
| | | <if test="departmentIds != null ">,department_ids</if> |
| | | <if test="moreDepartmentIds != null ">,more_department_ids</if> |
| | | <if test="departmentIdStr != null ">,department_id_str</if> |
| | | )values( |
| | | sysdate() |
| | | <if test="userId != null and userId != '' ">,#{userId}</if> |
| | |
| | | <if test="isDivisionHead != null and isDivisionHead != '' ">,#{isDivisionHead}</if> |
| | | <if test="mattersIds != null">,#{mattersIds}</if> |
| | | <if test="departmentIds != null ">,#{departmentIds}</if> |
| | | <if test="moreDepartmentIds != null ">,#{moreDepartmentIds}</if> |
| | | <if test="departmentIdStr != null ">,#{departmentIdStr}</if> |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="isDivisionHead != null and isDivisionHead != '' ">,is_division_head=#{isDivisionHead}</if> |
| | | <if test="mattersIds != null">,matters_ids=#{mattersIds}</if> |
| | | <if test="departmentIds != null ">,department_ids=#{departmentIds}</if> |
| | | <if test="moreDepartmentIds != null ">,more_department_ids=#{moreDepartmentIds}</if> |
| | | <if test="departmentIdStr != null ">,department_id_str=#{departmentIdStr}</if> |
| | | ,update_time=sysdate() |
| | | </set> |
| | | where user_id= #{userId} |
| | |
| | | |
| | | |
| | | <select id="queryMatterNameList" resultMap="TransactionEventEntityResult"> |
| | | <include refid="selectTransactionEventEntityVo"/> |
| | | select id,matter_name from automessage_transaction_event |
| | | <where> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND (matter_name like concat('%', #{matterName}, '%') ) |
| | |
| | | </select> |
| | | |
| | | <select id="queryAssociateNamesList" resultMap="TransactionEventEntityResult"> |
| | | <include refid="selectTransactionEventEntityVo"/> |
| | | select id,matter_name from automessage_transaction_event |
| | | <where> |
| | | <if test="associateNames != null and associateNames != ''"> |
| | | AND (associate_names like concat('%', #{associateNames}, '%') ) |
| | |
| | | </select> |
| | | |
| | | <select id="selectSearchList" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | select id, title, content,classify_id, type,parentClassifyId from ( select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | select distinct classify_id, content,type,parentClassifyId from ( 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, |
| | | classify_id,(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id) parentClassifyId, |
| | |
| | | @RequestParam(value = "id",required = false) @ApiParam("id,level=1不传2行业分中心id 3街道id 4社区id")Long id){ |
| | | return communityService.expertShowList(level,id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("专家详情展示") |
| | | @GetMapping("/expert/detail") |
| | | public R expertInfo(@RequestParam("id")Long id){ |
| | | return communityService.expertShowList(7,id ); |
| | | } |
| | | } |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/shopFlower/") |
| | | @Api(tags = {"商城服务"}) |
| | | @Api(tags = {"花城商城服务"}) |
| | | public class ShopFlowerApi extends BaseController { |
| | | |
| | | @Resource |
| | |
| | | @PostMapping("orderDetail") |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R orderDetail(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDetail(orderId); |
| | | return communityService.orderDetailFlower(orderId); |
| | | } |
| | | |
| | | @ApiOperation(value = "取消订单") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /* @ApiOperation(value = "统计当前用户订单", response = OrderStatisticsVO.class) |
| | | @PostMapping("orderStatistics") |
| | | public R orderStatistics() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | return communityService.orderStatistics(loginUserInfo.getUserId()); |
| | | }*/ |
| | | |
| | | @ApiOperation(value = "小程序微信调起支付") |
| | | @PostMapping("wxpay") |
| | | public R wxPay(@RequestBody OrderPayDTO orderPayDTO) { |
| | |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | orderPayDTO.setOpenId(loginUserInfo.getOpenid()); |
| | | return communityService.wxPay(orderPayDTO); |
| | | return communityService.wxPayFlower(orderPayDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | return communityService.pageOrderByStoreId(pageComFlowerOrderListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询我的店铺各类统计数据") |
| | | @GetMapping("/selectCountByStoreId") |
| | | public R selectCountByStoreId(Long storeId){ |
| | | return communityService.selectCountByStoreId(storeId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("createRefundOrder") |
| | | @ApiOperation(value = "创建退款订单") |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return communityService.createRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 用户 分页查询退款订单 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "退款订单分页查询 用户",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | pageComOrderRefundDTO.setUserId(this.getUserId()); |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("updateRefundOrder") |
| | | @ApiOperation(value = "修改退款订单") |
| | | public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return communityService.updateRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | @ApiOperation(value = "商家后台-退款申请统计") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | return communityService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | } |
| | |
| | | notifyOrderDTO.setCashFee(cashFee); |
| | | |
| | | // 根据订单号修改订单信息 |
| | | communityService.wxOrderPayNotify(notifyOrderDTO); |
| | | communityService.wxOrderPayNotifyFlower(notifyOrderDTO); |
| | | |
| | | // 封装 返回值 |
| | | StringBuffer buffer = new StringBuffer(); |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "自提点id") |
| | | private Integer pointId; |
| | | private Long pointId; |
| | | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long storeId; |
| | |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "商家用户id", hidden = true) |
| | | private Long backstageUserId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther yh |
| | | * @create 2022-11-08 17:25:45 |
| | | * @describe 统计订单数VO |
| | | */ |
| | | @Data |
| | | @ApiModel("根据商品统计日、月、年、累计订单量") |
| | | public class ComShopOrderStoreIdCountVO { |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订 |
| | | */ |
| | | @ApiModelProperty("订单数量") |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 统计名称 |
| | | */ |
| | | @ApiModelProperty("统计名称") |
| | | private String countName; |
| | | } |
| | |
| | | * @date 2022-09-07 11:23:51 |
| | | */ |
| | | @GetMapping("/status/calculate") |
| | | R calculate(); |
| | | R calculate(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "id",required = false)Long id); |
| | | |
| | | /** |
| | | * 事件范围筛选列表 |
| | |
| | | R wxPayFlower(@RequestBody OrderPayDTO orderPayDTO); |
| | | |
| | | /** |
| | | * 统计查询订单数量 |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByDeliveryType") |
| | | R selectCountByDeliveryType(Integer deliveryType); |
| | | |
| | | /** |
| | | * 获取社区动态置顶banner |
| | | * @param communityId 社区id |
| | | * */ |
| | | @PostMapping("/easyphoto/getUserRewardsNew") |
| | | R getUserRewardsNew(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 统计查询订单数量 |
| | | * @param deliveryType |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByDeliveryType") |
| | | R selectCountByDeliveryType(@RequestParam("deliveryType") Integer deliveryType,@RequestParam("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByStoreId") |
| | | R selectCountByStoreId(Long storeId); |
| | | |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/createRefundOrder") |
| | | R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/pageRefundOrder") |
| | | R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO); |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/updateRefundOrder") |
| | | R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO); |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountGroupStatus") |
| | | R selectCountGroupStatus(Long storeId); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("事件各种状态(处理状态1待处理2待验证3专家已受理4专家未受理,拒绝5调解中6已结案归档7调解取消8 已删除)数据统计") |
| | | @GetMapping("/status/calculate") |
| | | public R calculate() { |
| | | return comEventService.calculate(); |
| | | public R calculate(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "id",required = false)Long id) { |
| | | return comEventService.calculate(level, id); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopFlowerRefundOrderDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | return communityService.getAllGoodsCategories(); |
| | | } |
| | | |
| | | @ApiOperation(value = "统计查询订单数量") |
| | | @GetMapping("/order/selectCountByDeliveryType") |
| | | public R selectCountByDeliveryType(Integer deliveryType){ |
| | | return communityService.selectCountByDeliveryType(deliveryType); |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "deliveryType", value = "1.自提 2.快递"), |
| | | @ApiImplicitParam(name = "storeId", value = "商店id")}) |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId){ |
| | | return communityService.selectCountByDeliveryType(deliveryType,storeId); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家查询 订单_分页列表", response = ComShopOrderSearchVO.class) |
| | |
| | | return communityService.orderDetailFlower(orderId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "分页查询",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | @ApiOperation(value = "商家后台-退款申请统计") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | return communityService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("事件各种状态(处理状态1待处理2待验证3专家已受理4专家未受理,拒绝5调解中6已结案归档7调解取消8 已删除)数据统计") |
| | | @GetMapping("/status/calculate") |
| | | public R calculate() { |
| | | return comEventService.calculate(); |
| | | public R calculate(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "id",required = false)Long id) { |
| | | return comEventService.calculate(level, id); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @ApiOperation("事件各种状态(处理状态1待处理2待验证3专家已受理4专家未受理,拒绝5调解中6已结案归档7调解取消8 已删除)数据统计") |
| | | @GetMapping("/status/calculate") |
| | | public R calculate() { |
| | | return comEventService.calculate(getLoginUserInfo()); |
| | | public R calculate(@RequestParam(value = "level",required = false)Integer level,@RequestParam(value = "id",required = false)Long id) { |
| | | return comEventService.calculate(getLoginUserInfo(),level,id); |
| | | } |
| | | |
| | | /** |
| | |
| | | private ComShopFlowerEvaluateService comShopFlowerEvaluateService; |
| | | @Resource |
| | | private ComShopFlowerOrderDeliveryService comShopFlowerOrderDeliveryService; |
| | | @Resource |
| | | private ComShopFlowerRefundOrderService comShopFlowerRefundOrderService; |
| | | |
| | | |
| | | /** |
| | |
| | | return comShopFlowerOrderService.wxPay(orderPayDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询订单总数 |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCountByDeliveryType") |
| | | public R selectCountByDeliveryType(Integer deliveryType){ |
| | | return comShopFlowerOrderService.selectCountByDeliveryType(deliveryType); |
| | | public R selectCountByDeliveryType(@RequestParam("deliveryType") Integer deliveryType,@RequestParam("storeId") Long storeId){ |
| | | return comShopFlowerOrderService.selectCountByDeliveryType(deliveryType,storeId); |
| | | } |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCountByStoreId") |
| | | public R selectCountByStoreId(Long storeId){ |
| | | return comShopFlowerOrderService.selectCountByStoreId(storeId); |
| | | } |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("createRefundOrder") |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return comShopFlowerRefundOrderService.createRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | return comShopFlowerRefundOrderService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("updateRefundOrder") |
| | | public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return comShopFlowerRefundOrderService.updateRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | return comShopFlowerRefundOrderService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | |
| | |
| | | * @return 商品列表 |
| | | */ |
| | | IPage<ComShopFlowerGoodsVO> pageShopGoodByApps(@Param("page") Page page, @Param("comShopFlowerGoodsDTO") ComShopFlowerGoodsDTO comShopFlowerGoodsDTO); |
| | | |
| | | /** |
| | | * 商店内在售商品 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | Integer selectCountSaleByStoreId(@Param("storeId") Long storeId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderListDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderStoreListVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderSearchVO; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | List<ComShopOrderCountVO> selectCountByDeliveryType(@Param("deliveryType") Integer deliveryType); |
| | | List<ComShopOrderCountVO> selectCountByDeliveryType(@Param("deliveryType") Integer deliveryType,@Param("storeId") Long storeId); |
| | | |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectCountByStoreId(@Param("storeId") Long storeId,@Param("deliveryType") Integer deliveryType); |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectSumAmountByStoreId(@Param("storeId") Long storeId); |
| | | } |
| | |
| | | */ |
| | | @Mapper |
| | | public interface ComShopFlowerOrderPayDAO extends BaseMapper<ComShopFlowerOrderPayDO> { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerRefundOrderDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderMapper |
| | |
| | | @Mapper |
| | | public interface ComShopFlowerRefundOrderDAO extends BaseMapper<ComShopFlowerRefundOrderDO> { |
| | | /** |
| | | * 分页查询 |
| | | * 用户 分页查询退款订单 |
| | | * @param page |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | IPage<ComShopFlowerRefundOrderVO> pageRefundOrder(@Param("page") Page page, @Param("pageComOrderRefundDTO") PageComOrderRefundDTO pageComOrderRefundDTO); |
| | | |
| | | Integer selectCountByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | List<ComShopOrderCountVO> selectCountGroupStatus(@Param("storeId") Long storeId); |
| | | |
| | | } |
| | |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | R selectCountByDeliveryType(Integer deliveryType); |
| | | R selectCountByDeliveryType(Integer deliveryType,Long storeId); |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R selectCountByStoreId(Long storeId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R updateRefundOrder(ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO); |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R selectCountGroupStatus(Long storeId); |
| | | } |
| | |
| | | |
| | | R reappoint(Long id, Long specialistId); |
| | | |
| | | R calculate(LoginUserInfoVO loginUserInfo); |
| | | R calculate(LoginUserInfoVO loginUserInfo,Integer level,Long id); |
| | | |
| | | R archiveRequest(ComEventArchiveVO comEventArchiveVO, LoginUserInfoVO sysUser); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R calculate(LoginUserInfoVO loginUserInfoVO) { |
| | | public R calculate(LoginUserInfoVO loginUserInfoVO,Integer level,Long id) { |
| | | ComEvent comEvent=new ComEvent(); |
| | | Boolean isExpertCheck=false; |
| | | Long expertId=null; |
| | |
| | | if (nonNull(user.getAppId())){ |
| | | comEvent.setAppId(user.getAppId()); |
| | | } |
| | | if (nonNull(level) && nonNull(id)){ |
| | | comEvent.setLevel(level); |
| | | comEvent.setSearchId(id); |
| | | comEvent.setUserType(null); |
| | | } |
| | | List<ComEventCalculateVO> calculateList = baseMapper.calculate(comEvent); |
| | | ComEventCalculateVO comEventCalculateVO =new ComEventCalculateVO(); |
| | | comEventCalculateVO.setStatus("0"); |
| | |
| | | }else if (i==4){ |
| | | vo.setId(4L); |
| | | vo.setChildList(comSanshuoIndustryCenterDao.communityList()); |
| | | vo.setName("社区调解站"); |
| | | vo.setName("社区调解室"); |
| | | }else if(i==1){ |
| | | vo.setId(1L); |
| | | vo.setName("三说会堂"); |
| | |
| | | List<ExpertRangeVO> list = new ArrayList<>(); |
| | | ExpertRangeVO vo = new ExpertRangeVO(); |
| | | vo.setLevel(4); |
| | | vo.setName(comStreetDO.getName() + "调解站"); |
| | | vo.setName(comStreetDO.getName() + "调解室"); |
| | | vo.setId(loginUserInfo.getCommunityId()); |
| | | list.add(vo); |
| | | return R.ok(list); |
| | |
| | | @Override |
| | | public R expertShowList(Integer level, Long id,String appId) { |
| | | QueryWrapper<ComSanshuoExpert> wrapper=new QueryWrapper<>(); |
| | | wrapper.eq("level",level); |
| | | wrapper.eq("app_id",appId); |
| | | wrapper.eq("status",1 ); |
| | | wrapper.eq("del_flag",1 ); |
| | | if (level.equals(2)){ |
| | | wrapper.eq("industry_center_id", id); |
| | | }else if (level.equals(3)){ |
| | | wrapper.eq("street_id",id ); |
| | | }else if (level.equals(4)){ |
| | | wrapper.eq("community_id",id ); |
| | | if (level==0){ |
| | | wrapper.eq("app_id",appId ); |
| | | }else { |
| | | if (level!=7){ |
| | | wrapper.eq("level",level); |
| | | wrapper.eq("app_id",appId); |
| | | wrapper.eq("status",1 ); |
| | | wrapper.eq("del_flag",1 ); |
| | | if (level.equals(2)){ |
| | | wrapper.eq("industry_center_id", id); |
| | | }else if (level.equals(3)){ |
| | | wrapper.eq("street_id",id ); |
| | | }else if (level.equals(4)){ |
| | | wrapper.eq("community_id",id ); |
| | | } |
| | | }else { |
| | | wrapper.eq("id",id ); |
| | | } |
| | | } |
| | | List<ComSanshuoExpert> comSanshuoExperts = comSanshuoExpertDao.selectList(wrapper); |
| | | for (ComSanshuoExpert comSanshuoExpert : comSanshuoExperts) { |
| | |
| | | private ConvenientElevatingPointDAO convenientElevatingPointDAO; |
| | | @Resource |
| | | private ComShopFlowerEvaluateDAO comShopFlowerEvaluateDAO; |
| | | @Resource |
| | | private ComShopFlowerRefundOrderDAO comShopFlowerRefundOrderDAO; |
| | | |
| | | |
| | | @Value("${hcMin.app.isTest}") |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (goodsAttrDO.getSale() < createGoodsDTO.getNum()) { |
| | | if (goodsAttrDO.getStock() < createGoodsDTO.getNum()) { |
| | | return R.fail("该规格库存不足,无法下单"); |
| | | } |
| | | orderGoodsDO.setGoodsAttrId(goodsAttrDO.getId()); |
| | |
| | | shopOrderDO.setOrderNo(orderNo); |
| | | shopOrderDO.setStoreId(storeId); |
| | | shopOrderDO.setUserId(userId); |
| | | //TODO |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.dfk); |
| | | shopOrderDO.setPayStatus(ComShopFlowerOrderDO.payStatus.no); |
| | | shopOrderDO.setReceiverId(orderCreateDTO.getReceiverId()); |
| | |
| | | if (null != pointId) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(pointId); |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointVO, convenientElevatingPointDO); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO, convenientElevatingPointVO); |
| | | orderVO.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | } |
| | | //已完成、已退款才有评论 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByDeliveryType(Integer deliveryType) { |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType); |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId) { |
| | | //1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款 8.总订单 |
| | | String[] statusStr = {"ddps","psz","dsh","dpj","ywc","yqx","ytk"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType,storeId); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | ComShopOrderCountVO comShopOrderCountVO = new ComShopOrderCountVO(); |
| | | comShopOrderCountVO.setStatus(8); |
| | | comShopOrderCountVO.setAmount(0); |
| | | for (int i = 1; i < 8; i++) { |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | | for (int i = 0; i < statusStr.length; i++) { |
| | | if (collect.containsKey(i)) { |
| | | Integer amount = collect.get(i); |
| | | comShopOrderCountVO.setAmount(amount + comShopOrderCountVO.getAmount()); |
| | | amountTotal = amountTotal + amount; |
| | | retMap.put(statusStr[i],amount); |
| | | }else { |
| | | collect.put(i,0); |
| | | retMap.put(statusStr[i],0); |
| | | } |
| | | } |
| | | collect.put(comShopOrderCountVO.getStatus(),comShopOrderCountVO.getAmount()); |
| | | retMap.put("zdd",amountTotal); |
| | | |
| | | return R.ok(collect); |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByStoreId(Long storeId){ |
| | | Map<String,Object> retMap = new HashMap<>(); |
| | | //查询我的店铺订单量 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS = this.baseMapper.selectCountByStoreId(storeId, null); |
| | | Map<String, Integer> zddlMap = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("zddl",zddlMap); |
| | | //查询我的店铺拼单订单 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS1 = this.baseMapper.selectCountByStoreId(storeId, ComShopFlowerOrderDO.deliveryType.store); |
| | | Map<String, Integer> pdddMap = comShopOrderStoreIdCountVOS1.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("pddd",pdddMap); |
| | | //查询我的店铺快递订单 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS2 = this.baseMapper.selectCountByStoreId(storeId, ComShopFlowerOrderDO.deliveryType.express); |
| | | Map<String, Integer> kdddMap = comShopOrderStoreIdCountVOS2.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("kddd",kdddMap); |
| | | |
| | | //拼单订单各状态 |
| | | R r = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.store,storeId); |
| | | retMap.put("pdddStatus",r.getData()); |
| | | |
| | | //快递订单各状态 |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express,storeId); |
| | | retMap.put("kdddStatus",r1.getData()); |
| | | //营业额 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId); |
| | | Map<String, Integer> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("yye",yyeMap); |
| | | //在售商品 |
| | | Integer countSale = comShopFlowerGoodsDAO.selectCountSaleByStoreId(storeId); |
| | | retMap.put("countSale",countSale); |
| | | //退款申请 |
| | | Integer refundOrder = comShopFlowerRefundOrderDAO.selectCountByStoreId(storeId); |
| | | retMap.put("refundOrder",refundOrder); |
| | | |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | |
| | |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.common.utlis.OrderNoUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.common.utlis.wx.WXPayUtil; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderServiceImpl |
| | |
| | | this.baseMapper.updateById(comShopFlowerRefundOrderDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | String[] statusStr = {"clz","tkcg","tksb","yqx","tkz"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountGroupStatus(storeId); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | | for (int i = 0; i < statusStr.length; i++) { |
| | | if (collect.containsKey(i)) { |
| | | Integer amount = collect.get(i); |
| | | amountTotal = amountTotal + amount; |
| | | retMap.put(statusStr[i],amount); |
| | | }else { |
| | | retMap.put(statusStr[i],0); |
| | | } |
| | | } |
| | | retMap.put("zdd",amountTotal); |
| | | return R.ok(retMap); |
| | | } |
| | | } |
| | |
| | | //服务最远距离 km |
| | | Integer serviceRange = convenientMerchantDO.getServiceRange(); |
| | | |
| | | Map<Object, Object> around = MapDistance.getAround(convenientMerchantDO.getLat(), convenientMerchantDO.getLon(), serviceRange * 1000 + ""); |
| | | Map<Object, Object> around = MapDistance.getAround(convenientMerchantDO.getLat(), convenientMerchantDO.getLon(), serviceRange * 1000d); |
| | | String maxLat = around.get("maxLat").toString(); |
| | | String minLat = around.get("minLat").toString(); |
| | | String minLng = around.get("minLng").toString(); |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @Date: 2022/11/11 15:21 |
| | | * @Description: 经纬度处理 |
| | | */ |
| | | @Slf4j |
| | | public class MapDistance { |
| | | private static double EARTH_RADIUS = 6378.137; |
| | | |
| | |
| | | * 最大经度 maxLng |
| | | * 最大纬度 minLat |
| | | */ |
| | | public static Map<Object,Object> getAround(String latStr, String lngStr, String raidus) { |
| | | public static Map<Object,Object> getAround(String latStr, String lngStr, double raidusMile) { |
| | | log.info("latStr:"+latStr+",lngStr:"+lngStr+",raidusMile:"+raidusMile); |
| | | Map<Object,Object> map = new HashMap<Object,Object>(); |
| | | |
| | | Double latitude = Double.parseDouble(latStr);// 传值给经度 |
| | | Double longitude = Double.parseDouble(lngStr);// 传值给纬度 |
| | | |
| | | Double degree = (24901 * 1609) / 360.0; // 获取每度 |
| | | double raidusMile = Double.parseDouble(raidus); |
| | | // double raidusMile = Double.parseDouble(raidus); |
| | | |
| | | Double mpdLng = Double.parseDouble((degree * Math.cos(latitude * (Math.PI / 180))+"").replace("-", "")); |
| | | Double dpmLng = 1 / mpdLng; |
| | |
| | | System.out.println(getDistance("30.57568","103.962128","30.636726","103.957232")); |
| | | |
| | | //103.842654,30.560987 |
| | | System.out.println(getAround("103.842654", "30.560987", "5000")); |
| | | System.out.println(getAround("107.075277", "30.456085", 5000d)); |
| | | //117.01028712333508(Double), 117.22593287666493(Double), |
| | | //36.44829619896034(Double), 36.92138380103966(Double) |
| | | |
| | | //104.03035080138962(String), 104.12020319861038(String), 30.271352899925574(String), 30.64081710007443(String) |
| | | distanceOfTwoPoints("30.57568","103.962128","30.636726","103.957232"); |
| | | } |
| | | |
| | |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO"> |
| | | SELECT ccep.*,count(csfo.id) delivery_order_num ,sum(og.amount) delivery_goods_num |
| | | FROM com_convenient_elevating_point ccep |
| | | LEFT JOIN com_shop_flower_order ON ccep.id = csfo.point_id |
| | | LEFT JOIN com_shop_flower_order csfo ON ccep.id = csfo.point_id |
| | | LEFT JOIN com_shop_flower_order_goods og ON og.order_id = csfo.id |
| | | WHERE |
| | | csfo.`status` = 1 |
| | |
| | | AND type=4 |
| | | </if> |
| | | <if test="comEvent.level == 2"> |
| | | AND type=1 AND center_id=#{comEvent.searchId} |
| | | AND center_id=#{comEvent.searchId} AND current_process_type=1 |
| | | </if> |
| | | <if test="comEvent.level == 3"> |
| | | AND type=3 AND request_user_community in (select community_id from com_act where street_id=#{comEvent.searchId}) |
| | | AND request_user_community in (select community_id from com_act where street_id=#{comEvent.searchId}) AND current_process_type=3 |
| | | </if> |
| | | <if test="comEvent.level == 4"> |
| | | AND type=2 AND request_user_community=#{comEvent.searchId} |
| | | AND request_user_community=#{comEvent.searchId} AND current_process_type=2 |
| | | </if> |
| | | </if> |
| | | </if> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="comEvent.level != null and comEvent.level != ''"> |
| | | <if test="comEvent.level == 2"> |
| | | AND center_id=#{comEvent.searchId} AND current_process_type=1 |
| | | </if> |
| | | <if test="comEvent.level == 3"> |
| | | AND request_user_community in(select community_id from com_act where street_id = #{comEvent.searchId}) AND current_process_type=3 |
| | | </if> |
| | | <if test="comEvent.level == 4"> |
| | | AND request_user_community=#{comEvent.searchId} AND current_process_type=2 |
| | | </if> |
| | | </if> |
| | | </where> |
| | | group by event_process_status |
| | | </select> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="comEvent.level != null and comEvent.level != ''"> |
| | | <if test="comEvent.searchId != null and comEvent.searchId != ''"> |
| | | <if test="comEvent.level == 1"> |
| | | AND type=4 |
| | | </if> |
| | | <if test="comEvent.level == 2"> |
| | | AND center_id=#{comEvent.searchId} AND current_process_type=1 |
| | | </if> |
| | | <if test="comEvent.level == 3"> |
| | | AND request_user_community in (select community_id from com_act where street_id=#{comEvent.searchId}) AND current_process_type=3 |
| | | </if> |
| | | <if test="comEvent.level == 4"> |
| | | AND request_user_community=#{comEvent.searchId} AND current_process_type=2 |
| | | </if> |
| | | </if> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="dateAnalysis" resultType="com.panzhihua.common.model.vos.sanshuo.IndexDateVO"> |
| | |
| | | </select> |
| | | <select id="streetList" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertRangeVO"> |
| | | select street_id as id,name from com_street where app_id='wx0cef797390444b75' |
| | | and street_id in (1552661132500668416,1552661143879815168,1552661135428292608,1552661138704044032,1552661136451702784,1552661139563876352) |
| | | </select> |
| | | <select id="communityList" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertRangeVO"> |
| | | select community_id as id,name from com_act |
| | | where app_id='wx0cef797390444b75' |
| | | where app_id='wx0cef797390444b75' and street_id in (1552661132500668416,1552661143879815168,1552661135428292608,1552661138704044032,1552661136451702784,1552661139563876352) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test='comShopFlowerGoodsDTO.categoriesId != null '>AND cgs.goods_category_id = #{comShopFlowerGoodsDTO.categoriesId}</if> |
| | | order by sale desc,create_at desc |
| | | </select> |
| | | <select id="selectCountSaleByStoreId" resultType="java.lang.Integer"> |
| | | select count(1) from com_shop_flower_goods where store_id = #{storeId} and `status` = 1 and delete_status = 1 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="pageOrderBy" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderSearchVO"> |
| | | SELECT distinct sr.id, sr.store_id, sr.user_id, su.phone AS userName , sr.order_no, sr.pay_no, |
| | | SELECT sr.id, sr.store_id, sr.user_id, su.phone AS userName , sr.order_no, sr.pay_no, |
| | | sr.wx_tarde_no, sr.status, sr.pay_status, sr.receiver_id, |
| | | sr.total_amount, sr.discount_amount, sr.pay_amount, sr.pay_type, |
| | | sr.pay_time, sr.delivery_type, sr.delivery_status, sr.logistics_company, |
| | | sr.logistics_no, sr.create_at, uad.name as receiver_name, uad.phone as receiver_phone, |
| | | group_concat(og.goods_name) |
| | | as goodsName, ss.name as store_name ,ccep.adress |
| | | as goodsName, ss.name as store_name ,ccep.address |
| | | FROM com_shop_flower_order sr LEFT JOIN com_shop_flower_order_goods og ON sr.id = og.order_id |
| | | LEFT JOIN com_shop_flower_goods_attr ga ON og.goods_attr_id = ga.id |
| | | LEFT JOIN sys_user su ON sr.user_id = su.user_id |
| | |
| | | AND ss.id = #{pageComShopOrderSearchDTO.storeId} |
| | | </if> |
| | | <if test='pageComShopOrderSearchDTO.storeUserId != null '> |
| | | AND ss.sys_user_id = #{pageComShopOrderSearchDTO.storeUserId} |
| | | AND ss.user_id = #{pageComShopOrderSearchDTO.storeUserId} |
| | | </if> |
| | | <if test='pageComShopOrderSearchDTO.deliveryType != null '> |
| | | AND sr.delivery_type = #{pageComShopOrderSearchDTO.deliveryType} |
| | |
| | | </select> |
| | | <select id="selectCountByDeliveryType" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderCountVO"> |
| | | SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} GROUP BY `status` |
| | | SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} and store_id = #{storeId} GROUP BY `status` |
| | | </select> |
| | | <select id="selectCountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | |
| | | SELECT count(1) as count,'dayCount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'monthCount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'allCount' as count_name FROM com_shop_flower_order WHERE 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | </select> |
| | | <select id="selectSumAmountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'dayAmount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'monthAmount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'yearAmount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'allAmount' as count_name FROM com_shop_flower_order WHERE `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | refund_time, handle_result, remark |
| | | </sql> |
| | | <select id="pageRefundOrder" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO"> |
| | | select * from com_shop_flower_refund_order where 1=1 |
| | | select ro.* from com_shop_flower_refund_order ro left join com_convenient_merchants cm on ro.store_id = cm.id where 1=1 |
| | | <if test="pageComOrderRefundDTO.status != null"> |
| | | and status = #{pageComOrderRefundDTO.status} |
| | | and ro.status = #{pageComOrderRefundDTO.status} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.storeId != null"> |
| | | and store_id = #{pageComOrderRefundDTO.storeId} |
| | | and ro.store_id = #{pageComOrderRefundDTO.storeId} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.userId != null"> |
| | | and user_id = #{pageComOrderRefundDTO.userId} |
| | | and ro.user_id = #{pageComOrderRefundDTO.userId} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.backstageUserId != null"> |
| | | and cm.user_id = #{pageComOrderRefundDTO.backstageUserId} |
| | | </if> |
| | | </select> |
| | | <select id="selectCountByStoreId" resultType="java.lang.Integer"> |
| | | select count(1) from com_shop_flower_refund_order where 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectCountGroupStatus" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderCountVO"> |
| | | SELECT count(1) amount , `status` FROM `com_shop_flower_refund_order` WHERE 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | GROUP BY `status` |
| | | </select> |
| | | </mapper> |