0627
This commit is contained in:
parent
2016d8db9c
commit
c7b9f62dab
@ -153,16 +153,16 @@ public interface SchoolBaseConstants {
|
|||||||
/**
|
/**
|
||||||
* 审核不通过
|
* 审核不通过
|
||||||
*/
|
*/
|
||||||
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_NOT_PASS = "驾校学员 %s ,身份证号:%s,科目 %s 的提成审核未通过,原因:%s 。请查看!";
|
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_NOT_PASS = "驾校学员 %s ,身份证号:%s,课程:%s,科目 %s 的提成审核未通过,原因:%s 。请查看!";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 待审核
|
* 待审核
|
||||||
*/
|
*/
|
||||||
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_WAIT = "驾校学员 %s ,身份证号:%s,科目 %s 的考试已通过,提成待审核,请查看!";
|
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_WAIT = "驾校学员 %s ,身份证号:%s,课程:%s,科目 %s 的考试已通过,提成待审核,请查看!";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核通过
|
* 审核通过
|
||||||
*/
|
*/
|
||||||
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_PASS = "驾校教练 %s 的学员 %s ,身份证号:%s,科目 %s 的提成审核已通过,请查看!";
|
public static final String SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_PASS = "驾校教练 %s 的学员 %s ,身份证号:%s,课程:%s,科目 %s 的提成审核已通过,请查看!";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,18 +2,22 @@ package cn.iocoder.yudao.module.base.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
||||||
|
import cn.iocoder.yudao.module.base.entity.DriveSchoolCourseDeduct;
|
||||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolStudentMapper;
|
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolStudentMapper;
|
||||||
import cn.iocoder.yudao.module.base.service.DataViewService;
|
import cn.iocoder.yudao.module.base.service.DataViewService;
|
||||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
||||||
|
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCourseDeductService;
|
||||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolStudentService;
|
import cn.iocoder.yudao.module.base.service.DlDriveSchoolStudentService;
|
||||||
import cn.iocoder.yudao.module.base.vo.*;
|
import cn.iocoder.yudao.module.base.vo.*;
|
||||||
import cn.iocoder.yudao.module.course.entity.Process;
|
import cn.iocoder.yudao.module.course.entity.Process;
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseScheme;
|
||||||
import cn.iocoder.yudao.module.course.mapper.ProcessMapper;
|
import cn.iocoder.yudao.module.course.mapper.ProcessMapper;
|
||||||
import cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper;
|
import cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper;
|
||||||
import cn.iocoder.yudao.module.course.mapper.SchoolCourseOrderMapper;
|
import cn.iocoder.yudao.module.course.mapper.SchoolCourseOrderMapper;
|
||||||
import cn.iocoder.yudao.module.course.service.ProcessService;
|
import cn.iocoder.yudao.module.course.service.ProcessService;
|
||||||
|
import cn.iocoder.yudao.module.course.service.SchoolCourseSchemeService;
|
||||||
import cn.iocoder.yudao.module.exam.mapper.ExamBatchItemMapper;
|
import cn.iocoder.yudao.module.exam.mapper.ExamBatchItemMapper;
|
||||||
import cn.iocoder.yudao.module.exam.service.ExamBatchItemService;
|
import cn.iocoder.yudao.module.exam.service.ExamBatchItemService;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||||
@ -27,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@ -58,6 +63,10 @@ public class DataViewServiceImpl implements DataViewService {
|
|||||||
private SchoolCourseOrderMapper courseOrderMapper;
|
private SchoolCourseOrderMapper courseOrderMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SchoolCommissionMapper commissionMapper;
|
private SchoolCommissionMapper commissionMapper;
|
||||||
|
@Resource
|
||||||
|
private DlDriveSchoolCourseDeductService driveSchoolCourseDeductService;
|
||||||
|
@Resource
|
||||||
|
private SchoolCourseSchemeService schoolCourseSchemeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询学员详情
|
* 查询学员详情
|
||||||
@ -79,6 +88,33 @@ public class DataViewServiceImpl implements DataViewService {
|
|||||||
SchoolCourseOrder orderInfo = courseOrderMapper.getOrderInfo(id);
|
SchoolCourseOrder orderInfo = courseOrderMapper.getOrderInfo(id);
|
||||||
studentInfoVO.setStudentOrderInfo(orderInfo);
|
studentInfoVO.setStudentOrderInfo(orderInfo);
|
||||||
|
|
||||||
|
// 学员提成信息
|
||||||
|
if(orderInfo != null ){
|
||||||
|
List<DriveSchoolCourseDeduct> deductList = new ArrayList<>();
|
||||||
|
if(orderInfo.getSchemeId() != null){
|
||||||
|
deductList = driveSchoolCourseDeductService.lambdaQuery()
|
||||||
|
.eq(DriveSchoolCourseDeduct::getCourseId, orderInfo.getCourseId())
|
||||||
|
.eq(DriveSchoolCourseDeduct::getSchemeId, orderInfo.getSchemeId())
|
||||||
|
.eq(DriveSchoolCourseDeduct::getDeleted, false)
|
||||||
|
.list();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
SchoolCourseScheme defaultScheme = schoolCourseSchemeService.lambdaQuery()
|
||||||
|
.eq(SchoolCourseScheme::getCourseId, orderInfo.getCourseId())
|
||||||
|
.eq(SchoolCourseScheme::getIsDefault, true)
|
||||||
|
.eq(SchoolCourseScheme::getDeleted, false)
|
||||||
|
.one();
|
||||||
|
if(defaultScheme != null){
|
||||||
|
deductList = driveSchoolCourseDeductService.lambdaQuery()
|
||||||
|
.eq(DriveSchoolCourseDeduct::getCourseId, orderInfo.getCourseId())
|
||||||
|
.eq(DriveSchoolCourseDeduct::getSchemeId, defaultScheme.getId())
|
||||||
|
.eq(DriveSchoolCourseDeduct::getDeleted, false)
|
||||||
|
.list();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
studentInfoVO.setCourseDeductList(deductList);
|
||||||
|
}
|
||||||
|
|
||||||
// 当前学习进度
|
// 当前学习进度
|
||||||
Process process = processService.selectByUserId(id, coachId);
|
Process process = processService.selectByUserId(id, coachId);
|
||||||
studentInfoVO.setProcess(process);
|
studentInfoVO.setProcess(process);
|
||||||
|
|||||||
@ -94,4 +94,6 @@ public class DlDriveSchoolStaffVO {
|
|||||||
private String cashierConfirmRemark;
|
private String cashierConfirmRemark;
|
||||||
/**报名时间*/
|
/**报名时间*/
|
||||||
private Date enrollTime;
|
private Date enrollTime;
|
||||||
|
/**工作性质 */
|
||||||
|
private String workName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
package cn.iocoder.yudao.module.base.vo;
|
package cn.iocoder.yudao.module.base.vo;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
||||||
|
import cn.iocoder.yudao.module.base.entity.DriveSchoolCourseDeduct;
|
||||||
import cn.iocoder.yudao.module.course.entity.Process;
|
import cn.iocoder.yudao.module.course.entity.Process;
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseScheme;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||||
import cn.iocoder.yudao.module.train.entity.Train;
|
import cn.iocoder.yudao.module.train.entity.Train;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -15,6 +17,8 @@ public class StudentInfoVO {
|
|||||||
private DlDriveSchoolStudent studentInfo;
|
private DlDriveSchoolStudent studentInfo;
|
||||||
/**学员订单信息*/
|
/**学员订单信息*/
|
||||||
private SchoolCourseOrder studentOrderInfo;
|
private SchoolCourseOrder studentOrderInfo;
|
||||||
|
/**学员提成信息 */
|
||||||
|
private List<DriveSchoolCourseDeduct> courseDeductList;
|
||||||
/**学习进度*/
|
/**学习进度*/
|
||||||
private Process process;
|
private Process process;
|
||||||
/**学习进度列表*/
|
/**学习进度列表*/
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.course.controller.admin;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
||||||
import cn.iocoder.yudao.module.base.entity.DriveSchoolCourseDeduct;
|
import cn.iocoder.yudao.module.base.entity.DriveSchoolCourseDeduct;
|
||||||
@ -26,10 +27,13 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.annotation.security.PermitAll;
|
import javax.annotation.security.PermitAll;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -230,4 +234,43 @@ public class ProcessController {
|
|||||||
Page<ProcessVO> page = new Page<>(pageNo, pageSize);
|
Page<ProcessVO> page = new Page<>(pageNo, pageSize);
|
||||||
return success(processService.getPassStudent(coachId, subject, courseType, name, sort, page));
|
return success(processService.getPassStudent(coachId, subject, courseType, name, sort, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getProcessExportData")
|
||||||
|
public CommonResult<IPage<ProcessExportVO>> getProcessExportData(ProcessExportVO exportVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<ProcessExportVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
return success(processService.getProcessExportData(exportVO, page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export")
|
||||||
|
public void exportCommission(ProcessExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
|
// 1. 校验导出类型
|
||||||
|
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 根据不同类型查询数据
|
||||||
|
List<ProcessExportVO> exportData;
|
||||||
|
String fileName = "学员进度记录";
|
||||||
|
|
||||||
|
switch (exportVO.getExportType()) {
|
||||||
|
case "current":
|
||||||
|
exportData = processService.getProcessList(exportVO);
|
||||||
|
fileName += "_第" + exportVO.getPageNo() + "页";
|
||||||
|
break;
|
||||||
|
case "all":
|
||||||
|
exportData = processService.getAllProcessList(exportVO);
|
||||||
|
fileName += "_全部数据";
|
||||||
|
break;
|
||||||
|
case "range":
|
||||||
|
exportData = processService.getProcessListByRange(exportVO);
|
||||||
|
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
// 4. 导出Excel
|
||||||
|
ExcelUtils.write(response, fileName + ".xlsx", "学员进度记录", ProcessExportVO.class, exportData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,9 +2,11 @@ package cn.iocoder.yudao.module.course.controller.admin;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.module.base.vo.DriveSchoolCourseDeductVO;
|
import cn.iocoder.yudao.module.base.vo.DriveSchoolCourseDeductVO;
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
||||||
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
|
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -15,8 +17,11 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
@ -94,4 +99,91 @@ public class SchoolCommissionController {
|
|||||||
return success(schoolCommissionService.getCommissionListByCoachId(schoolCommissionVO, page));
|
return success(schoolCommissionService.getCommissionListByCoachId(schoolCommissionVO, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 前端获取数据getList()
|
||||||
|
* @param commissionExportVO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/allCommissionPage")
|
||||||
|
public CommonResult<IPage<CommissionExportVO>> getAllCommissionPage(CommissionExportVO commissionExportVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){
|
||||||
|
Page<CommissionExportVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
return success(schoolCommissionService.getAllCommissionPage(commissionExportVO, page));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据(支持三种模式)
|
||||||
|
* @param exportVO 包含导出类型(exportType)、分页参数等
|
||||||
|
*/
|
||||||
|
/*@GetMapping("/export")
|
||||||
|
public void exportCommission(CommissionExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
|
// 1. 根据不同类型查询数据
|
||||||
|
List<CommissionExportVO> exportData;
|
||||||
|
String fileName = "提成记录";
|
||||||
|
|
||||||
|
switch (exportVO.getExportType()) {
|
||||||
|
case "current": // 导出当前页
|
||||||
|
exportData = schoolCommissionService.getCommissionList(exportVO);
|
||||||
|
fileName += "_第" + exportVO.getPageNo() + "页";
|
||||||
|
break;
|
||||||
|
case "all": // 导出全部数据
|
||||||
|
exportData = schoolCommissionService.getAllCommissionList(exportVO);
|
||||||
|
fileName += "_全部数据";
|
||||||
|
break;
|
||||||
|
case "range": // 导出自定义范围
|
||||||
|
exportData = schoolCommissionService.getCommissionListByRange(exportVO);
|
||||||
|
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
for (int i = 0; i < exportData.size(); i++) {
|
||||||
|
exportData.get(i).setSerialNumber(i + 1);
|
||||||
|
}
|
||||||
|
ExcelUtils.write(response, fileName + ".xlsx", "提成记录", CommissionExportVO.class, exportData);
|
||||||
|
}*/
|
||||||
|
@GetMapping("/export")
|
||||||
|
public void exportCommission(CommissionExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
|
// 1. 校验导出类型
|
||||||
|
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 根据不同类型查询数据
|
||||||
|
List<CommissionExportVO> exportData;
|
||||||
|
String fileName = "提成记录";
|
||||||
|
int offset = 0; // 序号偏移量(用于分页连续)
|
||||||
|
|
||||||
|
switch (exportVO.getExportType()) {
|
||||||
|
case "current":
|
||||||
|
exportData = schoolCommissionService.getCommissionList(exportVO);
|
||||||
|
fileName += "_第" + exportVO.getPageNo() + "页";
|
||||||
|
offset = (exportVO.getPageNo() - 1) * exportVO.getPageSize(); // 计算分页偏移
|
||||||
|
break;
|
||||||
|
case "all":
|
||||||
|
exportData = schoolCommissionService.getAllCommissionList(exportVO);
|
||||||
|
fileName += "_全部数据";
|
||||||
|
break;
|
||||||
|
case "range":
|
||||||
|
exportData = schoolCommissionService.getCommissionListByRange(exportVO);
|
||||||
|
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
||||||
|
offset = (exportVO.getStartPage() - 1) * exportVO.getPageSize(); // 自定义范围偏移
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 设置序号(考虑分页偏移)
|
||||||
|
if (exportData != null && !exportData.isEmpty()) {
|
||||||
|
for (int i = 0; i < exportData.size(); i++) {
|
||||||
|
exportData.get(i).setSerialNumber(offset + i + 1); // 确保序号连续
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 导出Excel
|
||||||
|
ExcelUtils.write(response, fileName + ".xlsx", "提成记录", CommissionExportVO.class, exportData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,10 +6,7 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.*;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderBusinessVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderExportVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -23,6 +20,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
@ -194,4 +192,58 @@ public class SchoolCourseOrderController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取导出数据列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/getOrderExportData")
|
||||||
|
public CommonResult<IPage<CourseOrderExportVO>> getOrderExportData(CourseOrderExportVO exportVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<CourseOrderExportVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
return success(schoolCourseOrderService.getOrderExportData(exportVO, page));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/export")
|
||||||
|
public void exportCommission(CourseOrderExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
|
// 1. 校验导出类型
|
||||||
|
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 根据不同类型查询数据
|
||||||
|
List<CourseOrderExportVO> exportData;
|
||||||
|
String fileName = "学员记录";
|
||||||
|
int offset = 0; // 序号偏移量(用于分页连续)
|
||||||
|
|
||||||
|
switch (exportVO.getExportType()) {
|
||||||
|
case "current":
|
||||||
|
exportData = schoolCourseOrderService.getOrderList(exportVO);
|
||||||
|
fileName += "_第" + exportVO.getPageNo() + "页";
|
||||||
|
offset = (exportVO.getPageNo() - 1) * exportVO.getPageSize(); // 计算分页偏移
|
||||||
|
break;
|
||||||
|
case "all":
|
||||||
|
exportData = schoolCourseOrderService.getAllOrderList(exportVO);
|
||||||
|
fileName += "_全部数据";
|
||||||
|
break;
|
||||||
|
case "range":
|
||||||
|
exportData = schoolCourseOrderService.getOrderListByRange(exportVO);
|
||||||
|
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
||||||
|
offset = (exportVO.getStartPage() - 1) * exportVO.getPageSize(); // 自定义范围偏移
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 设置序号(考虑分页偏移)
|
||||||
|
if (exportData != null && !exportData.isEmpty()) {
|
||||||
|
for (int i = 0; i < exportData.size(); i++) {
|
||||||
|
exportData.get(i).setSerialNumber(offset + i + 1); // 确保序号连续
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 导出Excel
|
||||||
|
ExcelUtils.write(response, fileName + ".xlsx", "学员记录", CourseOrderExportVO.class, exportData);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,7 +80,7 @@ public class SchoolCommission extends TenantBaseDO {
|
|||||||
/**
|
/**
|
||||||
* 支付时间
|
* 支付时间
|
||||||
*/
|
*/
|
||||||
private Date payTime;
|
private LocalDateTime payTime;
|
||||||
/**
|
/**
|
||||||
* 审核备注
|
* 审核备注
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -159,5 +159,10 @@ public class SchoolCourseOrder extends TenantBaseDO {
|
|||||||
/** 订单备注 */
|
/** 订单备注 */
|
||||||
private String orderRemark;
|
private String orderRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缴费日期
|
||||||
|
*/
|
||||||
|
private Date payFeesTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachPageReqVO;
|
|||||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
|
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
|
||||||
import cn.iocoder.yudao.module.course.entity.Process;
|
import cn.iocoder.yudao.module.course.entity.Process;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessAndExamBatchVO;
|
import cn.iocoder.yudao.module.course.vo.ProcessAndExamBatchVO;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.ProcessExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
||||||
import cn.iocoder.yudao.module.exam.entity.ExamBatch;
|
import cn.iocoder.yudao.module.exam.entity.ExamBatch;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@ -105,5 +106,7 @@ public interface ProcessMapper extends BaseMapper<Process> {
|
|||||||
IPage<ProcessVO> getPassStudent(@Param("coachId")Long coachId, @Param("subject")int subject, @Param("courseType") String courseType, @Param("name") String name, @Param("sort") String sort,Page<ProcessVO> page);
|
IPage<ProcessVO> getPassStudent(@Param("coachId")Long coachId, @Param("subject")int subject, @Param("courseType") String courseType, @Param("name") String name, @Param("sort") String sort,Page<ProcessVO> page);
|
||||||
List<ProcessVO> getPassStudentList(@Param("coachId")Long coachId, @Param("subject")int subject, @Param("startTime") String startTime, @Param("endTime")String endTime);
|
List<ProcessVO> getPassStudentList(@Param("coachId")Long coachId, @Param("subject")int subject, @Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||||
|
|
||||||
|
IPage<ProcessExportVO> getProcessExportData (@Param("entity") ProcessExportVO entity, Page<ProcessExportVO> page);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.course.mapper;
|
package cn.iocoder.yudao.module.course.mapper;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -40,5 +41,5 @@ public interface SchoolCommissionMapper extends BaseMapper<SchoolCommission> {
|
|||||||
|
|
||||||
IPage<SchoolCommissionVO> getCommissionListByCoachId(@Param("entity") SchoolCommissionVO entity, Page<SchoolCommissionVO> page);
|
IPage<SchoolCommissionVO> getCommissionListByCoachId(@Param("entity") SchoolCommissionVO entity, Page<SchoolCommissionVO> page);
|
||||||
|
|
||||||
|
IPage<CommissionExportVO> getCommissionListExport(@Param("entity") CommissionExportVO entity, Page<CommissionExportVO> page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.course.mapper;
|
package cn.iocoder.yudao.module.course.mapper;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CourseOrderExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderBusinessVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderBusinessVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
||||||
@ -70,4 +71,6 @@ public interface SchoolCourseOrderMapper extends BaseMapper<SchoolCourseOrder> {
|
|||||||
|
|
||||||
List<SchoolCourseOrderVO> getCoachMoney(@Param("entity")SchoolCourseOrderVO entity);
|
List<SchoolCourseOrderVO> getCoachMoney(@Param("entity")SchoolCourseOrderVO entity);
|
||||||
IPage<SchoolCourseOrderVO> getOrderMoneyByCoachId(@Param("entity")SchoolCourseOrderVO entity, Page<SchoolCourseOrderVO> page);
|
IPage<SchoolCourseOrderVO> getOrderMoneyByCoachId(@Param("entity")SchoolCourseOrderVO entity, Page<SchoolCourseOrderVO> page);
|
||||||
|
|
||||||
|
IPage<CourseOrderExportVO> getOrderExportData(@Param("entity")CourseOrderExportVO entity, Page<CourseOrderExportVO> page);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,8 @@ package cn.iocoder.yudao.module.course.service;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
||||||
import cn.iocoder.yudao.module.course.entity.Process;
|
import cn.iocoder.yudao.module.course.entity.Process;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessAndExamBatchVO;
|
import cn.iocoder.yudao.module.course.vo.*;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessNewVO;
|
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessAddVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
@ -170,4 +167,10 @@ public interface ProcessService extends IService<Process> {
|
|||||||
*/
|
*/
|
||||||
IPage<ProcessVO> getPassStudent(Long coachId, int subject, String courseType, String name, String sort, Page<ProcessVO> page);
|
IPage<ProcessVO> getPassStudent(Long coachId, int subject, String courseType, String name, String sort, Page<ProcessVO> page);
|
||||||
List<ProcessVO> getPassStudentList(Long coachId, int subject, String startTime, String endTime);
|
List<ProcessVO> getPassStudentList(Long coachId, int subject, String startTime, String endTime);
|
||||||
|
|
||||||
|
IPage<ProcessExportVO> getProcessExportData(ProcessExportVO exportVO, Page<ProcessExportVO> page);
|
||||||
|
|
||||||
|
public List<ProcessExportVO> getProcessList(ProcessExportVO exportVO);
|
||||||
|
public List<ProcessExportVO> getAllProcessList(ProcessExportVO exportVO);
|
||||||
|
public List<ProcessExportVO> getProcessListByRange(ProcessExportVO exportVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.course.service;
|
package cn.iocoder.yudao.module.course.service;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -57,4 +58,10 @@ public interface SchoolCommissionService extends IService<SchoolCommission> {
|
|||||||
*/
|
*/
|
||||||
IPage<SchoolCommissionVO> getCommissionListByCoachId(SchoolCommissionVO schoolCommissionVO, Page<SchoolCommissionVO> page);
|
IPage<SchoolCommissionVO> getCommissionListByCoachId(SchoolCommissionVO schoolCommissionVO, Page<SchoolCommissionVO> page);
|
||||||
|
|
||||||
|
IPage<CommissionExportVO> getAllCommissionPage(CommissionExportVO exportVO,Page<CommissionExportVO> page);
|
||||||
|
|
||||||
|
public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO);
|
||||||
|
public List<CommissionExportVO> getAllCommissionList(CommissionExportVO exportVO);
|
||||||
|
public List<CommissionExportVO> getCommissionListByRange(CommissionExportVO exportVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.course.service;
|
package cn.iocoder.yudao.module.course.service;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.*;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderBusinessVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
@ -143,4 +141,11 @@ public interface SchoolCourseOrderService extends IService<SchoolCourseOrder> {
|
|||||||
*/
|
*/
|
||||||
IPage<SchoolCourseOrderVO> getOrderMoneyByCoachId(SchoolCourseOrderVO pageReqVO, Page<SchoolCourseOrderVO> page);
|
IPage<SchoolCourseOrderVO> getOrderMoneyByCoachId(SchoolCourseOrderVO pageReqVO, Page<SchoolCourseOrderVO> page);
|
||||||
|
|
||||||
|
|
||||||
|
IPage<CourseOrderExportVO> getOrderExportData(CourseOrderExportVO exportVO, Page<CourseOrderExportVO> page);
|
||||||
|
|
||||||
|
List<CourseOrderExportVO> getOrderList(CourseOrderExportVO exportVO);
|
||||||
|
List<CourseOrderExportVO> getAllOrderList(CourseOrderExportVO exportVO);
|
||||||
|
List<CourseOrderExportVO> getOrderListByRange(CourseOrderExportVO exportVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -138,9 +139,16 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
|
||||||
.eq(Process::getCoachId, userId)
|
.eq(Process::getCoachId, userId)
|
||||||
.eq(Process::getCourseId, process.getCourseId())
|
.notIn(Process::getSubject, Arrays.asList(1, 4));
|
||||||
.eq(Process::getSubject, process.getSubject());
|
/*.eq(Process::getCourseId, process.getCourseId())
|
||||||
if (StringUtils.isNotEmpty(process.getUserName())) {
|
.eq(Process::getSubject, process.getSubject());*/
|
||||||
|
if (process != null && process.getCourseId() != null) {
|
||||||
|
queryWrapper.eq(Process::getCourseId, process.getCourseId());
|
||||||
|
}
|
||||||
|
if (process != null && process.getSubject() != null) {
|
||||||
|
queryWrapper.eq(Process::getSubject, process.getSubject());
|
||||||
|
}
|
||||||
|
if (process != null && StringUtils.isNotEmpty(process.getUserName())) {
|
||||||
queryWrapper.like(Process::getUserName, process.getUserName());
|
queryWrapper.like(Process::getUserName, process.getUserName());
|
||||||
}
|
}
|
||||||
//状态等于1-训练中的
|
//状态等于1-训练中的
|
||||||
@ -367,7 +375,7 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
List<UserDTO> officeStaffList = roleApi.selectUserListByRoleCode(tenantId, "school_staff");
|
List<UserDTO> officeStaffList = roleApi.selectUserListByRoleCode(tenantId, "school_staff");
|
||||||
|
|
||||||
if (officeStaffList != null && !officeStaffList.isEmpty()) {
|
if (officeStaffList != null && !officeStaffList.isEmpty()) {
|
||||||
String officeMessage = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_NOT_PASS, process.getUserName(), process.getStudentIdCard(), process.getSubject(), process.getFinanceRemark());
|
String officeMessage = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_NOT_PASS, process.getUserName(), process.getStudentIdCard(), process.getCourseName(), process.getSubject(), process.getFinanceRemark());
|
||||||
|
|
||||||
for (UserDTO staff : officeStaffList) {
|
for (UserDTO staff : officeStaffList) {
|
||||||
schoolNotifyMessageSendService.sendMessage(staff.getId(), officeMessage, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, null);
|
schoolNotifyMessageSendService.sendMessage(staff.getId(), officeMessage, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, null);
|
||||||
@ -428,13 +436,15 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
List<UserDTO> officeStaffList = roleApi.selectUserListByRoleCode(tenantId, "cn");
|
List<UserDTO> officeStaffList = roleApi.selectUserListByRoleCode(tenantId, "cn");
|
||||||
|
|
||||||
if (officeStaffList != null && !officeStaffList.isEmpty()) {
|
if (officeStaffList != null && !officeStaffList.isEmpty()) {
|
||||||
String officeMessage = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_PASS, process.getCoachName(), process.getUserName(), process.getStudentIdCard(), process.getSubject());
|
String officeMessage = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_PASS, process.getCoachName(), process.getUserName(), process.getStudentIdCard(), process.getCourseName(), process.getSubject());
|
||||||
|
|
||||||
for (UserDTO staff : officeStaffList) {
|
for (UserDTO staff : officeStaffList) {
|
||||||
schoolNotifyMessageSendService.sendMessage(staff.getId(), officeMessage, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, null);
|
schoolNotifyMessageSendService.sendMessage(staff.getId(), officeMessage, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 将当前日期时间设置为发放时间
|
||||||
|
schoolCommission.setPayTime(LocalDateTime.now());
|
||||||
|
schoolCommission.setIfPay(true);
|
||||||
// 仅审核通过时新增记录
|
// 仅审核通过时新增记录
|
||||||
schoolCommission.setDeleted(false);
|
schoolCommission.setDeleted(false);
|
||||||
schoolCommissionService.save(schoolCommission);
|
schoolCommissionService.save(schoolCommission);
|
||||||
@ -1018,6 +1028,45 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
return processMapper.getPassStudentList(coachId, subject, startTime, endTime);
|
return processMapper.getPassStudentList(coachId, subject, startTime, endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<ProcessExportVO> getProcessExportData(ProcessExportVO exportVO, Page<ProcessExportVO> page) {
|
||||||
|
return processMapper.getProcessExportData(exportVO, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProcessExportVO> getProcessList(ProcessExportVO exportVO) {
|
||||||
|
// 分页查询当前页
|
||||||
|
Page<ProcessExportVO> page = new Page<>(exportVO.getPageNo(), exportVO.getPageSize());
|
||||||
|
IPage<ProcessExportVO> result = processMapper.getProcessExportData(exportVO, page);
|
||||||
|
return result.getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProcessExportVO> getAllProcessList(ProcessExportVO exportVO) {
|
||||||
|
// 不分页查询全部数据
|
||||||
|
Page<ProcessExportVO> page = new Page<>(1, Integer.MAX_VALUE);
|
||||||
|
IPage<ProcessExportVO> result = processMapper.getProcessExportData(exportVO, page);
|
||||||
|
return result.getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProcessExportVO> getProcessListByRange(ProcessExportVO exportVO) {
|
||||||
|
List<ProcessExportVO> allData = new ArrayList<>();
|
||||||
|
|
||||||
|
// 循环查询指定范围内的数据
|
||||||
|
for (int i = exportVO.getStartPage(); i <= exportVO.getEndPage(); i++) {
|
||||||
|
Page<ProcessExportVO> page = new Page<>(i, exportVO.getPageSize());
|
||||||
|
IPage<ProcessExportVO> result = processMapper.getProcessExportData(exportVO, page);
|
||||||
|
allData.addAll(result.getRecords());
|
||||||
|
|
||||||
|
// 如果已经到达最后一页,提前结束循环
|
||||||
|
if (i >= result.getPages()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allData;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成32位uuid
|
* 生成32位uuid
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|||||||
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
|
||||||
import cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper;
|
import cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper;
|
||||||
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
|
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionExportVO;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
@ -19,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -161,4 +163,44 @@ public class SchoolCommissionServiceImpl extends ServiceImpl<SchoolCommissionMap
|
|||||||
schoolCommissionVO.setEndTimeStr(endTime);
|
schoolCommissionVO.setEndTimeStr(endTime);
|
||||||
return schoolCommissionMapper.getCommissionListByCoachId(schoolCommissionVO, page);
|
return schoolCommissionMapper.getCommissionListByCoachId(schoolCommissionVO, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<CommissionExportVO> getAllCommissionPage(CommissionExportVO exportVO, Page<CommissionExportVO> page) {
|
||||||
|
return schoolCommissionMapper.getCommissionListExport(exportVO, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO) {
|
||||||
|
// 分页查询当前页
|
||||||
|
Page<CommissionExportVO> page = new Page<>(exportVO.getPageNo(), exportVO.getPageSize());
|
||||||
|
IPage<CommissionExportVO> result = schoolCommissionMapper.getCommissionListExport(exportVO, page);
|
||||||
|
return result.getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CommissionExportVO> getAllCommissionList(CommissionExportVO exportVO) {
|
||||||
|
// 不分页查询全部数据
|
||||||
|
Page<CommissionExportVO> page = new Page<>(1, Integer.MAX_VALUE); // 查询所有
|
||||||
|
IPage<CommissionExportVO> result = schoolCommissionMapper.getCommissionListExport(exportVO, page);
|
||||||
|
return result.getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CommissionExportVO> getCommissionListByRange(CommissionExportVO exportVO) {
|
||||||
|
List<CommissionExportVO> allData = new ArrayList<>();
|
||||||
|
|
||||||
|
// 循环查询指定范围内的数据
|
||||||
|
for (int i = exportVO.getStartPage(); i <= exportVO.getEndPage(); i++) {
|
||||||
|
Page<CommissionExportVO> page = new Page<>(i, exportVO.getPageSize());
|
||||||
|
IPage<CommissionExportVO> result = schoolCommissionMapper.getCommissionListExport(exportVO, page);
|
||||||
|
allData.addAll(result.getRecords());
|
||||||
|
|
||||||
|
// 如果已经到达最后一页,提前结束循环
|
||||||
|
if (i >= result.getPages()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,7 @@ import cn.iocoder.yudao.module.course.mapper.SchoolCourseOrderMapper;
|
|||||||
import cn.iocoder.yudao.module.course.service.ProcessService;
|
import cn.iocoder.yudao.module.course.service.ProcessService;
|
||||||
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
import cn.iocoder.yudao.module.course.service.SchoolCourseOrderService;
|
||||||
import cn.iocoder.yudao.module.course.service.SchoolCourseSchemeService;
|
import cn.iocoder.yudao.module.course.service.SchoolCourseSchemeService;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
import cn.iocoder.yudao.module.course.vo.*;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderBusinessVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
|
||||||
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||||
@ -46,9 +44,7 @@ import java.math.BigDecimal;
|
|||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 驾照报名订单 Service 实现类
|
* 驾照报名订单 Service 实现类
|
||||||
@ -200,13 +196,13 @@ public class SchoolCourseOrderServiceImpl extends ServiceImpl<SchoolCourseOrderM
|
|||||||
.eq(SchoolCourseOrder::getOrderNo, orderNo));
|
.eq(SchoolCourseOrder::getOrderNo, orderNo));
|
||||||
|
|
||||||
// 删除学员未开始和训练中的科目
|
// 删除学员未开始和训练中的科目
|
||||||
processService.remove(Wrappers.lambdaQuery(Process.class)
|
/*processService.remove(Wrappers.lambdaQuery(Process.class)
|
||||||
.eq(Process::getUserId, schoolCourseOrder.getUserId())
|
.eq(Process::getUserId, schoolCourseOrder.getUserId())
|
||||||
.eq(Process::getCourseId, schoolCourseOrder.getCourseId())
|
.eq(Process::getCourseId, schoolCourseOrder.getCourseId())
|
||||||
.and(q -> q.eq(Process::getStatus, SchoolBaseConstants.PROCESS_STATUS_NOT_START)
|
.and(q -> q.eq(Process::getStatus, SchoolBaseConstants.PROCESS_STATUS_NOT_START)
|
||||||
.or()
|
.or()
|
||||||
.eq(Process::getStatus, SchoolBaseConstants.PROCESS_STATUS_IN_PROGRESS))
|
.eq(Process::getStatus, SchoolBaseConstants.PROCESS_STATUS_IN_PROGRESS))
|
||||||
);
|
);*/
|
||||||
|
|
||||||
DlDriveSchoolStudent studentByUserId = schoolStudentService.getStudentByUserId(Long.valueOf(schoolCourseOrder.getUserId()));
|
DlDriveSchoolStudent studentByUserId = schoolStudentService.getStudentByUserId(Long.valueOf(schoolCourseOrder.getUserId()));
|
||||||
if (studentByUserId != null) {
|
if (studentByUserId != null) {
|
||||||
@ -637,4 +633,43 @@ public class SchoolCourseOrderServiceImpl extends ServiceImpl<SchoolCourseOrderM
|
|||||||
return schoolCourseOrderMapper.getOrderMoneyByCoachId(pageReqVO, page);
|
return schoolCourseOrderMapper.getOrderMoneyByCoachId(pageReqVO, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<CourseOrderExportVO> getOrderExportData(CourseOrderExportVO exportVO, Page<CourseOrderExportVO> page) {
|
||||||
|
return schoolCourseOrderMapper.getOrderExportData(exportVO, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CourseOrderExportVO> getOrderList(CourseOrderExportVO exportVO) {
|
||||||
|
// 分页查询当前页
|
||||||
|
Page<CourseOrderExportVO> page = new Page<>(exportVO.getPageNo(), exportVO.getPageSize());
|
||||||
|
IPage<CourseOrderExportVO> result = schoolCourseOrderMapper.getOrderExportData(exportVO, page);
|
||||||
|
return result.getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CourseOrderExportVO> getAllOrderList(CourseOrderExportVO exportVO) {
|
||||||
|
// 不分页查询全部数据
|
||||||
|
Page<CourseOrderExportVO> page = new Page<>(1, Integer.MAX_VALUE); // 查询所有
|
||||||
|
IPage<CourseOrderExportVO> result = schoolCourseOrderMapper.getOrderExportData(exportVO, page);
|
||||||
|
return result.getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CourseOrderExportVO> getOrderListByRange(CourseOrderExportVO exportVO) {
|
||||||
|
List<CourseOrderExportVO> allData = new ArrayList<>();
|
||||||
|
|
||||||
|
// 循环查询指定范围内的数据
|
||||||
|
for (int i = exportVO.getStartPage(); i <= exportVO.getEndPage(); i++) {
|
||||||
|
Page<CourseOrderExportVO> page = new Page<>(i, exportVO.getPageSize());
|
||||||
|
IPage<CourseOrderExportVO> result = schoolCourseOrderMapper.getOrderExportData(exportVO, page);
|
||||||
|
allData.addAll(result.getRecords());
|
||||||
|
|
||||||
|
// 如果已经到达最后一页,提前结束循环
|
||||||
|
if (i >= result.getPages()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allData;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,83 @@
|
|||||||
|
package cn.iocoder.yudao.module.course.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.annotation.Excel;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CommissionExportVO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = " ", index = 0)
|
||||||
|
@ColumnWidth(8)
|
||||||
|
private Integer serialNumber;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long coachId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "教练", index = 1)
|
||||||
|
private String coachName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "教练身份证号", index = 2)
|
||||||
|
private String coachIdCard;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long studentId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员", index = 3)
|
||||||
|
private String studentName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员身份证号", index = 4)
|
||||||
|
private String studentIdCard;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String courseId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "课程名称", index = 5)
|
||||||
|
private String courseName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "课程类型", index = 6)
|
||||||
|
private String courseType;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目", index = 7)
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "提成金额(元)", index = 8)
|
||||||
|
private String commissionAmount;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "审核人", index = 9)
|
||||||
|
private String checkName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "审核时间", index = 10)
|
||||||
|
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "备注", index = 11)
|
||||||
|
private String checkRemark;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String startTimeStr;
|
||||||
|
@ExcelIgnore
|
||||||
|
private String endTimeStr;
|
||||||
|
|
||||||
|
// 分页参数
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer pageNo = 1;
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
|
// 导出类型:all(全部)、current(当前页)、range(自定义范围)
|
||||||
|
@ExcelIgnore
|
||||||
|
private String exportType;
|
||||||
|
|
||||||
|
// 自定义范围参数
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer startPage;
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer endPage;
|
||||||
|
}
|
||||||
@ -0,0 +1,157 @@
|
|||||||
|
package cn.iocoder.yudao.module.course.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CourseOrderExportVO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = " ", index = 0)
|
||||||
|
@ColumnWidth(8)
|
||||||
|
private Integer serialNumber;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long studentId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员姓名", index = 1)
|
||||||
|
private String studentName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员身份证号", index = 2)
|
||||||
|
private String studentIdCard;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员手机号", index = 3)
|
||||||
|
private String studentPhone;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员报名时间", index = 4)
|
||||||
|
@DateTimeFormat("yyyy-MM-dd")
|
||||||
|
private Date signUpTime;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long courseId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "课程名称", index = 5)
|
||||||
|
private String courseName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "课程类型", index = 6)
|
||||||
|
private String courseType;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "缴费金额", index = 7)
|
||||||
|
private BigDecimal reserveMoney;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "缴费时间", index = 8)
|
||||||
|
@DateTimeFormat("yyyy-MM-dd")
|
||||||
|
private Date payFeesTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "订单备注", index = 9)
|
||||||
|
private String orderRemark;
|
||||||
|
|
||||||
|
// @ExcelProperty(value = "是否已面签", index = 13)
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer isSign;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "是否已面签", index = 10)
|
||||||
|
private String isSignDisplay;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "面签时间", index = 11)
|
||||||
|
private LocalDateTime signTime;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long coachId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目二教练", index = 12)
|
||||||
|
private String subject2CoachName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目二提成(预提)", index = 13)
|
||||||
|
private String subject2Deduct;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目三教练", index = 14)
|
||||||
|
private String subject3CoachName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目三提成(预提)", index = 15)
|
||||||
|
private String subject3Deduct;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "出纳是否确认收款", index = 16)
|
||||||
|
private String cashierConfirmDisplay;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer cashierConfirm;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "出纳确认时间", index = 17)
|
||||||
|
private Date cashierConfirmTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "出纳备注", index = 18)
|
||||||
|
private String cashierConfirmRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单状态 0:待支付 1:已取消 :2:已支付(已报名) 3:待面签 4:已面签 5:已完成 6:申请退款 7:退款中 8:退款成功
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String paymentStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付类型 1:定金 2:全款
|
||||||
|
*/
|
||||||
|
@ExcelIgnore
|
||||||
|
private String payType;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer subject;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String signUpStartTimeStr;
|
||||||
|
@ExcelIgnore
|
||||||
|
private String signUpEndTimeStr;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String payFeesStartTimeStr;
|
||||||
|
@ExcelIgnore
|
||||||
|
private String payFeesEndTimeStr;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String cashierConfirmStartTimeStr;
|
||||||
|
@ExcelIgnore
|
||||||
|
private String cashierConfirmEndTimeStr;
|
||||||
|
|
||||||
|
// 分页参数
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer pageNo = 1;
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
|
// 导出类型:all(全部)、current(当前页)、range(自定义范围)
|
||||||
|
@ExcelIgnore
|
||||||
|
private String exportType;
|
||||||
|
|
||||||
|
// 自定义范围参数
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer startPage;
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer endPage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getIsSignDisplay() {
|
||||||
|
return isSign != null && isSign == 1 ? "是" : "否";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCashierConfirmDisplay() {
|
||||||
|
if (cashierConfirm == null) {
|
||||||
|
return "待确认";
|
||||||
|
}
|
||||||
|
switch (cashierConfirm) {
|
||||||
|
case 0:
|
||||||
|
return "未到账";
|
||||||
|
case 1:
|
||||||
|
return "已到账";
|
||||||
|
default:
|
||||||
|
return "未知状态";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package cn.iocoder.yudao.module.course.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProcessExportVO {
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员姓名", index = 0)
|
||||||
|
private String studentName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员身份证号", index = 1)
|
||||||
|
private String studentIdCard;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员手机号", index = 2)
|
||||||
|
private String studentPhone;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String courseId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "课程名称", index = 3)
|
||||||
|
private String courseName;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "课程类型", index = 4)
|
||||||
|
private String courseType;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Long coachId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "缴费日期", index = 5)
|
||||||
|
private String payFeesTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目一状态", index = 6)
|
||||||
|
private String subject1Status;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目二状态", index = 7)
|
||||||
|
private String subject2Status;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目三状态", index = 8)
|
||||||
|
private String subject3Status;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "科目四状态", index = 9)
|
||||||
|
private String subject4Status;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String payFeesStartTimeStr;
|
||||||
|
@ExcelIgnore
|
||||||
|
private String payFeesEndTimeStr;
|
||||||
|
|
||||||
|
|
||||||
|
// 分页参数
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer pageNo = 1;
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
|
// 导出类型:all(全部)、current(当前页)、range(自定义范围)
|
||||||
|
@ExcelIgnore
|
||||||
|
private String exportType;
|
||||||
|
|
||||||
|
// 自定义范围参数
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer startPage;
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer endPage;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.exam.controller.admin;
|
|||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.module.exam.service.ExamBatchService;
|
import cn.iocoder.yudao.module.exam.service.ExamBatchService;
|
||||||
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -34,6 +35,14 @@ public class ExamBatchController {
|
|||||||
return success(examBatchService.queryListPage(pageReqVO,page));
|
return success(examBatchService.queryListPage(pageReqVO,page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/newPage")
|
||||||
|
public CommonResult<IPage<?>> getPageNew(ExamBatchVO pageReqVO,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<ExamBatchItemNewVO> page = new Page<>(pageNo,pageSize);
|
||||||
|
return success(examBatchService.queryListPageNew(pageReqVO,page));
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "送考")
|
@Operation(summary = "送考")
|
||||||
public CommonResult<?> createObj( @RequestBody ExamBatchVO examBatchVO) {
|
public CommonResult<?> createObj( @RequestBody ExamBatchVO examBatchVO) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.exam.mapper;
|
package cn.iocoder.yudao.module.exam.mapper;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.exam.entity.ExamBatch;
|
import cn.iocoder.yudao.module.exam.entity.ExamBatch;
|
||||||
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@ -18,6 +19,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
public interface ExamBatchMapper extends BaseMapper<ExamBatch> {
|
public interface ExamBatchMapper extends BaseMapper<ExamBatch> {
|
||||||
|
|
||||||
IPage<ExamBatchVO> queryListPage(@Param("entity") ExamBatchVO entity, Page<ExamBatchVO> page);
|
IPage<ExamBatchVO> queryListPage(@Param("entity") ExamBatchVO entity, Page<ExamBatchVO> page);
|
||||||
|
IPage<ExamBatchItemNewVO> queryListPageNew(@Param("entity") ExamBatchVO entity, Page<ExamBatchItemNewVO> page);
|
||||||
|
|
||||||
IPage<ExamBatchNewVO> getStudentByCoachId(@Param("subject") int subject, @Param("coachId")Long coachId, @Param("ifPass")String ifPass, @Param("name")String name, @Param("sort")String sort, @Param("startTime") String startTime, @Param("endTime") String endTime, Page<ExamBatchNewVO> page);
|
IPage<ExamBatchNewVO> getStudentByCoachId(@Param("subject") int subject, @Param("coachId")Long coachId, @Param("ifPass")String ifPass, @Param("name")String name, @Param("sort")String sort, @Param("startTime") String startTime, @Param("endTime") String endTime, Page<ExamBatchNewVO> page);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.exam.service;
|
package cn.iocoder.yudao.module.exam.service;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.exam.entity.ExamBatch;
|
import cn.iocoder.yudao.module.exam.entity.ExamBatch;
|
||||||
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -22,6 +23,7 @@ public interface ExamBatchService extends IService<ExamBatch> {
|
|||||||
* @param page TODO
|
* @param page TODO
|
||||||
**/
|
**/
|
||||||
IPage<ExamBatchVO> queryListPage(ExamBatchVO pageReqVO, Page<ExamBatchVO> page);
|
IPage<ExamBatchVO> queryListPage(ExamBatchVO pageReqVO, Page<ExamBatchVO> page);
|
||||||
|
IPage<ExamBatchItemNewVO> queryListPageNew(ExamBatchVO pageReqVO, Page<ExamBatchItemNewVO> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送考
|
* 送考
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.exam.entity.ExamBatchItem;
|
|||||||
import cn.iocoder.yudao.module.exam.mapper.ExamBatchMapper;
|
import cn.iocoder.yudao.module.exam.mapper.ExamBatchMapper;
|
||||||
import cn.iocoder.yudao.module.exam.service.ExamBatchItemService;
|
import cn.iocoder.yudao.module.exam.service.ExamBatchItemService;
|
||||||
import cn.iocoder.yudao.module.exam.service.ExamBatchService;
|
import cn.iocoder.yudao.module.exam.service.ExamBatchService;
|
||||||
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchVO;
|
||||||
@ -89,6 +90,39 @@ public class ExamBatchServiceImpl extends ServiceImpl<ExamBatchMapper, ExamBatch
|
|||||||
return rtnList;
|
return rtnList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<ExamBatchItemNewVO> queryListPageNew(ExamBatchVO pageReqVO, Page<ExamBatchItemNewVO> page) {
|
||||||
|
if(StringUtils.isEmpty(pageReqVO.getTimeType())){
|
||||||
|
//不是首页过来的,那么代表是教练自己查自己的所有考试记录
|
||||||
|
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
|
pageReqVO.setCoachId(userId);
|
||||||
|
}else {
|
||||||
|
//首页过来的,默认查全部的数据
|
||||||
|
String startTimeStr = "";
|
||||||
|
String endTimeStr = "";
|
||||||
|
if("more".equals(pageReqVO.getTimeType())){
|
||||||
|
if(StringUtils.isNotEmpty(pageReqVO.getStartTimeSearch())){
|
||||||
|
startTimeStr = pageReqVO.getStartTimeSearch()+" 00:00:01";
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(pageReqVO.getEndTimeSearch())) {
|
||||||
|
endTimeStr = pageReqVO.getEndTimeSearch() + " 23:59:59";
|
||||||
|
}
|
||||||
|
}else if("month".equals(pageReqVO.getTimeType())){
|
||||||
|
//当月
|
||||||
|
startTimeStr = DateUtil.format(DateUtil.beginOfMonth(DateUtil.date()),"yyyy-MM-dd")+" 00:00:01";
|
||||||
|
endTimeStr = DateUtil.format(DateUtil.endOfMonth(DateUtil.date()),"yyyy-MM-dd")+" 23:59:59";
|
||||||
|
}else if("day".equals(pageReqVO.getTimeType())){
|
||||||
|
//当天
|
||||||
|
startTimeStr = DateUtil.formatDate(DateUtil.date())+" 00:00:01";
|
||||||
|
endTimeStr = DateUtil.formatDate(DateUtil.date())+" 23:59:59";
|
||||||
|
}
|
||||||
|
pageReqVO.setStartTimeSearch(startTimeStr);
|
||||||
|
pageReqVO.setEndTimeSearch(endTimeStr);
|
||||||
|
}
|
||||||
|
// IPage<ExamBatchItemNewVO> rtnList = ;
|
||||||
|
return examBatchMapper.queryListPageNew(pageReqVO, page);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 送考
|
* 送考
|
||||||
*
|
*
|
||||||
|
|||||||
@ -75,4 +75,11 @@ public class ExamBatchItemNewVO extends ExamBatchItem {
|
|||||||
private String batchId;
|
private String batchId;
|
||||||
|
|
||||||
private String batchItemId;
|
private String batchItemId;
|
||||||
|
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
|
||||||
|
private Long totalCount;
|
||||||
|
private Long passedCount;
|
||||||
|
private Long unpassedCount;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ public class StudentScoreInputServiceImpl implements StudentScoreInputService {
|
|||||||
studentIdCard = studentByUserId.getIdCard();
|
studentIdCard = studentByUserId.getIdCard();
|
||||||
}
|
}
|
||||||
if (allStaffList != null && !allStaffList.isEmpty()) {
|
if (allStaffList != null && !allStaffList.isEmpty()) {
|
||||||
String officeMessage = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_WAIT, studentScoreInput.getUserName(), studentIdCard, studentScoreInput.getSubject());
|
String officeMessage = String.format(SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TEMPLATE_MEMBER_AUDIT_WAIT, studentScoreInput.getUserName(), studentIdCard, studentScoreInput.getCoachName(), studentScoreInput.getSubject());
|
||||||
for (UserDTO staff : allStaffList) {
|
for (UserDTO staff : allStaffList) {
|
||||||
schoolNotifyMessageSendService.sendMessage(staff.getId(), officeMessage, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, null);
|
schoolNotifyMessageSendService.sendMessage(staff.getId(), officeMessage, SchoolBaseConstants.SCHOOL_NOTIFY_MESSAGE_TYPE_ADMIN, null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,6 +91,9 @@
|
|||||||
<if test="entity.name!=null and entity.name!=''">
|
<if test="entity.name!=null and entity.name!=''">
|
||||||
AND main.name LIKE CONCAT('%',#{entity.name},'%')
|
AND main.name LIKE CONCAT('%',#{entity.name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entity.workName!=null and entity.workName!=''">
|
||||||
|
AND main.work_name = #{entity.workName}
|
||||||
|
</if>
|
||||||
<if test="entity.courseType != null and entity.courseType != ''">
|
<if test="entity.courseType != null and entity.courseType != ''">
|
||||||
AND dsco.course_type = #{entity.courseType}
|
AND dsco.course_type = #{entity.courseType}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -292,4 +292,129 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getProcessExportData" resultType="cn.iocoder.yudao.module.course.vo.ProcessExportVO">
|
||||||
|
SELECT
|
||||||
|
MAX(dsp.user_name) AS studentName,
|
||||||
|
MAX(dss.id_card) AS studentIdCard,
|
||||||
|
MAX(dsp.user_mobile) AS studentPhone,
|
||||||
|
MAX(dsp.course_id) AS courseId,
|
||||||
|
MAX(dsp.course_name) AS courseName,
|
||||||
|
MAX(dsp.course_type) AS courseType,
|
||||||
|
MAX(DATE_FORMAT(dsco.pay_fees_time, '%Y-%m-%d')) AS payFeesTime,
|
||||||
|
|
||||||
|
MAX(
|
||||||
|
CASE
|
||||||
|
WHEN sub1.exam_status = 1 THEN
|
||||||
|
CASE
|
||||||
|
WHEN sub1.exam_time IS NOT NULL THEN DATE_FORMAT(sub1.exam_time, '%Y-%m-%d')
|
||||||
|
ELSE '已通过'
|
||||||
|
END
|
||||||
|
WHEN sub1.exam_status = 0 THEN '未通过'
|
||||||
|
WHEN sub1.exam_status = 9 THEN '已送考'
|
||||||
|
WHEN sub1.status = 2 THEN '已完成(未考试)'
|
||||||
|
WHEN sub1.status = 1 THEN '训练中'
|
||||||
|
ELSE '未开始'
|
||||||
|
END
|
||||||
|
) AS subject1Status,
|
||||||
|
|
||||||
|
MAX(
|
||||||
|
CASE
|
||||||
|
WHEN sub2.exam_status = 1 THEN
|
||||||
|
CASE
|
||||||
|
WHEN sub2.exam_time IS NOT NULL THEN DATE_FORMAT(sub2.exam_time, '%Y-%m-%d')
|
||||||
|
ELSE '已通过'
|
||||||
|
END
|
||||||
|
WHEN sub2.exam_status = 0 THEN '未通过'
|
||||||
|
WHEN sub2.exam_status = 9 THEN '已送考'
|
||||||
|
WHEN sub2.status = 2 THEN '已完成(未考试)'
|
||||||
|
WHEN sub2.status = 1 THEN '训练中'
|
||||||
|
ELSE '未开始'
|
||||||
|
END
|
||||||
|
) AS subject2Status,
|
||||||
|
|
||||||
|
MAX(
|
||||||
|
CASE
|
||||||
|
WHEN sub3.exam_status = 1 THEN
|
||||||
|
CASE
|
||||||
|
WHEN sub3.exam_time IS NOT NULL THEN DATE_FORMAT(sub3.exam_time, '%Y-%m-%d')
|
||||||
|
ELSE '已通过'
|
||||||
|
END
|
||||||
|
WHEN sub3.exam_status = 0 THEN '未通过'
|
||||||
|
WHEN sub3.exam_status = 9 THEN '已送考'
|
||||||
|
WHEN sub3.status = 2 THEN '已完成(未考试)'
|
||||||
|
WHEN sub3.status = 1 THEN '训练中'
|
||||||
|
ELSE '未开始'
|
||||||
|
END
|
||||||
|
) AS subject3Status,
|
||||||
|
|
||||||
|
MAX(
|
||||||
|
CASE
|
||||||
|
WHEN sub4.exam_status = 1 THEN
|
||||||
|
CASE
|
||||||
|
WHEN sub4.exam_time IS NOT NULL THEN DATE_FORMAT(sub4.exam_time, '%Y-%m-%d')
|
||||||
|
ELSE '已通过'
|
||||||
|
END
|
||||||
|
WHEN sub4.exam_status = 0 THEN '未通过'
|
||||||
|
WHEN sub4.exam_status = 9 THEN '已送考'
|
||||||
|
WHEN sub4.status = 2 THEN '已完成(未考试)'
|
||||||
|
WHEN sub4.status = 1 THEN '训练中'
|
||||||
|
ELSE '未开始'
|
||||||
|
END
|
||||||
|
) AS subject4Status
|
||||||
|
|
||||||
|
FROM drive_school_process dsp
|
||||||
|
LEFT JOIN drive_school_student dss ON dss.user_id = dsp.user_id AND dss.deleted = 0
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT * FROM drive_school_course_order
|
||||||
|
WHERE if_end = 0 AND is_sign = 1 AND payment_status IN ('2','3','4','5')
|
||||||
|
<if test="entity.payFeesStartTimeStr!=null and entity.payFeesStartTimeStr!='' ">
|
||||||
|
AND pay_fees_time >= #{entity.payFeesStartTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.payFeesEndTimeStr!=null and entity.payFeesEndTimeStr!='' ">
|
||||||
|
AND pay_fees_time <= #{entity.payFeesEndTimeStr}
|
||||||
|
</if>
|
||||||
|
AND (user_id, create_time) IN (
|
||||||
|
SELECT user_id, MAX(create_time)
|
||||||
|
FROM drive_school_course_order
|
||||||
|
WHERE if_end = 0 AND is_sign = 1 AND payment_status IN ('2','3','4','5')
|
||||||
|
GROUP BY user_id
|
||||||
|
)
|
||||||
|
) dsco ON dsco.user_id = dsp.user_id
|
||||||
|
LEFT JOIN drive_school_process sub1 ON sub1.user_id = dsp.user_id AND sub1.subject = 1 AND sub1.deleted = 0
|
||||||
|
LEFT JOIN drive_school_process sub2 ON sub2.user_id = dsp.user_id AND sub2.subject = 2 AND sub2.deleted = 0
|
||||||
|
LEFT JOIN drive_school_process sub3 ON sub3.user_id = dsp.user_id AND sub3.subject = 3 AND sub3.deleted = 0
|
||||||
|
LEFT JOIN drive_school_process sub4 ON sub4.user_id = dsp.user_id AND sub4.subject = 4 AND sub4.deleted = 0
|
||||||
|
WHERE dsp.deleted = 0
|
||||||
|
<if test="entity.studentName != null and entity.studentName != ''">
|
||||||
|
AND dsp.user_name LIKE CONCAT('%', #{entity.studentName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.studentIdCard != null and entity.studentIdCard != '' ">
|
||||||
|
<choose>
|
||||||
|
<when test="entity.studentIdCard.length() == 18">
|
||||||
|
AND dss.id_card = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<when test="entity.studentIdCard.length() == 4">
|
||||||
|
AND RIGHT(dss.id_card, 4) = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
AND dss.id_card LIKE concat('%', #{entity.studentIdCard}, '%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
<if test="entity.studentPhone != null and entity.studentPhone != ''">
|
||||||
|
AND dsp.user_mobile like concat('%', #{entity.studentPhone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.courseId != null and entity.courseId != ''">
|
||||||
|
AND dsp.course_id = #{entity.courseId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.courseType != null and entity.courseType != ''">
|
||||||
|
AND dsp.course_type = #{entity.courseType}
|
||||||
|
</if>
|
||||||
|
<if test="entity.coachId != null">
|
||||||
|
AND dsp.coach_id = #{entity.coachId}
|
||||||
|
</if>
|
||||||
|
GROUP BY dsp.user_id
|
||||||
|
ORDER BY MAX(dsp.create_time) DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -101,4 +101,65 @@
|
|||||||
AND dsc.create_time <= #{entity.endTimeStr}
|
AND dsc.create_time <= #{entity.endTimeStr}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getCommissionListExport" resultType="cn.iocoder.yudao.module.course.vo.CommissionExportVO">
|
||||||
|
SELECT
|
||||||
|
coach.id_number AS coachIdCard,
|
||||||
|
dsc.coach_name,
|
||||||
|
dsc.student_name,
|
||||||
|
student.id_card AS studentIdCard,
|
||||||
|
dsc.commission_amount,
|
||||||
|
course.name AS courseName,
|
||||||
|
course.type AS courseType,
|
||||||
|
dsc.subject,
|
||||||
|
dsc.check_name,
|
||||||
|
dsc.check_remark,
|
||||||
|
dsc.create_time
|
||||||
|
FROM drive_school_commission dsc
|
||||||
|
LEFT JOIN drive_school_coach coach ON coach.user_id = dsc.coach_user_id AND coach.deleted = 0
|
||||||
|
LEFT JOIN drive_school_course course ON course.id = dsc.course_id AND course.deleted = 0
|
||||||
|
LEFT JOIN drive_school_student student ON student.user_id = dsc.student_id AND student.deleted = 0
|
||||||
|
where dsc.deleted = 0 AND dsc.subject IN (2,3)
|
||||||
|
<if test="entity.coachId != null ">
|
||||||
|
AND dsc.coach_user_id = #{entity.coachId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.studentName != null and entity.studentName != '' ">
|
||||||
|
AND dsc.student_name LIKE CONCAT('%', #{entity.studentName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.courseId != null and entity.courseId != '' ">
|
||||||
|
AND dsc.course_id = #{entity.courseId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.courseType != null and entity.courseType != '' ">
|
||||||
|
AND course.type = #{entity.courseType}
|
||||||
|
</if>
|
||||||
|
<if test="entity.subject != null and entity.subject != '' ">
|
||||||
|
AND dsc.subject = #{entity.subject}
|
||||||
|
</if>
|
||||||
|
<if test="entity.checkName != null and entity.checkName != '' ">
|
||||||
|
AND dsc.check_name LIKE CONCAT('%', #{entity.checkName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.startTimeStr!=null and entity.startTimeStr!='' ">
|
||||||
|
AND dsc.create_time >= #{entity.startTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.endTimeStr!=null and entity.endTimeStr!='' ">
|
||||||
|
AND dsc.create_time <= #{entity.endTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.studentIdCard != null and entity.studentIdCard != '' ">
|
||||||
|
<choose>
|
||||||
|
<!-- 精确匹配:当输入18位时 -->
|
||||||
|
<when test="entity.studentIdCard.length() == 18">
|
||||||
|
AND student.id_card = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<!-- 后4位匹配:当输入正好4位时 -->
|
||||||
|
<when test="entity.studentIdCard.length() == 4">
|
||||||
|
AND RIGHT(student.id_card, 4) = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<!-- 模糊搜索:当输入大于4位但不足18位时 -->
|
||||||
|
<otherwise>
|
||||||
|
AND student.id_card LIKE concat('%', #{entity.studentIdCard}, '%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
order BY dsc.create_time DESC
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -262,7 +262,7 @@
|
|||||||
|
|
||||||
<select id="getOrderMoneyByCoachId" resultType="cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO">
|
<select id="getOrderMoneyByCoachId" resultType="cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO">
|
||||||
SELECT dsco.* FROM drive_school_course_order dsco
|
SELECT dsco.* FROM drive_school_course_order dsco
|
||||||
LEFT JOIN drive_school_student dss ON dsco.user_id = dss.user_id AND dss.deleted = 0
|
LEFT JOIN drive_school_student dss ON dsco.user_id = dss.user_id AND dss.deleted = 0 AND dss.source_user_id IS NOT NULL
|
||||||
where dsco.deleted = 0 AND dsco.payment_status IN ( '2', '3', '4', '5' ) AND dsco.is_sign = 1
|
where dsco.deleted = 0 AND dsco.payment_status IN ( '2', '3', '4', '5' ) AND dsco.is_sign = 1
|
||||||
<if test="entity.coachUserId!=null and entity.coachUserId!='' ">
|
<if test="entity.coachUserId!=null and entity.coachUserId!='' ">
|
||||||
AND dss.source_user_id = #{entity.coachUserId}
|
AND dss.source_user_id = #{entity.coachUserId}
|
||||||
@ -286,4 +286,110 @@
|
|||||||
GROUP BY dss.user_id
|
GROUP BY dss.user_id
|
||||||
ORDER BY dss.create_time DESC
|
ORDER BY dss.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOrderExportData" resultType="cn.iocoder.yudao.module.course.vo.CourseOrderExportVO">
|
||||||
|
SELECT
|
||||||
|
dsco.user_id AS studentId,
|
||||||
|
dsco.user_name AS studentName,
|
||||||
|
dsco.user_no AS studentIdCard,
|
||||||
|
dsco.user_phone AS studentPhone,
|
||||||
|
dsco.create_time AS signUpTime,
|
||||||
|
dsco.is_sign,
|
||||||
|
dsco.pay_fees_time,
|
||||||
|
dsco.reserve_money,
|
||||||
|
dsco.course_name,
|
||||||
|
dsco.course_type,
|
||||||
|
dsco.order_remark,
|
||||||
|
dsco.cashier_confirm,
|
||||||
|
dsco.cashier_confirm_remark,
|
||||||
|
MAX(CASE WHEN dsp.subject = 2 THEN COALESCE(dsp.coach_name, '') END) AS subject2CoachName,
|
||||||
|
MAX(CASE WHEN dscd.course_subject = 2 THEN COALESCE(dscd.deduct, 0) END) AS subject2Deduct,
|
||||||
|
MAX(CASE WHEN dsp.subject = 3 THEN COALESCE(dsp.coach_name, '') END) AS subject3CoachName,
|
||||||
|
MAX(CASE WHEN dscd.course_subject = 3 THEN COALESCE(dscd.deduct, 0) END) AS subject3Deduct
|
||||||
|
FROM
|
||||||
|
drive_school_course_order dsco
|
||||||
|
LEFT JOIN drive_school_process dsp ON dsp.course_id = dsco.course_id AND dsp.user_id = dsco.user_id AND dsp.subject IN (2, 3) AND dsp.deleted = 0
|
||||||
|
LEFT JOIN drive_school_course_deduct dscd ON dsco.scheme_id = dscd.scheme_id AND dsco.course_id = dscd.course_id AND dscd.course_subject IN (2, 3) AND dscd.deleted = 0
|
||||||
|
WHERE dsco.deleted = 0
|
||||||
|
AND dsco.if_end = 0
|
||||||
|
<if test="entity.courseId != null and entity.courseId != '' ">
|
||||||
|
AND dsco.course_id = #{entity.courseId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.studentPhone != null and entity.studentPhone != '' ">
|
||||||
|
AND dsco.user_phone like concat('%', #{entity.studentPhone}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.coachId != null and entity.coachId != '' ">
|
||||||
|
AND dsp.coach_id = #{entity.coachId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.courseType != null and entity.courseType != '' ">
|
||||||
|
AND dsco.course_type = #{entity.courseType}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="entity.signUpStartTimeStr!=null and entity.signUpStartTimeStr!='' ">
|
||||||
|
AND dsco.create_time >= #{entity.signUpStartTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.signUpEndTimeStr!=null and entity.signUpEndTimeStr!='' ">
|
||||||
|
AND dsco.create_time <= #{entity.signUpEndTimeStr}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="entity.payFeesStartTimeStr!=null and entity.payFeesStartTimeStr!='' ">
|
||||||
|
AND dsco.pay_fees_time >= #{entity.payFeesStartTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.payFeesEndTimeStr!=null and entity.payFeesEndTimeStr!='' ">
|
||||||
|
AND dsco.pay_fees_time <= #{entity.payFeesEndTimeStr}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="entity.cashierConfirmStartTimeStr!=null and entity.cashierConfirmStartTimeStr!='' ">
|
||||||
|
AND dsco.cashier_confirm_time >= #{entity.cashierConfirmStartTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.cashierConfirmEndTimeStr!=null and entity.cashierConfirmEndTimeStr!='' ">
|
||||||
|
AND dsco.cashier_confirm_time <= #{entity.cashierConfirmEndTimeStr}
|
||||||
|
</if>
|
||||||
|
<if test="entity.paymentStatus != null and entity.paymentStatus != '' ">
|
||||||
|
AND dsco.payment_status = #{entity.paymentStatus}
|
||||||
|
</if>
|
||||||
|
<if test="entity.cashierConfirm != null and entity.cashierConfirm != '' ">
|
||||||
|
AND dsco.cashier_Confirm = #{entity.cashierConfirm}
|
||||||
|
</if>
|
||||||
|
<if test="entity.isSign != null">
|
||||||
|
AND dsco.is_sign = #{entity.isSign}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="entity.cashierConfirm != null">
|
||||||
|
AND dsco.cashier_Confirm = #{entity.cashierConfirm}
|
||||||
|
</if>
|
||||||
|
<if test="entity.cashierConfirm == null">
|
||||||
|
AND dsco.cashier_Confirm IS NULL
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="entity.studentIdCard != null and entity.studentIdCard != '' ">
|
||||||
|
<choose>
|
||||||
|
<!-- 精确匹配:当输入18位时 -->
|
||||||
|
<when test="entity.studentIdCard.length() == 18">
|
||||||
|
AND dsco.id_card = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<!-- 后4位匹配:当输入正好4位时 -->
|
||||||
|
<when test="entity.studentIdCard.length() == 4">
|
||||||
|
AND RIGHT(dsco.id_card, 4) = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<!-- 模糊搜索:当输入大于4位但不足18位时 -->
|
||||||
|
<otherwise>
|
||||||
|
AND dsco.id_card LIKE concat('%', #{entity.studentIdCard}, '%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
GROUP BY
|
||||||
|
dsco.user_id,
|
||||||
|
dsco.user_name,
|
||||||
|
dsco.user_no,
|
||||||
|
dsco.user_phone,
|
||||||
|
dsco.create_time,
|
||||||
|
dsco.pay_fees_time,
|
||||||
|
dsco.reserve_money,
|
||||||
|
dsco.course_name,
|
||||||
|
dsco.course_type,
|
||||||
|
dsco.order_remark,
|
||||||
|
dsco.cashier_confirm,
|
||||||
|
dsco.cashier_confirm_remark
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -28,13 +28,50 @@
|
|||||||
ORDER BY dseb.create_time DESC
|
ORDER BY dseb.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryListPageNew" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchItemNewVO">
|
||||||
|
SELECT
|
||||||
|
dsebi.*,
|
||||||
|
dseb.id AS batchItemId,
|
||||||
|
dseb.course_name AS courseName,
|
||||||
|
dseb.subject,
|
||||||
|
dss.phone AS userMobile,
|
||||||
|
dss.avatar,
|
||||||
|
dseb.start_time
|
||||||
|
FROM
|
||||||
|
drive_school_exam_batch dseb
|
||||||
|
LEFT JOIN drive_school_exam_batch_item dsebi ON dsebi.batch_id = dseb.id AND dsebi.deleted = 0
|
||||||
|
LEFT JOIN drive_school_student dss ON dss.user_id = dsebi.user_id AND dss.deleted = 0
|
||||||
|
WHERE dseb.deleted=0
|
||||||
|
<if test="entity.coachId != null and entity.coachId != ''">
|
||||||
|
and dseb.coach_id =#{entity.coachId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.courseId != null and entity.courseId != ''">
|
||||||
|
and dseb.course_id =#{entity.courseId}
|
||||||
|
</if>
|
||||||
|
<if test="entity.subject != null and entity.subject != ''">
|
||||||
|
and dseb.subject =#{entity.subject}
|
||||||
|
</if>
|
||||||
|
<if test="entity.userName != null and entity.userName != ''">
|
||||||
|
and dsebi.user_name LIKE CONCAT('%', #{entity.userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="entity.startTimeSearch!=null and entity.startTimeSearch!=''">
|
||||||
|
AND dseb.start_time >= #{entity.startTimeSearch}
|
||||||
|
</if>
|
||||||
|
<if test="entity.endTimeSearch!=null and entity.endTimeSearch!=''">
|
||||||
|
AND dseb.start_time <= #{entity.endTimeSearch}
|
||||||
|
</if>
|
||||||
|
ORDER BY dseb.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getStudentByCoachId" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO">
|
<select id="getStudentByCoachId" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchNewVO">
|
||||||
SELECT
|
SELECT
|
||||||
dss.name,
|
dss.name,
|
||||||
dss.user_id,
|
dss.user_id,
|
||||||
dss.avatar,
|
dss.avatar,
|
||||||
dss.phone,
|
dss.phone,
|
||||||
dseb.start_time
|
dseb.start_time,
|
||||||
|
dseb.course_name
|
||||||
FROM
|
FROM
|
||||||
drive_school_coach dsc
|
drive_school_coach dsc
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user