| | |
| | | queryWrapper.like("reason", consumeQuery.getReason()); |
| | | |
| | | } |
| | | |
| | | List<CourseCounsum> list = counsumService.list(queryWrapper); |
| | | |
| | | |
| | | |
| | | |
| | | // List<CourseCounsum> list = counsumService.list(new QueryWrapper<CourseCounsum>().eq("paymentId", consumeQuery.getPayId()).eq("changeType", consumeQuery.getChangeType()).between("insertTime", consumeQuery.getStart(), consumeQuery.getEnd()).like("reason", consumeQuery.getReason())); |
| | | return list; |
| | | } |
| | |
| | | @ResponseBody |
| | | public void toClass(@RequestBody ToClassDto toClassDto) throws ParseException { |
| | | System.out.println("===========到达getSelect======="+toClassDto); |
| | | TCoursePackagePayment orinPay = paymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("id", toClassDto.getId())); |
| | | TCoursePackagePayment studentPay = paymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("studentId", toClassDto.getToStudentId()).eq("coursePackageId",orinPay.getCoursePackageId())); |
| | | TCoursePackagePayment orinPay = |
| | | paymentService.getOne(new QueryWrapper<TCoursePackagePayment>().eq("id", toClassDto.getId())); |
| | | TCoursePackagePayment studentPay = paymentService.getOne |
| | | (new QueryWrapper<TCoursePackagePayment>() |
| | | .eq("studentId", toClassDto.getToStudentId()) |
| | | .eq("coursePackageId",orinPay.getCoursePackageId())); |
| | | if (studentPay!=null) { |
| | | System.out.println("======orinPay=====>" + orinPay); |
| | | System.out.println("======studentPay=====>" + studentPay); |
| | | Integer laveClassHours = orinPay.getLaveClassHours(); |
| | | Integer totalClassHours = orinPay.getTotalClassHours(); |
| | | |
| | | orinPay.setTotalClassHours(0); |
| | | orinPay.setLaveClassHours(0); |
| | | orinPay.setStatus(1); |
| | | orinPay.setAppUserId(null); |
| | | paymentService.updateById(orinPay); |
| | | |
| | | //删除orin的排课记录 |
| | | List<CoursePackageStudent> studentCourse1 = coursePackageStudentService.list(new QueryWrapper<CoursePackageStudent>().eq("studentId", orinPay.getStudentId()).eq("coursePackageId", orinPay.getCoursePackageId())); |
| | | List<Long> collect1 = studentCourse1.stream().map(CoursePackageStudent::getCoursePackageSchedulingId).collect(Collectors.toList()); |
| | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | if (orinPay.getAppUserId()!=studentPay.getAppUserId()){ |
| | | courseCounsum.setReason("赠课"); |
| | | }else { courseCounsum.setReason("转课"); |
| | | courseCounsum.setReason("课时转移"); |
| | | }else { courseCounsum.setReason("课时转移"); |
| | | } |
| | | courseCounsum.setNum(laveClassHours); |
| | | courseCounsum.setChangeType(0); |
| | |
| | | CourseCounsum courseCounsum1 = new CourseCounsum(); |
| | | courseCounsum1.setInsertTime(new Date()); |
| | | if (orinPay.getAppUserId()!=studentPay.getAppUserId()){ |
| | | courseCounsum1.setReason("赠课"); |
| | | }else { courseCounsum1.setReason("转课"); |
| | | courseCounsum1.setReason("课时转移"); |
| | | }else { courseCounsum1.setReason("课时转移"); |
| | | } |
| | | courseCounsum1.setNum(laveClassHours); |
| | | courseCounsum1.setChangeType(1); |
| | |
| | | |
| | | CourseCounsum courseCounsum = new CourseCounsum(); |
| | | courseCounsum.setInsertTime(new Date()); |
| | | courseCounsum.setReason("赠课"); |
| | | courseCounsum.setReason("课时转移"); |
| | | courseCounsum.setNum(orinPay.getLaveClassHours()); |
| | | courseCounsum.setChangeType(0); |
| | | courseCounsum.setPaymentId(orinPay.getId()); |
| | |
| | | |
| | | CourseCounsum courseCounsum1 = new CourseCounsum(); |
| | | courseCounsum1.setInsertTime(new Date()); |
| | | courseCounsum1.setReason("赠课"); |
| | | courseCounsum1.setReason("课时转移"); |
| | | courseCounsum1.setNum(orinPay.getLaveClassHours()); |
| | | courseCounsum1.setChangeType(1); |
| | | courseCounsum1.setPaymentId(to.getId()); |