| | |
| | | |
| | | ArrayList<Long> months = new ArrayList<>(); |
| | | ArrayList<Long> monthsVip = new ArrayList<>(); |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 月 |
| | | for (int i = 1; i <= 12; i++) { |
| | | String m=i+""; |
| | |
| | | m="0"+i; |
| | | } |
| | | String s = year + "-" + m; |
| | | long count = list.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | long count1 = list1.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | long count = list.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | long count1 = list1.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | months.add(count); |
| | | monthsVip.add(count1); |
| | | } |
| | |
| | | return map; |
| | | |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/student/stuPt") |
| | | public HashMap<String, Object> stuPt(){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 所有的 |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 1)); |
| | | List<Integer> collect1 = list.stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | if(collect1.size()==0){ |
| | | collect1.add(-1); |
| | | } |
| | | List<TStudent> students = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1)); |
| | | map.put("allUser",students.size()); |
| | | |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = DateUtil.year(new Date()); |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Long> years = new ArrayList<>(); |
| | | for (Object o : collect) { |
| | | String s = o.toString(); |
| | | long count = students.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | years.add(count); |
| | | } |
| | | map.put("yearData",years); |
| | | |
| | | ArrayList<Long> months = new ArrayList<>(); |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | |
| | | // 月 |
| | | for (int i = 1; i <= 12; i++) { |
| | | String m=i+""; |
| | | if(i<10){ |
| | | m="0"+i; |
| | | } |
| | | String s = year + "-" + m; |
| | | long count = students.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | months.add(count); |
| | | } |
| | | map.put("monthData",months); |
| | | |
| | | // 周 |
| | | |
| | | // 获取最近四周 |
| | | LocalDateTime minNow = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime maxNow = LocalDateTime.now().with(LocalTime.MAX); |
| | | // 周度数据 |
| | | String s1 = minNow.minusDays(6).toString(); |
| | | String s2 = maxNow.toString(); |
| | | |
| | | String s3 = minNow.minusDays(13).toString(); |
| | | String s4 = maxNow.minusDays(6).toString(); |
| | | |
| | | |
| | | String s5 = minNow.minusDays(20).toString(); |
| | | String s6 = maxNow.minusDays(13).toString(); |
| | | |
| | | String s7 = minNow.minusDays(27).toString(); |
| | | String s8 = maxNow.minusDays(20).toString(); |
| | | |
| | | |
| | | int count = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s7, s8)); |
| | | |
| | | int count1 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s5,s6)); |
| | | |
| | | int count2 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s3,s4)); |
| | | |
| | | int count3 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s1,s2)); |
| | | map.put("count",count); |
| | | map.put("count1",count1); |
| | | map.put("count2",count2); |
| | | map.put("count3",count3); |
| | | |
| | | |
| | | // 日 |
| | | ArrayList<Integer> days = new ArrayList<>(); |
| | | for (int i = 6; i >= 0; i--) { |
| | | String s = minNow.minusDays(i).toString(); |
| | | String s9 = maxNow.minusDays(i).toString(); |
| | | int count4 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s,s9)); |
| | | days.add(count4); |
| | | } |
| | | map.put("dayData",days); |
| | | |
| | | |
| | | return map; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/student/userAndVipYys") |
| | | public HashMap<String, Object> userAndVipYys(@RequestBody Integer id){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 所有的 |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id)); |
| | | map.put("allUser",list.size()); |
| | | List<TAppUser> list1 = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1)); |
| | | map.put("allVip",list1.size()); |
| | | |
| | | |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = DateUtil.year(new Date()); |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Long> years = new ArrayList<>(); |
| | | ArrayList<Long> yearsVip = new ArrayList<>(); |
| | | for (Object o : collect) { |
| | | String s = o.toString(); |
| | | long count = list.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | long count1 = list1.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | years.add(count); |
| | | yearsVip.add(count1); |
| | | } |
| | | map.put("yearData",years); |
| | | map.put("yearsVip",yearsVip); |
| | | |
| | | ArrayList<Long> months = new ArrayList<>(); |
| | | ArrayList<Long> monthsVip = new ArrayList<>(); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // 月 |
| | | for (int i = 1; i <= 12; i++) { |
| | | String m=i+""; |
| | | if(i<10){ |
| | | m="0"+i; |
| | | } |
| | | String s = year + "-" + m; |
| | | long count = list.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | long count1 = list1.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | months.add(count); |
| | | monthsVip.add(count1); |
| | | } |
| | | map.put("monthData",months); |
| | | map.put("monthsVip",monthsVip); |
| | | |
| | | // 周 |
| | | |
| | | // 获取最近四周 |
| | | LocalDateTime minNow = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime maxNow = LocalDateTime.now().with(LocalTime.MAX); |
| | | // 周度数据 |
| | | String s1 = minNow.minusDays(6).toString(); |
| | | String s2 = maxNow.toString(); |
| | | |
| | | String s3 = minNow.minusDays(13).toString(); |
| | | String s4 = maxNow.minusDays(6).toString(); |
| | | |
| | | |
| | | String s5 = minNow.minusDays(20).toString(); |
| | | String s6 = maxNow.minusDays(13).toString(); |
| | | |
| | | String s7 = minNow.minusDays(27).toString(); |
| | | String s8 = maxNow.minusDays(20).toString(); |
| | | |
| | | |
| | | int count = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime, s7, s8)); |
| | | int countVip = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s7, s8)); |
| | | |
| | | int count1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s5,s6)); |
| | | int countVip1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s5,s6)); |
| | | |
| | | int count2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s3,s4)); |
| | | int countVip2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s3,s4)); |
| | | |
| | | int count3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s1,s2)); |
| | | int countVip3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s1,s2)); |
| | | map.put("count",count); |
| | | map.put("count1",count1); |
| | | map.put("count2",count2); |
| | | map.put("count3",count3); |
| | | map.put("countVip",countVip); |
| | | map.put("countVip1",countVip1); |
| | | map.put("countVip2",countVip2); |
| | | map.put("countVip3",countVip3); |
| | | |
| | | |
| | | // 日 |
| | | ArrayList<Integer> days = new ArrayList<>(); |
| | | ArrayList<Integer> daysVip = new ArrayList<>(); |
| | | for (int i = 6; i >= 0; i--) { |
| | | String s = minNow.minusDays(i).toString(); |
| | | String s9 = maxNow.minusDays(i).toString(); |
| | | int count4 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s,s9)); |
| | | int countVip5 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s,s9)); |
| | | days.add(count4); |
| | | daysVip.add(countVip5); |
| | | } |
| | | map.put("dayData",days); |
| | | map.put("daysVip",daysVip); |
| | | |
| | | |
| | | return map; |
| | | |
| | | } |
| | | @ResponseBody |
| | | @PostMapping("/student/userAndVipStore") |
| | | public HashMap<String, Object> userAndVipStore(@RequestBody Integer id){ |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 所有的 |
| | | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id)); |
| | | map.put("allUser",list.size()); |
| | | List<TAppUser> list1 = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1)); |
| | | map.put("allVip",list1.size()); |
| | | |
| | | |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = DateUtil.year(new Date()); |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Long> years = new ArrayList<>(); |
| | | ArrayList<Long> yearsVip = new ArrayList<>(); |
| | | for (Object o : collect) { |
| | | String s = o.toString(); |
| | | long count = list.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | long count1 = list1.stream().filter(e -> e.getInsertTime().toString().contains(s)).count(); |
| | | years.add(count); |
| | | yearsVip.add(count1); |
| | | } |
| | | map.put("yearData",years); |
| | | map.put("yearsVip",yearsVip); |
| | | |
| | | ArrayList<Long> months = new ArrayList<>(); |
| | | ArrayList<Long> monthsVip = new ArrayList<>(); |
| | | // 月 |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | for (int i = 1; i <= 12; i++) { |
| | | String m=i+""; |
| | | if(i<10){ |
| | | m="0"+i; |
| | | } |
| | | String s = year + "-" + m; |
| | | long count = list.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | long count1 = list1.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).count(); |
| | | months.add(count); |
| | | monthsVip.add(count1); |
| | | } |
| | | map.put("monthData",months); |
| | | map.put("monthsVip",monthsVip); |
| | | |
| | | // 周 |
| | | |
| | | // 获取最近四周 |
| | | LocalDateTime minNow = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime maxNow = LocalDateTime.now().with(LocalTime.MAX); |
| | | // 周度数据 |
| | | String s1 = minNow.minusDays(6).toString(); |
| | | String s2 = maxNow.toString(); |
| | | |
| | | String s3 = minNow.minusDays(13).toString(); |
| | | String s4 = maxNow.minusDays(6).toString(); |
| | | |
| | | |
| | | String s5 = minNow.minusDays(20).toString(); |
| | | String s6 = maxNow.minusDays(13).toString(); |
| | | |
| | | String s7 = minNow.minusDays(27).toString(); |
| | | String s8 = maxNow.minusDays(20).toString(); |
| | | |
| | | |
| | | int count = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime, s7, s8)); |
| | | int countVip = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s7, s8)); |
| | | |
| | | int count1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s5,s6)); |
| | | int countVip1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s5,s6)); |
| | | |
| | | int count2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s3,s4)); |
| | | int countVip2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s3,s4)); |
| | | |
| | | int count3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s1,s2)); |
| | | int countVip3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s1,s2)); |
| | | map.put("count",count); |
| | | map.put("count1",count1); |
| | | map.put("count2",count2); |
| | | map.put("count3",count3); |
| | | map.put("countVip",countVip); |
| | | map.put("countVip1",countVip1); |
| | | map.put("countVip2",countVip2); |
| | | map.put("countVip3",countVip3); |
| | | |
| | | |
| | | // 日 |
| | | ArrayList<Integer> days = new ArrayList<>(); |
| | | ArrayList<Integer> daysVip = new ArrayList<>(); |
| | | for (int i = 6; i >= 0; i--) { |
| | | String s = minNow.minusDays(i).toString(); |
| | | String s9 = maxNow.minusDays(i).toString(); |
| | | int count4 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).between(TAppUser::getInsertTime,s,s9)); |
| | | int countVip5 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId,id).eq(TAppUser::getIsVip,1).between(TAppUser::getInsertTime, s,s9)); |
| | | days.add(count4); |
| | | daysVip.add(countVip5); |
| | | } |
| | | map.put("dayData",days); |
| | | map.put("daysVip",daysVip); |
| | | |
| | | |
| | | return map; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "答复内容") |
| | | private String quesContents; |
| | | @ApiModelProperty(value = "答复时间") |
| | | private String quesTime; |
| | | |
| | | } |
| | |
| | | ids.add(-1); |
| | | } |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | int year = DateUtil.year(new Date()); |
| | | |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Integer> years = new ArrayList<>(); |
| | | ArrayList<Integer> yearsUser = new ArrayList<>(); |
| | |
| | | map.put("yearData",years); |
| | | map.put("yearsUser",yearsUser); |
| | | // 月 |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | ArrayList<Integer> months = new ArrayList<>(); |
| | | ArrayList<Integer> monthsUser = new ArrayList<>(); |
| | | for (int i = 1; i <= 12; i++) { |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/coursePackagePayment/coursePt") |
| | | HashMap<String, Object> coursePt(@RequestBody List<Integer> userPt){ |
| | | if(userPt.size()==0){ |
| | | userPt.add(-1); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | List<TCoursePackagePayment> tCoursePackagePayments = packagePaymentService.listOne(userPt); |
| | | int sum = tCoursePackagePayments.stream().mapToInt(TCoursePackagePayment::getTotalClassHours).sum(); |
| | | int sum1 = tCoursePackagePayments.stream().mapToInt(TCoursePackagePayment::getLaveClassHours).sum(); |
| | | map.put("allCourse",sum-sum1); |
| | | |
| | | //所有课包 |
| | | List<TCoursePackage> coursePackages = tcpService.list(); |
| | | |
| | | |
| | | // 年 |
| | | List<CoursePackageStudent> list = cspsService.list(new LambdaQueryWrapper<CoursePackageStudent>().in(CoursePackageStudent::getAppUserId, userPt)); |
| | | |
| | | |
| | | for (CoursePackageStudent coursePackageStudent : list) { |
| | | for (TCoursePackage coursePackage : coursePackages) { |
| | | if(coursePackageStudent.getCoursePackageId().equals(coursePackage.getId())){ |
| | | if(ToolUtil.isEmpty(coursePackage.getNeedNum())){ |
| | | coursePackageStudent.setNeedNum(0); |
| | | }else { |
| | | coursePackageStudent.setNeedNum(coursePackageStudent.getNeedNum()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = cn.hutool.core.date.DateUtil.year(new Date()); |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | // 年 |
| | | ArrayList<Integer> years = new ArrayList<>(); |
| | | for (Object o : collect) { |
| | | String s = o.toString(); |
| | | List<CoursePackageStudent> collect1 = list.stream().filter(e -> e.getInsertTime().toString().contains(s)).collect(Collectors.toList()); |
| | | int sum2 = collect1.stream().mapToInt(CoursePackageStudent::getNeedNum).sum(); |
| | | years.add(sum2); |
| | | } |
| | | |
| | | map.put("yearData",years); |
| | | |
| | | |
| | | |
| | | ArrayList<Integer> months = new ArrayList<>(); |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | |
| | | // 月 |
| | | for (int i = 1; i <= 12; i++) { |
| | | String m=i+""; |
| | | if(i<10){ |
| | | m="0"+i; |
| | | } |
| | | String s = year + "-" + m; |
| | | List<CoursePackageStudent> collect1 = list.stream().filter(e -> format.format(e.getInsertTime()).contains(s)).collect(Collectors.toList()); |
| | | int sum2 = collect1.stream().mapToInt(CoursePackageStudent::getNeedNum).sum(); |
| | | months.add(sum2); |
| | | } |
| | | map.put("monthData",months); |
| | | |
| | | |
| | | |
| | | // 周 |
| | | // 获取最近四周 |
| | | LocalDateTime minNow = LocalDateTime.now().with(LocalTime.MIN); |
| | | LocalDateTime maxNow = LocalDateTime.now().with(LocalTime.MAX); |
| | | // 周度数据 |
| | | String s1 = minNow.minusDays(6).toString(); |
| | | String s2 = maxNow.toString(); |
| | | |
| | | String s3 = minNow.minusDays(13).toString(); |
| | | String s4 = maxNow.minusDays(6).toString(); |
| | | |
| | | |
| | | String s5 = minNow.minusDays(20).toString(); |
| | | String s6 = maxNow.minusDays(13).toString(); |
| | | |
| | | String s7 = minNow.minusDays(27).toString(); |
| | | String s8 = maxNow.minusDays(20).toString(); |
| | | |
| | | // |
| | | // int count = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s7, s8)); |
| | | // |
| | | // int count1 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s5,s6)); |
| | | // |
| | | // int count2 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s3,s4)); |
| | | // |
| | | // int count3 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime,s1,s2)); |
| | | |
| | | // map.put("count",count); |
| | | // map.put("count1",count1); |
| | | // map.put("count2",count2); |
| | | // map.put("count3",count3); |
| | | return null; |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer needNum; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | |
| | | <select id="queryDiscountListAudit" resultType="com.dsh.course.model.DiscountList"> |
| | | select t1.id,t1.type,t1.auditStatus status,t2.province pName,t2.city cName,t2.name,t2.storeId,t2.id courseId from t_course_package_discount t1 left join t_course_package t2 on t1.coursePackageId = t2.id |
| | | where t2.storeId in <foreach collection="ids" close=")" item="id" open="(" separator=","> |
| | | #{id} and t1.auditStatus !=2 |
| | | </foreach> |
| | | #{id} |
| | | </foreach> and t1.auditStatus !=2 |
| | | <if test="pCode !=null and pCode !=''"> |
| | | and t2.provinceCode =#{pCode} |
| | | </if> |
| | |
| | | @PostMapping("/student/userAndVipPt") |
| | | HashMap<String, Object> userAndVipPt(Integer type); |
| | | |
| | | @PostMapping("/student/userAndVipYys") |
| | | HashMap<String, Object> userAndVipYys(Integer id); |
| | | @PostMapping("/student/userAndVipStore") |
| | | HashMap<String, Object> userAndVipStore(Integer id); |
| | | @PostMapping("/student/stuPt") |
| | | HashMap<String, Object> stuPt(); |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @PostMapping("/coursePackagePayment/queryCourseData") |
| | | List<Map<String,Object>> queryCourseData(List<Integer> ids); |
| | | |
| | | |
| | | |
| | | @PostMapping("/coursePackagePayment/coursePt") |
| | | HashMap<String, Object> coursePt(List<Integer> userPt); |
| | | } |
| | |
| | | return monthlyData; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 运营统计-平台-用户数据 |
| | | * |
| | |
| | | |
| | | |
| | | return null; |
| | | } |
| | | @RequestMapping(value = "/getYears") |
| | | @ResponseBody |
| | | public Object getYears() { |
| | | ArrayList<Object> integers = new ArrayList<>(); |
| | | int year = DateUtil.year(new Date()); |
| | | for (int i = 0; i < 10; i++) { |
| | | integers.add(year-i); |
| | | } |
| | | List<Object> collect = integers.stream().sorted().collect(Collectors.toList()); |
| | | |
| | | return collect; |
| | | } |
| | | /** |
| | | * 退费-平台 |
| | |
| | | @RequestMapping(value = "/userAndVipPt") |
| | | @ResponseBody |
| | | public Object userAndVipPt(Integer type) { |
| | | type=1; |
| | | HashMap<String, Object> map = appUserClient.userAndVipPt(type); |
| | | return map; |
| | | } |
| | | |
| | | @RequestMapping(value = "/stuPt") |
| | | @ResponseBody |
| | | public Object stuPt() { |
| | | HashMap<String, Object> map = appUserClient.stuPt(); |
| | | return map; |
| | | } |
| | | |
| | | @RequestMapping(value = "/coursePt") |
| | | @ResponseBody |
| | | public Object coursePt() { |
| | | List<Integer> userPt = appUserClient.getUserPt(Arrays.asList(1)); |
| | | HashMap<String, Object> map = coursePackagePaymentClient.coursePt(userPt); |
| | | return map; |
| | | } |
| | | |
| | | @RequestMapping(value = "/userAndVipYys") |
| | | @ResponseBody |
| | | public Object userAndVipYys(Integer id) { |
| | | HashMap<String, Object> map = appUserClient.userAndVipYys(id); |
| | | return map; |
| | | } |
| | | @RequestMapping(value = "/userAndVipStore") |
| | | @ResponseBody |
| | | public Object userAndVipStore(Integer id) { |
| | | HashMap<String, Object> map = appUserClient.userAndVipStore(id); |
| | | return map; |
| | | } |
| | | @RequestMapping(value = "/actPt") |
| | |
| | | HashMap<String, Object> map = competitionClient.actPt(userPt); |
| | | |
| | | List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId, 0)); |
| | | long l1=0; |
| | | for (TStore tStore : list) { |
| | | long l = DateUtil.betweenDay(tStore.getCreateTime(), new Date(), true); |
| | | tStore.getStartTime(); |
| | | String startTime = tStore.getStartTime(); |
| | | String endTime = tStore.getEndTime(); |
| | | String s = startTime.split(":")[0]; |
| | | String s1 = endTime.split(":")[1]; |
| | | Integer integer = Integer.valueOf(s); |
| | | Integer integer1 = Integer.valueOf(s1); |
| | | Integer a =0; |
| | | if(integer==0 && integer1==0){ |
| | | a=24; |
| | | }else { |
| | | a= integer1-integer; |
| | | } |
| | | l1 += l * a; |
| | | } |
| | | map.put("allHour",l1); |
| | | return map; |
| | | } |
| | | @RequestMapping(value = "/actYys") |
| | | @ResponseBody |
| | | public Object actYys(Integer id) { |
| | | List<Integer> userPt = appUserClient.getUserYYs(id); |
| | | HashMap<String, Object> map = competitionClient.actPt(userPt); |
| | | |
| | | List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId, 0)); |
| | | long l1=0; |
| | | for (TStore tStore : list) { |
| | | long l = DateUtil.betweenDay(tStore.getCreateTime(), new Date(), true); |
| | | String startTime = tStore.getStartTime(); |
| | | String endTime = tStore.getEndTime(); |
| | | String s = startTime.split(":")[0]; |
| | | String s1 = endTime.split(":")[1]; |
| | | Integer integer = Integer.valueOf(s); |
| | | Integer integer1 = Integer.valueOf(s1); |
| | | Integer a =0; |
| | | if(integer==0 && integer1==0){ |
| | | a=24; |
| | | }else { |
| | | a= integer1-integer; |
| | | } |
| | | l1 += l * a; |
| | | } |
| | | map.put("allHour",l1); |
| | | return map; |
| | | } |
| | | @RequestMapping(value = "/actStore") |
| | | @ResponseBody |
| | | public Object actStore(Integer id) { |
| | | List<Integer> userPt = appUserClient.getUserStore(id); |
| | | HashMap<String, Object> map = competitionClient.actPt(userPt); |
| | | |
| | | List<TStore> list = storeService.list(new LambdaQueryWrapper<TStore>().eq(TStore::getOperatorId, 0)); |
| | | long l1=0; |
| | | for (TStore tStore : list) { |
| | | long l = DateUtil.betweenDay(tStore.getCreateTime(), new Date(), true); |
| | | String startTime = tStore.getStartTime(); |
| | | String endTime = tStore.getEndTime(); |
| | | String s = startTime.split(":")[0]; |
| | | String s1 = endTime.split(":")[1]; |
| | | Integer integer = Integer.valueOf(s); |
| | | Integer integer1 = Integer.valueOf(s1); |
| | | Integer a =0; |
| | | if(integer==0 && integer1==0){ |
| | | a=24; |
| | | }else { |
| | | a= integer1-integer; |
| | | } |
| | | l1 += l * a; |
| | | } |
| | | map.put("allHour",l1); |
| | | return map; |
| | | } |
| | | |
| | |
| | | |
| | | if(cutType==2){ |
| | | yytj() |
| | | ptUser() |
| | | ptActivity() |
| | | |
| | | } |
| | | if(cutType==3){ |
| | | jxtj() |
| | |
| | | , range: true |
| | | }); |
| | | $(function(){ |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/getYears", function(data){ |
| | | yearX=data |
| | | }); |
| | | ajax2.start() |
| | | |
| | | getContent(1); |
| | | getContent1(1); |
| | | getContent2(1); |
| | | |
| | | |
| | | |
| | | // 基于准备好的dom,初始化echarts实例 |
| | | var myChart = echarts.init(document.getElementById('income')); |
| | |
| | | |
| | | if(type==2){ |
| | | yytj() |
| | | ptUser() |
| | | ptActivity() |
| | | } |
| | | |
| | | if(type==3){ |
| | |
| | | ajax.set("id",id); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | function tuifei() { |
| | | var myChart1 = echarts.init(document.getElementById('refund')); |
| | | let id = $("#cCode").val() |
| | |
| | | }) |
| | | myChart1.setOption(option1); |
| | | } |
| | | |
| | | |
| | | function ptUser() { |
| | | var myChart2 = echarts.init(document.getElementById('user')); |
| | | var myChart3 = echarts.init(document.getElementById('vip')); |
| | | myChart2.on('legendselectchanged', obj => { |
| | | var options = myChart2.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度用户数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度用户数') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度用户数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | } else if (obj.name == '日度用户数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart2.setOption(options, true) |
| | | }); |
| | | let id = $("#cCode").val() |
| | | console.log(id) |
| | | if(id==''){ |
| | | Feng.info("请先选择运营商"); |
| | | return; |
| | | } |
| | | myChart3.on('legendselectchanged', obj => { |
| | | var options = myChart3.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度会员数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度会员数') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度会员数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | } else if (obj.name == '日度会员数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart3.setOption(options, true) |
| | | }); |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/userAndVipYys", function(data){ |
| | | $("#userAll").text(data.allUser) |
| | | $("#userVipAll").text(data.allVip) |
| | | console.log(data) |
| | | option2 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度用户数', '月度用户数','周度用户数','日度用户数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度用户数: true, |
| | | 月度用户数: false, |
| | | 周度用户数: false, |
| | | 日度用户数: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | }, |
| | | { |
| | | name: '周度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [data.count,data.count1,data.count2,data.count3] |
| | | }, |
| | | { |
| | | name: '日度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.dayData |
| | | } |
| | | ] |
| | | }; |
| | | option3 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度会员数', '月度会员数','周度会员数','日度会员数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度会员数: true, |
| | | 月度会员数: false, |
| | | 周度会员数: false, |
| | | 日度会员数: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearsVip |
| | | }, |
| | | { |
| | | name: '月度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthsVip |
| | | }, |
| | | { |
| | | name: '周度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data:[data.countVip,data.countVip1,data.countVip2,data.countVip3] |
| | | }, |
| | | { |
| | | name: '日度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.daysVip |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.set("id",id) |
| | | ajax2.start() |
| | | myChart2.setOption(option2); |
| | | myChart3.setOption(option3); |
| | | } |
| | | |
| | | function ptActivity() { |
| | | var myChart4 = echarts.init(document.getElementById('activity')); |
| | | var myChart5 = echarts.init(document.getElementById('prepare')); |
| | | myChart4.on('legendselectchanged', obj => { |
| | | var options = myChart4.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度次数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度次数') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart4.setOption(options, true) |
| | | }); |
| | | |
| | | myChart5.on('legendselectchanged', obj => { |
| | | var options = myChart5.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度次数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度次数') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart5.setOption(options, true) |
| | | }); |
| | | let id = $("#cCode").val() |
| | | console.log(id) |
| | | if(id==''){ |
| | | Feng.info("请先选择运营商"); |
| | | return; |
| | | } |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/actYys", function(data){ |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度次数', '月度次数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度次数: true, |
| | | 月度次数: false, |
| | | }, |
| | | |
| | | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | } |
| | | |
| | | ] |
| | | }; |
| | | option5 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度次数', '月度次数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度次数: true, |
| | | 月度次数: false, |
| | | }, |
| | | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearsUser |
| | | }, |
| | | { |
| | | name: '月度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthsUser |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.set("id",id) |
| | | ajax2.start() |
| | | myChart4.setOption(option4); |
| | | myChart5.setOption(option5); |
| | | } |
| | | |
| | | function getContent1(type){ |
| | | //设置点击字体颜色效果 |
| | |
| | | <h2>运营数据</h2> |
| | | </br> |
| | | </br> |
| | | <span>运营时长:0小时</span> |
| | | <span>运营时长:<span id="allHour"></span>小时</span> |
| | | </br> |
| | | </br> |
| | | <div style="height: 25px;box-sizing: border-box;background:#f3f3f4;line-height: 25px;border:1px solid;margin-bottom: 20px;width: 500px"> |
| | |
| | | <h2>学员数据</h2> |
| | | </br> |
| | | </br> |
| | | <span>累计学员数:0人</span> |
| | | <span>累计学员数:<span id="allUser"></span>人</span> |
| | | </br> |
| | | </br> |
| | | <div id="teach" style="width: 1280px;height:500px;"></div> |
| | |
| | | ajax.start(); |
| | | } |
| | | var ans = []; |
| | | var weekX = ["1","2","上周","本周"]; |
| | | var weekX = ["1周","2周","3周","4周"]; |
| | | var monthX = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]; |
| | | var yearX = []; |
| | | var timeX = []; |
| | |
| | | , trigger: 'click' |
| | | , range: true |
| | | }); |
| | | function getYears() { |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/getYears", function(data){ |
| | | yearX=data |
| | | }); |
| | | ajax2.start() |
| | | } |
| | | $(function(){ |
| | | getContent(1); |
| | | getContent1(1); |
| | | getContent2(1); |
| | | |
| | | |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/data/getIncomeData", function(resp){ |
| | | yearX=resp.year |
| | | |
| | |
| | | var myChart = echarts.init(document.getElementById('main')); |
| | | var myChart1 = echarts.init(document.getElementById('refund')); |
| | | |
| | | |
| | | |
| | | var myChart6 = echarts.init(document.getElementById('teach')); |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | option6 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度学员数', '月度学员数', '周度学员数', '日度学员数'] |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 134, 90, 230, 160, 190, 410, 330, 210, 330] |
| | | }, |
| | | { |
| | | name: '月度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [220, 182, 191, 234, 290, 330, 310, 190, 210, 330, 410, 160] |
| | | }, |
| | | { |
| | | name: '周度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [150, 232, 201, 154, 190, 330, 410, 160, 210, 195, 210, 188] |
| | | }, |
| | | { |
| | | name: '日度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [320, 332, 301, 334, 390, 330, 320, 10, 195, 145, 188, 160] |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | |
| | | |
| | | option7 = { |
| | | tooltip: { |
| | |
| | | myChart.setOption(option); |
| | | myChart1.setOption(option1); |
| | | |
| | | myChart6.setOption(option6); |
| | | myChart7.setOption(option7); |
| | | }); |
| | | |
| | | function ptUser() { |
| | | function ptUser() { |
| | | var myChart2 = echarts.init(document.getElementById('user')); |
| | | var myChart3 = echarts.init(document.getElementById('vip')); |
| | | myChart2.on('legendselectchanged', obj => { |
| | |
| | | function ptActivity() { |
| | | var myChart4 = echarts.init(document.getElementById('activity')); |
| | | var myChart5 = echarts.init(document.getElementById('prepare')); |
| | | myChart4.on('legendselectchanged', obj => { |
| | | var options = myChart4.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度次数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度次数') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart4.setOption(options, true) |
| | | }); |
| | | |
| | | myChart5.on('legendselectchanged', obj => { |
| | | var options = myChart5.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度次数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度次数') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart5.setOption(options, true) |
| | | }); |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/actPt", function(data){ |
| | | console.log(data) |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度次数', '月度次数'] |
| | | data: ['年度次数', '月度次数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度次数: true, |
| | | 月度次数: false, |
| | | }, |
| | | |
| | | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | |
| | | name: '年度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [1220, 1532, 101, 1394, 980, 2380, 1680, 1190, 1410, 1330, 2110, 1330] |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [1220, 1182, 2191, 3234, 1290, 1330, 2310, 2190, 2210, 1330, 2410, 1650] |
| | | data: data.monthData |
| | | } |
| | | |
| | | ] |
| | |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度次数', '月度次数'] |
| | | data: ['年度次数', '月度次数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度次数: true, |
| | | 月度次数: false, |
| | | }, |
| | | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | |
| | | name: '年度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 132, 101, 394, 980, 2380, 1680, 1190, 1410, 1330, 2110, 1330] |
| | | data: data.yearsUser |
| | | }, |
| | | { |
| | | name: '月度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [120, 182, 211, 324, 120, 130, 310, 290, 220, 130, 240, 150] |
| | | data: data.monthsUser |
| | | } |
| | | ] |
| | | }; |
| | |
| | | ajax2.start() |
| | | myChart4.setOption(option4); |
| | | myChart5.setOption(option5); |
| | | } |
| | | |
| | | |
| | | function ptStu() { |
| | | var myChart6 = echarts.init(document.getElementById('teach')); |
| | | myChart6.on('legendselectchanged', obj => { |
| | | var options = myChart6.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度学员数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度学员数') { |
| | | options.xAxis[0].data = monthX |
| | | }else if (obj.name == '周度学员数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | }else if (obj.name == '日度学员数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart6.setOption(options, true) |
| | | }); |
| | | |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/stuPt", function(data){ |
| | | console.log(data) |
| | | |
| | | $("#allUser").text(data.allUser) |
| | | |
| | | option6 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度学员数', '月度学员数', '周度学员数', '日度学员数'], |
| | | |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度学员数: true, |
| | | 月度学员数: false, |
| | | 周度学员数: false, |
| | | 日度学员数: false |
| | | }, |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | }, |
| | | { |
| | | name: '周度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [data.count,data.count1,data.count2,data.count3] |
| | | }, |
| | | { |
| | | name: '日度学员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.dayData |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.start() |
| | | myChart6.setOption(option6); |
| | | } |
| | | |
| | | |
| | | function ptCourse() { |
| | | var myChart7 = echarts.init(document.getElementById('courseData')); |
| | | myChart7.on('legendselectchanged', obj => { |
| | | var options = myChart7.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度耗课数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度耗课数') { |
| | | options.xAxis[0].data = monthX |
| | | }else if (obj.name == '周度耗课数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | }else if (obj.name == '日度耗课数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart7.setOption(options, true) |
| | | }); |
| | | |
| | | |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/coursePt", function(data){ |
| | | console.log(data) |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | |
| | | option7 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度耗课数', '月度耗课数', '周度耗课数', '日度耗课数'], |
| | | |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度耗课数: true, |
| | | 月度耗课数: false, |
| | | 周度耗课数: false, |
| | | 日度耗课数: false |
| | | }, |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | }, |
| | | { |
| | | name: '周度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [data.count,data.count1,data.count2,data.count3] |
| | | }, |
| | | { |
| | | name: '日度耗课数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.dayData |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.start() |
| | | myChart7.setOption(option7); |
| | | } |
| | | |
| | | function getContent(type){ |
| | |
| | | |
| | | ptUser() |
| | | |
| | | ptActivity() |
| | | |
| | | } |
| | | |
| | | |
| | | if(type==3){ |
| | | var ajax = new $ax(Feng.ctxPath + "/data/stuCourseData", function (data) { |
| | | |
| | | console.log(data.data1) |
| | | var chartDom = document.getElementById('cookieTeachCourse'); |
| | | var myChart = echarts.init(chartDom); |
| | |
| | | |
| | | }); |
| | | ajax.start(); |
| | | |
| | | ptActivity() |
| | | ptStu() |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | if(cutType==2){ |
| | | yytj() |
| | | ptUser() |
| | | ptActivity() |
| | | } |
| | | if(cutType==3){ |
| | | jxtj() |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | function ptUser() { |
| | | var myChart2 = echarts.init(document.getElementById('user')); |
| | | var myChart3 = echarts.init(document.getElementById('vip')); |
| | | myChart2.on('legendselectchanged', obj => { |
| | | var options = myChart2.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度用户数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度用户数') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度用户数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | } else if (obj.name == '日度用户数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart2.setOption(options, true) |
| | | }); |
| | | let id = $("#cCode").val() |
| | | console.log(id) |
| | | if(id==''){ |
| | | Feng.info("请先选择门店"); |
| | | return; |
| | | } |
| | | myChart3.on('legendselectchanged', obj => { |
| | | var options = myChart3.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度会员数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度会员数') { |
| | | options.xAxis[0].data = monthX |
| | | } else if (obj.name == '周度会员数') { |
| | | options.xAxis[0].data = ["1周","2周","3周","4周"] |
| | | } else if (obj.name == '日度会员数') { |
| | | options.xAxis[0].data = dataX |
| | | } |
| | | myChart3.setOption(options, true) |
| | | }); |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/userAndVipStore", function(data){ |
| | | $("#userAll").text(data.allUser) |
| | | $("#userVipAll").text(data.allVip) |
| | | console.log(data) |
| | | option2 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度用户数', '月度用户数','周度用户数','日度用户数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度用户数: true, |
| | | 月度用户数: false, |
| | | 周度用户数: false, |
| | | 日度用户数: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | }, |
| | | { |
| | | name: '周度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [data.count,data.count1,data.count2,data.count3] |
| | | }, |
| | | { |
| | | name: '日度用户数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.dayData |
| | | } |
| | | ] |
| | | }; |
| | | option3 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | |
| | | data: ['年度会员数', '月度会员数','周度会员数','日度会员数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度会员数: true, |
| | | 月度会员数: false, |
| | | 周度会员数: false, |
| | | 日度会员数: false |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearsVip |
| | | }, |
| | | { |
| | | name: '月度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthsVip |
| | | }, |
| | | { |
| | | name: '周度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data:[data.countVip,data.countVip1,data.countVip2,data.countVip3] |
| | | }, |
| | | { |
| | | name: '日度会员数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.daysVip |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.set("id",id) |
| | | ajax2.start() |
| | | myChart2.setOption(option2); |
| | | myChart3.setOption(option3); |
| | | } |
| | | |
| | | function ptActivity() { |
| | | var myChart4 = echarts.init(document.getElementById('activity')); |
| | | var myChart5 = echarts.init(document.getElementById('prepare')); |
| | | myChart4.on('legendselectchanged', obj => { |
| | | var options = myChart4.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度次数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度次数') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart4.setOption(options, true) |
| | | }); |
| | | |
| | | myChart5.on('legendselectchanged', obj => { |
| | | var options = myChart5.getOption() |
| | | //这里是选择切换什么样的x轴,那么他会进行对Y值的切换 |
| | | if (obj.name == '年度次数') { |
| | | options.xAxis[0].data = yearX |
| | | } else if (obj.name == '月度次数') { |
| | | options.xAxis[0].data = monthX |
| | | } |
| | | myChart5.setOption(options, true) |
| | | }); |
| | | let id = $("#cCode").val() |
| | | console.log(id) |
| | | if(id==''){ |
| | | Feng.info("请先选择门店"); |
| | | return; |
| | | } |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/actStore", function(data){ |
| | | |
| | | $("#allHour").text(data.allHour) |
| | | |
| | | option4 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度次数', '月度次数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度次数: true, |
| | | 月度次数: false, |
| | | }, |
| | | |
| | | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearData |
| | | }, |
| | | { |
| | | name: '月度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthData |
| | | } |
| | | |
| | | ] |
| | | }; |
| | | option5 = { |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | legend: { |
| | | data: ['年度次数', '月度次数'], |
| | | icon: 'stack', |
| | | selectedMode: 'single', // 单选 |
| | | selected: { |
| | | 年度次数: true, |
| | | 月度次数: false, |
| | | }, |
| | | |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | containLabel: true |
| | | }, |
| | | toolbox: { |
| | | feature: { |
| | | saveAsImage: {} |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: yearX |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '年度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.yearsUser |
| | | }, |
| | | { |
| | | name: '月度次数', |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: data.monthsUser |
| | | } |
| | | ] |
| | | }; |
| | | }); |
| | | ajax2.set("id",id) |
| | | ajax2.start() |
| | | myChart4.setOption(option4); |
| | | myChart5.setOption(option5); |
| | | } |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#beginTime' |
| | | , trigger: 'click' |
| | | , range: true |
| | | }); |
| | | $(function(){ |
| | | var ajax2 = new $ax(Feng.ctxPath + "/data/getYears", function(data){ |
| | | yearX=data |
| | | }); |
| | | ajax2.start() |
| | | getContent(1); |
| | | getContent1(1); |
| | | getContent2(1); |
| | |
| | | |
| | | if(type==2){ |
| | | yytj() |
| | | ptUser() |
| | | ptActivity() |
| | | } |
| | | |
| | | if(type==3){ |
| | |
| | | <#input id="userName" name="管理员姓名" type="text" value="${city.name}"/> |
| | | <#input id="userPhone" name="管理员手机号" type="text" value="${city.account}"/> |
| | | <#avatar id="img" name="门店封面(推荐像素722*360px)" avatarImg="${item.coverDrawing}"/> |
| | | <#input id="imgOne" name="实景照片" type="text" value="${item.realPicture}"/> |
| | | <div class="row" id="app1"> |
| | | <div class="col-sm-6" style="width: 100%;margin-left: 103px;"> |
| | | <div class="form-group"> |
| | |
| | | <#avatar id="cover" name="*门票封面(推荐像素350x350px)" /> |
| | | |
| | | <div class="row" id="app" > |
| | | <div class="col-sm-6" style="width: 100%"> |
| | | <div class="col-sm-6" style="width: 100%;margin-left: 7%"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label" style="width: 15%;margin-left: 7%">*门票图片(请上传不超过五张图片,推荐像素780x440px): </label> |
| | | <div class="col-sm-2" style="width: 100%;margin-left: 12%;margin-top: 1%"> |
| | |
| | | </div> |
| | | </div> |
| | | <#input id="startTime" name="有效期" type="text"/> |
| | | @if(roletype==3){ |
| | | @if(userType==3){ |
| | | <div class="row" id="belongsCon" > |
| | | <div class="form-group"> |
| | | <div class="form-group"> |