| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.dto.*; |
| | | import com.dsh.course.entity.CoursePackageOrderStudent; |
| | | import com.dsh.course.entity.EvaluateStudent; |
| | | import com.dsh.course.feignClient.account.AppUserClient; |
| | | import com.dsh.course.feignClient.account.StudentClient; |
| | | import com.dsh.course.feignClient.account.model.TAppUser; |
| | | import com.dsh.course.feignClient.communityWorldCup.Model.StoreIds; |
| | | import com.dsh.course.feignClient.communityWorldCup.WorldCupClient; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.ListQuery; |
| | | import com.dsh.course.feignClient.course.CoursePackageClient; |
| | |
| | | String formattedDate = dateFormat.format(new Date()); |
| | | model.addAttribute("reDate", formattedDate); |
| | | |
| | | List<TCoursePackagePayment> coursePackagePayments = courseStuddentClient.queryByIds(ids); |
| | | List<CoursePackageOrderStudent> coursePackagePayments = courseStuddentClient.queryByIds(ids); |
| | | |
| | | BigDecimal countAll = new BigDecimal(0); |
| | | |
| | | for (TCoursePackagePayment payment : coursePackagePayments){ |
| | | for (CoursePackageOrderStudent payment : coursePackagePayments){ |
| | | |
| | | //课包名称 |
| | | TCoursePackage tCoursePackage = coursePackageClient.queryById(payment.getCoursePackageId()); |
| | | List<CoursePackageOrder> ordes = courseStuddentClient.getOrder(payment.getId()); |
| | | |
| | | |
| | | |
| | | payment.setName(tCoursePackage.getName()); |
| | | payment.setId(Long.valueOf(tCoursePackage.getId())); |
| | | |
| | | BigDecimal cashPayment = payment.getCashPayment(); |
| | | |
| | | BigDecimal cashPayment = BigDecimal.ZERO; |
| | | for (CoursePackageOrder order : ordes) { |
| | | BigDecimal cashPayment1 = order.getCashPayment(); |
| | | if (cashPayment1 != null) { |
| | | cashPayment = cashPayment.add(cashPayment1); |
| | | } |
| | | } |
| | | payment.setCashPayment(cashPayment); |
| | | // BigDecimal cashPayment = payment.getCashPayment(); |
| | | if (cashPayment==null){ |
| | | cashPayment = BigDecimal.ZERO; |
| | | } |
| | |
| | | |
| | | model.addAttribute("item", tStudentDto); |
| | | if (tStudentDto.getLateralSurface()!=null&&!tStudentDto.equals("")) { |
| | | // String[] pics = tStudentDto.getLateralSurface().split(";"); |
| | | // model.addAttribute("pic1", pics[0]); |
| | | // System.out.println("=====pic1==" + pics[0]); |
| | | // if (pics.length > 1) { |
| | | // model.addAttribute("pic2", pics[1]); |
| | | // System.out.println("=====pic2==" + pics[1]); |
| | | // } |
| | | // if (pics.length > 2) { |
| | | // model.addAttribute("pic3", pics[2]); |
| | | // System.out.println("=====pic3==" + pics[2]); |
| | | // } |
| | | model.addAttribute("images",tStudentDto.getLateralSurface()); |
| | | } |
| | | |
| | |
| | | model.addAttribute("back",false); |
| | | }else { |
| | | model.addAttribute("back",true); |
| | | |
| | | } |
| | | |
| | | return PREFIX + "tStudentEdit.html"; |
| | |
| | | private ISiteBookingService siteBookingService; |
| | | @Autowired |
| | | private BallClient ballClient; |
| | | @Autowired |
| | | private WorldCupClient worldCupClient; |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | List<Integer> ids = new ArrayList<>(); |
| | | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | List<Integer> storeIds = new ArrayList<>(); |
| | | storeIds.add(UserExt.getUser().getObjectId()); |
| | | ListQuery listQuery = new ListQuery(); |
| | | listQuery.setIds(storeIds); |
| | | // 赛事 |
| | | List<Integer> list = competitionClient.getUserIds(listQuery); |
| | | // 获取场地预约记录 拿到用户ids |
| | | List<Integer> siteUsers = siteBookingService.list(new QueryWrapper<SiteBooking>().in("storeId", storeIds)) |
| | | .stream().map(SiteBooking::getAppUserId).collect(Collectors.toList()); |
| | | // 获取课程购买记录 拿到用户ids |
| | | List<Integer> cpUsers = coursePackageClient.getCoursePackageByStoreIds(storeIds); |
| | | // 获取游戏记录 拿到用户ids |
| | | List<Integer> gameUsers = ballClient.getGameByStoreIds(storeIds); |
| | | // 世界杯参与记录 拿到用户ids |
| | | StoreIds req = new StoreIds(); |
| | | req.setStoreIds(storeIds); |
| | | List<Integer> studentIds = worldCupClient.getStudentIds(req); |
| | | // 用户ids |
| | | List<Integer> users = new ArrayList<>(); |
| | | users.addAll(list); |
| | | users.addAll(siteUsers); |
| | | users.addAll(cpUsers); |
| | | users.addAll(gameUsers); |
| | | users.addAll(studentIds); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | ids = appUserClient.getUserStore(UserExt.getUser().getObjectId()); |
| | | ids.addAll(collect); |
| | | List<Integer> collect1 = ids.stream().distinct().collect(Collectors.toList()); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | } |
| | | search.setIds(ids); |
| | | search.setIds(collect1); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | // 获取运营商下的所有门店id集合 |
| | |
| | | List<Integer> cpUsers = coursePackageClient.getCoursePackageByStoreIds(storeIds); |
| | | // 获取游戏记录 拿到用户ids |
| | | List<Integer> gameUsers = ballClient.getGameByStoreIds(storeIds); |
| | | // 世界杯参与记录 拿到学员ids |
| | | StoreIds req = new StoreIds(); |
| | | req.setStoreIds(storeIds); |
| | | List<Integer> studentIds = worldCupClient.getStudentIds(req); |
| | | // 用户ids |
| | | List<Integer> users = new ArrayList<>(); |
| | | users.addAll(list); |
| | | users.addAll(siteUsers); |
| | | users.addAll(cpUsers); |
| | | users.addAll(gameUsers); |
| | | users.addAll(studentIds); |
| | | // 去重后的用户id |
| | | List<Integer> collect = users.stream().distinct().collect(Collectors.toList()); |
| | | ids = appUserClient.getUserYYs(UserExt.getUser().getObjectId()); |
| | |
| | | @RequestMapping("/listcom/{id}") |
| | | @ResponseBody |
| | | public List<Map<String,Object>> listcom(@PathVariable("id") Integer id) { |
| | | |
| | | List<Map<String,Object>> maps = studentClient.listCom(id); |
| | | |
| | | List<Map<String,Object>> maps = studentClient.listCom(id); |
| | | return maps; |
| | | } |
| | | |
| | |
| | | @RequestMapping("/changeStatus/{id}") |
| | | @ResponseBody |
| | | public ResultUtil changeStatus(@PathVariable Integer id) { |
| | | // InsertBackDto insertBackDto= new InsertBackDto(); |
| | | // insertBackDto.setId(id); |
| | | //// insertBackDto.setIds(ids); |
| | | // System.out.println("=====insertBackDto========"+insertBackDto); |
| | | |
| | | courseStuddentClient.changeStatus(id); |
| | | courseStuddentClient.zeroClass(id); |
| | | |
| | |
| | | @RequestMapping("/noStatus/{id}") |
| | | @ResponseBody |
| | | public ResultUtil noStatus(@PathVariable Integer id) { |
| | | // InsertBackDto insertBackDto= new InsertBackDto(); |
| | | // insertBackDto.setId(id); |
| | | //// insertBackDto.setIds(ids); |
| | | // System.out.println("=====insertBackDto========"+insertBackDto); |
| | | |
| | | courseStuddentClient.noStatus(id); |
| | | courseStuddentClient.backStausClass(id); |
| | | // courseStuddentClient.zeroClass(id); |
| | | |
| | | System.out.println("============学员查询接口========="); |
| | | return new ResultUtil<>(0,0,"已拒绝",null,null); |
| | |
| | | System.out.println("========ToHoliDto========="+resultUtil); |
| | | |
| | | |
| | | if (resultUtil==""||resultUtil==null){ |
| | | return new ResultUtil<>(0,0,"报名成功"); |
| | | if (resultUtil.equals("报名成功")){ |
| | | return new ResultUtil<>(0,0,resultUtil); |
| | | }else{ |
| | | return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);} |
| | | return new ResultUtil<>(0,1,resultUtil);} |
| | | |
| | | } |
| | | |
| | |
| | | String resultUtil = courseStuddentClient.toTrans(toHoliDto); |
| | | System.out.println("========ToHoliDto========="+resultUtil); |
| | | |
| | | if (resultUtil.equals("换课成功")) { |
| | | return new ResultUtil<>(0,0,resultUtil); |
| | | |
| | | if (resultUtil==""){ |
| | | return new ResultUtil<>(0,0,"报名成功"); |
| | | }else{ |
| | | return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);} |
| | | }else { |
| | | return new ResultUtil<>(0,1,resultUtil); |
| | | } |
| | | } |
| | | |
| | | |
| | | //赠课 |
| | | |
| | | @RequestMapping(value = "/giftTo") |