| | |
| | | List<Map<String, Object>> studentTotal = this.baseMapper.getStudentTotal(studentQeryDto); |
| | | |
| | | for (Map<String, Object> student : studentTotal) { |
| | | BigDecimal cashPayment = (BigDecimal) student.get("cashPayment"); |
| | | BigDecimal totalClassHours = (BigDecimal) student.get("totalClassHours"); |
| | | BigDecimal hasHours = (BigDecimal) student.get("hasHours"); |
| | | |
| | | BigDecimal hasPayment = cashPayment.divide(totalClassHours, 2, RoundingMode.HALF_UP) |
| | | .multiply(hasHours).setScale(2, RoundingMode.HALF_UP); |
| | | student.put("hasPayment", hasPayment); |
| | | |
| | | |
| | | Integer appUserId = (Integer) student.get("appUserId"); |
| | | AppUser appUser = appuClient.queryAppUser(appUserId); |
| | | student.put("province", appUser.getProvince()); |
| | |
| | | |
| | | Student studentId = studentClient.queryStudentById((Integer) student.get("studentId")); |
| | | student.put("studentName", studentId.getName()); |
| | | |
| | | |
| | | BigDecimal cashPayment = (BigDecimal) student.get("cashPayment"); |
| | | BigDecimal totalClassHours = (BigDecimal) student.get("totalClassHours"); |
| | | BigDecimal hasHours = (BigDecimal) student.get("hasHours"); |
| | | if (cashPayment==null){ |
| | | continue; |
| | | } |
| | | if (totalClassHours.compareTo(BigDecimal.ZERO)==0){ |
| | | totalClassHours = totalClassHours.add(new BigDecimal("1")); |
| | | } |
| | | BigDecimal hasPayment = cashPayment.divide(totalClassHours, 2, RoundingMode.HALF_UP) |
| | | .multiply(hasHours).setScale(2, RoundingMode.HALF_UP); |
| | | student.put("hasPayment", hasPayment); |
| | | } |
| | | |
| | | if (studentQeryDto.getCityCode()!=null&&studentQeryDto.getCityCode()!="") { |
| | |
| | | TCoursePackage coursePackage = tcpmapper.selectById(tCoursePackagePayment.getCoursePackageId()); |
| | | response.setCoursePackageId(tCoursePackagePayment.getCoursePackageId()); |
| | | response.setCoverDrawing(coursePackage.getCoverDrawing()); |
| | | response.setDetailDrawing(coursePackage.getDetailDrawing()); |
| | | response.setCoursePackageName(coursePackage.getName()); |
| | | response.setCoursePayId(tCoursePackagePayment.getId()); |
| | | List<Integer> integers = StrUtils.dealStrToList(coursePackage.getClassWeeks()); |
| | |
| | | |
| | | public ResultUtil AlipayPayment(String code, BigDecimal request){ |
| | | TCoursePackagePaymentMapper baseMapper1 = this.baseMapper; |
| | | ResultUtil alipay = payMoneyUtil.alipay("课包购买", "", "", code, request.toString(), |
| | | ResultUtil alipay = payMoneyUtil.alipay("课包购买", "课包购买", "", code, request.toString(), |
| | | "/base/coursePackage/alipayRegisteredCoursesCallback"); |
| | | if(alipay.getCode() == 200){ |
| | | new Thread(new Runnable() { |
| | |
| | | // String classStartTime = coursePackage.getClassStartTime(); |
| | | // String classEndTime = coursePackage.getClassEndTime(); |
| | | |
| | | if (byId == null){ |
| | | continue; |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String dateString1 = sdf.format(byId.getClassDate()); |
| | | String dateString2 = sdf.format(byId.getEndDate()); |