| | |
| | | Integer classHours = jsonObject.getInteger("classHours"); |
| | | Double cashPayment = jsonObject.getDouble("cashPayment"); |
| | | Integer playPaiCoin = jsonObject.getInteger("playPaiCoin"); |
| | | String couponIds = jsonObject.getString("couponIds"); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig1 = new CoursePackagePaymentConfig(); |
| | | coursePackagePaymentConfig1.setCoursePackageId(integer); |
| | | coursePackagePaymentConfig1.setClassHours(classHours); |
| | | coursePackagePaymentConfig1.setCashPayment(cashPayment); |
| | | coursePackagePaymentConfig1.setPlayPaiCoin(playPaiCoin); |
| | | coursePackagePaymentConfig1.setCouponIds(couponIds); |
| | | coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | } |
| | | } |
| | |
| | | Integer classHours = jsonObject.getInteger("classHours"); |
| | | Double cashPayment = jsonObject.getDouble("cashPayment"); |
| | | Integer playPaiCoin = jsonObject.getInteger("playPaiCoin"); |
| | | String couponIds = jsonObject.getString("couponIds"); |
| | | CoursePackagePaymentConfig coursePackagePaymentConfig1 = new CoursePackagePaymentConfig(); |
| | | coursePackagePaymentConfig1.setCoursePackageId(coursePackage.getId()); |
| | | coursePackagePaymentConfig1.setClassHours(classHours); |
| | | coursePackagePaymentConfig1.setCashPayment(cashPayment); |
| | | coursePackagePaymentConfig1.setPlayPaiCoin(playPaiCoin); |
| | | coursePackagePaymentConfig1.setCouponIds(couponIds); |
| | | coursePackagePaymentConfigClient.addCoursePackagePaymentConfig(coursePackagePaymentConfig1); |
| | | } |
| | | } |
| | |
| | | continue; |
| | | } |
| | | TCoursePackagePayment tCoursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(coursePackageStudent.getCoursePackagePaymentId()); |
| | | tCoursePackagePayment.setLaveClassHours(tCoursePackagePayment.getLaveClassHours() - deductClassHour); |
| | | |
| | | if (deductClassHour!=null) { |
| | | if (tCoursePackagePayment.getLaveClassHours() - deductClassHour < 0) { |
| | | coursePackageStudentClient.editCoursePackageStudent(coursePackageStudent); |
| | | continue; |
| | | } |
| | | tCoursePackagePayment.setLaveClassHours(tCoursePackagePayment.getLaveClassHours() - deductClassHour); |
| | | } |
| | | |
| | | if(coursePackageStudent.getSignInOrNot() == 0){ |
| | | tCoursePackagePayment.setAbsencesNumber(tCoursePackagePayment.getAbsencesNumber() + 1); |
| | | } |
| | | System.out.println("====tCoursePackagePayment====="+tCoursePackagePayment); |
| | | coursePackagePaymentClient.editCoursePackagePayment(tCoursePackagePayment); |
| | | |
| | | CancelledClasses cancelledClasses = new CancelledClasses(); |
| | |
| | | cancelledClasses.setCoursePackagePaymentId(coursePackageStudent.getCoursePackagePaymentId()); |
| | | cancelledClasses.setCoursePackageSchedulingId(coursePackageStudent.getCoursePackageSchedulingId()); |
| | | cancelledClasses.setVoucher(cancelClasses); |
| | | cancelledClasses.setCancelledClassesNumber(deductClassHour); |
| | | if (deductClassHour!=null) { |
| | | cancelledClasses.setCancelledClassesNumber(deductClassHour);} |
| | | cancelledClasses.setInsertTime(new Date()); |
| | | cancelledClassesClient.addCancelledClasses(cancelledClasses); |
| | | } |
| | |
| | | @Override |
| | | public ResultUtil makeUpMissedLessons(Long coursePackagePaymentId) { |
| | | TCoursePackagePayment coursePackagePayment = coursePackagePaymentClient.queryCoursePackagePaymentById(coursePackagePaymentId); |
| | | System.out.println("=========coursePackagePayment=====>"+coursePackagePayment); |
| | | if(coursePackagePayment.getStatus() == 2){ |
| | | return ResultUtil.error("该学员已退课"); |
| | | } |