Merge branch 'driver'
This commit is contained in:
commit
995aca68b3
@ -22,6 +22,7 @@ import cn.iocoder.yudao.module.constant.InspectionConstants;
|
|||||||
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.ProcessService;
|
import cn.iocoder.yudao.module.course.service.ProcessService;
|
||||||
|
import cn.iocoder.yudao.module.course.service.SchoolCourseSchemeService;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
||||||
import cn.iocoder.yudao.module.exam.mapper.ExamBatchItemMapper;
|
import cn.iocoder.yudao.module.exam.mapper.ExamBatchItemMapper;
|
||||||
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
import cn.iocoder.yudao.module.exam.vo.ExamBatchItemVO;
|
||||||
@ -63,6 +64,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -117,6 +119,9 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
|||||||
@Resource
|
@Resource
|
||||||
private ProcessService processService;
|
private ProcessService processService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SchoolCourseSchemeService schemeService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 驾校教练、普通员工列表
|
* 驾校教练、普通员工列表
|
||||||
@ -1085,6 +1090,18 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<BusinessRecordVO> getBusinessManager(BusinessRecordVO businessRecordVO, Page<BusinessRecordVO> page) {
|
public IPage<BusinessRecordVO> getBusinessManager(BusinessRecordVO businessRecordVO, Page<BusinessRecordVO> page) {
|
||||||
return dlDriveSchoolCoachMapper.getBusinessManager(businessRecordVO, page);
|
IPage<BusinessRecordVO> businessManager = dlDriveSchoolCoachMapper.getBusinessManager(businessRecordVO, page);
|
||||||
|
List<BusinessRecordVO> records = businessManager.getRecords();
|
||||||
|
for (BusinessRecordVO record : records) {
|
||||||
|
BigDecimal deduct = BigDecimal.ZERO;
|
||||||
|
if(record.getScheme() != null){
|
||||||
|
deduct = schemeService.getSchemeById(record.getScheme(), 0);
|
||||||
|
}else{
|
||||||
|
deduct = schemeService.getCourseDeduct(record.getCourseId(), 0);
|
||||||
|
}
|
||||||
|
record.setSubsidy(deduct);
|
||||||
|
}
|
||||||
|
businessManager.setRecords(records);
|
||||||
|
return businessManager;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ public class BusinessRecordVO extends TenantBaseDO {
|
|||||||
private Integer age;
|
private Integer age;
|
||||||
private String sex;
|
private String sex;
|
||||||
private String channel;
|
private String channel;
|
||||||
|
private String courseId;
|
||||||
private String courseName;
|
private String courseName;
|
||||||
private String coachUserName;
|
private String coachUserName;
|
||||||
private BigDecimal reserveMoney;
|
private BigDecimal reserveMoney;
|
||||||
@ -25,5 +26,7 @@ public class BusinessRecordVO extends TenantBaseDO {
|
|||||||
private String businessName;
|
private String businessName;
|
||||||
private String businessPhone;
|
private String businessPhone;
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
private BigDecimal subsidy;
|
||||||
|
private String scheme;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,4 +96,6 @@ public class DlDriveSchoolStaffVO {
|
|||||||
private Date enrollTime;
|
private Date enrollTime;
|
||||||
/**工作性质 */
|
/**工作性质 */
|
||||||
private String workName;
|
private String workName;
|
||||||
|
/**面签时间 */
|
||||||
|
private Date signTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 驾校学员 Response VO")
|
@Schema(description = "管理后台 - 驾校学员 Response VO")
|
||||||
@Data
|
@Data
|
||||||
@ -47,4 +48,6 @@ public class DlDriveSchoolStudentVO extends DlDriveSchoolStudent {
|
|||||||
private Integer isSign;
|
private Integer isSign;
|
||||||
/**查询人员类型*/
|
/**查询人员类型*/
|
||||||
private String pType;
|
private String pType;
|
||||||
|
/**面签时间*/
|
||||||
|
private Date signTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -235,6 +235,13 @@ public class ProcessController {
|
|||||||
return success(processService.getPassStudent(coachId, subject, courseType, name, sort, page));
|
return success(processService.getPassStudent(coachId, subject, courseType, name, sort, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出界面获取数据
|
||||||
|
* @param exportVO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("/getProcessExportData")
|
@GetMapping("/getProcessExportData")
|
||||||
public CommonResult<IPage<ProcessExportVO>> getProcessExportData(ProcessExportVO exportVO,
|
public CommonResult<IPage<ProcessExportVO>> getProcessExportData(ProcessExportVO exportVO,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -243,14 +250,20 @@ public class ProcessController {
|
|||||||
return success(processService.getProcessExportData(exportVO, page));
|
return success(processService.getProcessExportData(exportVO, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出
|
||||||
|
* @param exportVO
|
||||||
|
* @param response
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public void exportCommission(ProcessExportVO exportVO, HttpServletResponse response) throws IOException {
|
public void exportCommission(ProcessExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
// 1. 校验导出类型
|
// 校验导出类型
|
||||||
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
||||||
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 根据不同类型查询数据
|
// 根据不同类型查询数据
|
||||||
List<ProcessExportVO> exportData;
|
List<ProcessExportVO> exportData;
|
||||||
String fileName = "学员进度记录";
|
String fileName = "学员进度记录";
|
||||||
|
|
||||||
@ -270,7 +283,7 @@ public class ProcessController {
|
|||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
}
|
}
|
||||||
// 4. 导出Excel
|
// 导出Excel
|
||||||
ExcelUtils.write(response, fileName + ".xlsx", "学员进度记录", ProcessExportVO.class, exportData);
|
ExcelUtils.write(response, fileName + ".xlsx", "学员进度记录", ProcessExportVO.class, exportData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ 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.CommissionExportVO;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionStatisticsVO;
|
||||||
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;
|
||||||
@ -114,6 +115,11 @@ public class SchoolCommissionController {
|
|||||||
return success(schoolCommissionService.getAllCommissionPage(commissionExportVO, page));
|
return success(schoolCommissionService.getAllCommissionPage(commissionExportVO, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getCommissionStatistics")
|
||||||
|
public CommonResult<CommissionStatisticsVO> getCommissionStatistics(CommissionExportVO commissionExportVO){
|
||||||
|
return success(schoolCommissionService.getCommissionStatistics(commissionExportVO));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出数据(支持三种模式)
|
* 导出数据(支持三种模式)
|
||||||
* @param exportVO 包含导出类型(exportType)、分页参数等
|
* @param exportVO 包含导出类型(exportType)、分页参数等
|
||||||
@ -147,21 +153,19 @@ public class SchoolCommissionController {
|
|||||||
}*/
|
}*/
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public void exportCommission(CommissionExportVO exportVO, HttpServletResponse response) throws IOException {
|
public void exportCommission(CommissionExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
// 1. 校验导出类型
|
// 校验导出类型
|
||||||
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
||||||
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 根据不同类型查询数据
|
// 根据不同类型查询数据
|
||||||
List<CommissionExportVO> exportData;
|
List<CommissionExportVO> exportData;
|
||||||
String fileName = "提成记录";
|
String fileName = "提成记录";
|
||||||
int offset = 0; // 序号偏移量(用于分页连续)
|
|
||||||
|
|
||||||
switch (exportVO.getExportType()) {
|
switch (exportVO.getExportType()) {
|
||||||
case "current":
|
case "current":
|
||||||
exportData = schoolCommissionService.getCommissionList(exportVO);
|
exportData = schoolCommissionService.getCommissionList(exportVO);
|
||||||
fileName += "_第" + exportVO.getPageNo() + "页";
|
fileName += "_第" + exportVO.getPageNo() + "页";
|
||||||
offset = (exportVO.getPageNo() - 1) * exportVO.getPageSize(); // 计算分页偏移
|
|
||||||
break;
|
break;
|
||||||
case "all":
|
case "all":
|
||||||
exportData = schoolCommissionService.getAllCommissionList(exportVO);
|
exportData = schoolCommissionService.getAllCommissionList(exportVO);
|
||||||
@ -170,20 +174,12 @@ public class SchoolCommissionController {
|
|||||||
case "range":
|
case "range":
|
||||||
exportData = schoolCommissionService.getCommissionListByRange(exportVO);
|
exportData = schoolCommissionService.getCommissionListByRange(exportVO);
|
||||||
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
||||||
offset = (exportVO.getStartPage() - 1) * exportVO.getPageSize(); // 自定义范围偏移
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 设置序号(考虑分页偏移)
|
// 导出Excel
|
||||||
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);
|
ExcelUtils.write(response, fileName + ".xlsx", "提成记录", CommissionExportVO.class, exportData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -203,24 +203,27 @@ public class SchoolCourseOrderController {
|
|||||||
return success(schoolCourseOrderService.getOrderExportData(exportVO, page));
|
return success(schoolCourseOrderService.getOrderExportData(exportVO, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getOrderStatistics")
|
||||||
|
public CommonResult<CourseOrderStatisticsVO> getOrderStatistics(CourseOrderExportVO exportVO) {
|
||||||
|
return success(schoolCourseOrderService.getOrderStatistics(exportVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public void exportCommission(CourseOrderExportVO exportVO, HttpServletResponse response) throws IOException {
|
public void exportCommission(CourseOrderExportVO exportVO, HttpServletResponse response) throws IOException {
|
||||||
// 1. 校验导出类型
|
// 校验导出类型
|
||||||
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
if (exportVO.getExportType() == null || !Arrays.asList("current", "all", "range").contains(exportVO.getExportType())) {
|
||||||
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 根据不同类型查询数据
|
// 根据不同类型查询数据
|
||||||
List<CourseOrderExportVO> exportData;
|
List<CourseOrderExportVO> exportData;
|
||||||
String fileName = "学员记录";
|
String fileName = "学员记录";
|
||||||
int offset = 0; // 序号偏移量(用于分页连续)
|
|
||||||
|
|
||||||
switch (exportVO.getExportType()) {
|
switch (exportVO.getExportType()) {
|
||||||
case "current":
|
case "current":
|
||||||
exportData = schoolCourseOrderService.getOrderList(exportVO);
|
exportData = schoolCourseOrderService.getOrderList(exportVO);
|
||||||
fileName += "_第" + exportVO.getPageNo() + "页";
|
fileName += "_第" + exportVO.getPageNo() + "页";
|
||||||
offset = (exportVO.getPageNo() - 1) * exportVO.getPageSize(); // 计算分页偏移
|
|
||||||
break;
|
break;
|
||||||
case "all":
|
case "all":
|
||||||
exportData = schoolCourseOrderService.getAllOrderList(exportVO);
|
exportData = schoolCourseOrderService.getAllOrderList(exportVO);
|
||||||
@ -229,20 +232,13 @@ public class SchoolCourseOrderController {
|
|||||||
case "range":
|
case "range":
|
||||||
exportData = schoolCourseOrderService.getOrderListByRange(exportVO);
|
exportData = schoolCourseOrderService.getOrderListByRange(exportVO);
|
||||||
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
fileName += "_" + exportVO.getStartPage() + "-" + exportVO.getEndPage() + "页";
|
||||||
offset = (exportVO.getStartPage() - 1) * exportVO.getPageSize(); // 自定义范围偏移
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("无效的导出类型: " + exportVO.getExportType());
|
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
|
// 导出Excel
|
||||||
ExcelUtils.write(response, fileName + ".xlsx", "学员记录", CourseOrderExportVO.class, exportData);
|
ExcelUtils.write(response, fileName + ".xlsx", "学员记录", CourseOrderExportVO.class, exportData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -111,4 +111,14 @@ public class SchoolCommission extends TenantBaseDO {
|
|||||||
*/
|
*/
|
||||||
private Long cashierUserId;
|
private Long cashierUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考试通过时间
|
||||||
|
*/
|
||||||
|
private Date examTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缴纳学费金额
|
||||||
|
*/
|
||||||
|
private BigDecimal studentPay;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,5 +164,10 @@ public class SchoolCourseOrder extends TenantBaseDO {
|
|||||||
*/
|
*/
|
||||||
private Date payFeesTime;
|
private Date payFeesTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收款账号
|
||||||
|
*/
|
||||||
|
private String paymentAccount;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ 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.CommissionExportVO;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionStatisticsVO;
|
||||||
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;
|
||||||
@ -42,4 +43,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);
|
IPage<CommissionExportVO> getCommissionListExport(@Param("entity") CommissionExportVO entity, Page<CommissionExportVO> page);
|
||||||
|
CommissionStatisticsVO getCommissionStatistics(@Param("entity") CommissionExportVO entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +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.*;
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderBusinessVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
|
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
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;
|
||||||
@ -73,4 +70,6 @@ public interface SchoolCourseOrderMapper extends BaseMapper<SchoolCourseOrder> {
|
|||||||
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);
|
IPage<CourseOrderExportVO> getOrderExportData(@Param("entity")CourseOrderExportVO entity, Page<CourseOrderExportVO> page);
|
||||||
|
|
||||||
|
CourseOrderStatisticsVO getOrderStatistics(@Param("entity")CourseOrderExportVO entity);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ 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.CommissionExportVO;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionStatisticsVO;
|
||||||
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;
|
||||||
@ -59,6 +60,7 @@ 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);
|
IPage<CommissionExportVO> getAllCommissionPage(CommissionExportVO exportVO,Page<CommissionExportVO> page);
|
||||||
|
CommissionStatisticsVO getCommissionStatistics(CommissionExportVO exportVO);
|
||||||
|
|
||||||
public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO);
|
public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO);
|
||||||
public List<CommissionExportVO> getAllCommissionList(CommissionExportVO exportVO);
|
public List<CommissionExportVO> getAllCommissionList(CommissionExportVO exportVO);
|
||||||
|
|||||||
@ -143,6 +143,7 @@ public interface SchoolCourseOrderService extends IService<SchoolCourseOrder> {
|
|||||||
|
|
||||||
|
|
||||||
IPage<CourseOrderExportVO> getOrderExportData(CourseOrderExportVO exportVO, Page<CourseOrderExportVO> page);
|
IPage<CourseOrderExportVO> getOrderExportData(CourseOrderExportVO exportVO, Page<CourseOrderExportVO> page);
|
||||||
|
CourseOrderStatisticsVO getOrderStatistics(CourseOrderExportVO exportVO);
|
||||||
|
|
||||||
List<CourseOrderExportVO> getOrderList(CourseOrderExportVO exportVO);
|
List<CourseOrderExportVO> getOrderList(CourseOrderExportVO exportVO);
|
||||||
List<CourseOrderExportVO> getAllOrderList(CourseOrderExportVO exportVO);
|
List<CourseOrderExportVO> getAllOrderList(CourseOrderExportVO exportVO);
|
||||||
|
|||||||
@ -405,6 +405,8 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
|
|||||||
schoolCommission.setCheckName(sysUser.getNickname());
|
schoolCommission.setCheckName(sysUser.getNickname());
|
||||||
schoolCommission.setCheckRemark(process.getFinanceRemark());
|
schoolCommission.setCheckRemark(process.getFinanceRemark());
|
||||||
schoolCommission.setStudentIdCard(process.getStudentIdCard());
|
schoolCommission.setStudentIdCard(process.getStudentIdCard());
|
||||||
|
schoolCommission.setExamTime(process.getExamTime());
|
||||||
|
schoolCommission.setStudentPay(process.getStudentPay());
|
||||||
|
|
||||||
// 检查是否已存在记录
|
// 检查是否已存在记录
|
||||||
SchoolCommission existing = schoolCommissionService.getOne(
|
SchoolCommission existing = schoolCommissionService.getOne(
|
||||||
|
|||||||
@ -6,6 +6,7 @@ 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.CommissionExportVO;
|
||||||
|
import cn.iocoder.yudao.module.course.vo.CommissionStatisticsVO;
|
||||||
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;
|
||||||
@ -169,6 +170,11 @@ public class SchoolCommissionServiceImpl extends ServiceImpl<SchoolCommissionMap
|
|||||||
return schoolCommissionMapper.getCommissionListExport(exportVO, page);
|
return schoolCommissionMapper.getCommissionListExport(exportVO, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommissionStatisticsVO getCommissionStatistics(CommissionExportVO exportVO) {
|
||||||
|
return schoolCommissionMapper.getCommissionStatistics(exportVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO) {
|
public List<CommissionExportVO> getCommissionList(CommissionExportVO exportVO) {
|
||||||
@ -203,4 +209,6 @@ public class SchoolCommissionServiceImpl extends ServiceImpl<SchoolCommissionMap
|
|||||||
}
|
}
|
||||||
return allData;
|
return allData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -638,6 +638,11 @@ public class SchoolCourseOrderServiceImpl extends ServiceImpl<SchoolCourseOrderM
|
|||||||
return schoolCourseOrderMapper.getOrderExportData(exportVO, page);
|
return schoolCourseOrderMapper.getOrderExportData(exportVO, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CourseOrderStatisticsVO getOrderStatistics(CourseOrderExportVO exportVO) {
|
||||||
|
return schoolCourseOrderMapper.getOrderStatistics(exportVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CourseOrderExportVO> getOrderList(CourseOrderExportVO exportVO) {
|
public List<CourseOrderExportVO> getOrderList(CourseOrderExportVO exportVO) {
|
||||||
// 分页查询当前页
|
// 分页查询当前页
|
||||||
|
|||||||
@ -7,59 +7,76 @@ import com.alibaba.excel.annotation.format.DateTimeFormat;
|
|||||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CommissionExportVO {
|
public class CommissionExportVO {
|
||||||
|
|
||||||
@ExcelProperty(value = " ", index = 0)
|
/*@ExcelProperty(value = " ", index = 0)
|
||||||
@ColumnWidth(8)
|
@ColumnWidth(8)
|
||||||
private Integer serialNumber;
|
private Integer serialNumber;*/
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long coachId;
|
private Long coachId;
|
||||||
|
|
||||||
@ExcelProperty(value = "教练", index = 1)
|
@ExcelProperty(value = "教练", index = 0)
|
||||||
private String coachName;
|
private String coachName;
|
||||||
|
|
||||||
@ExcelProperty(value = "教练身份证号", index = 2)
|
@ExcelProperty(value = "教练身份证号", index = 1)
|
||||||
private String coachIdCard;
|
private String coachIdCard;
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long studentId;
|
private Long studentId;
|
||||||
|
|
||||||
@ExcelProperty(value = "学员", index = 3)
|
@ExcelProperty(value = "学员", index = 2)
|
||||||
private String studentName;
|
private String studentName;
|
||||||
|
|
||||||
@ExcelProperty(value = "学员身份证号", index = 4)
|
@ExcelProperty(value = "学员身份证号", index = 3)
|
||||||
private String studentIdCard;
|
private String studentIdCard;
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String courseId;
|
private String courseId;
|
||||||
|
|
||||||
@ExcelProperty(value = "课程名称", index = 5)
|
@ExcelProperty(value = "课程名称", index = 4)
|
||||||
private String courseName;
|
private String courseName;
|
||||||
|
|
||||||
@ExcelProperty(value = "课程类型", index = 6)
|
@ExcelProperty(value = "课程类型", index = 5)
|
||||||
private String courseType;
|
private String courseType;
|
||||||
|
|
||||||
@ExcelProperty(value = "科目", index = 7)
|
@ExcelProperty(value = "科目", index = 6)
|
||||||
private String subject;
|
private String subject;
|
||||||
|
|
||||||
@ExcelProperty(value = "提成金额(元)", index = 8)
|
@ExcelIgnore
|
||||||
|
private Date examTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "考试通过时间", index = 7)
|
||||||
|
private String examTimeStr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "缴纳学费金额", index = 8)
|
||||||
|
private BigDecimal studentPay;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "提成金额(元)", index = 9)
|
||||||
private String commissionAmount;
|
private String commissionAmount;
|
||||||
|
|
||||||
@ExcelProperty(value = "审核人", index = 9)
|
@ExcelProperty(value = "审核人", index = 10)
|
||||||
private String checkName;
|
private String checkName;
|
||||||
|
|
||||||
@ExcelProperty(value = "审核时间", index = 10)
|
@ExcelProperty(value = "审核时间", index = 11)
|
||||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
// @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private Date createTime;
|
private String createTimeStr;
|
||||||
|
|
||||||
@ExcelProperty(value = "备注", index = 11)
|
@ExcelProperty(value = "备注", index = 12)
|
||||||
private String checkRemark;
|
private String checkRemark;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "渠道", index = 13)
|
||||||
|
private String sourceStr;
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String startTimeStr;
|
private String startTimeStr;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
@ -80,4 +97,45 @@ public class CommissionExportVO {
|
|||||||
private Integer startPage;
|
private Integer startPage;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Integer endPage;
|
private Integer endPage;
|
||||||
|
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
if (createTime != null) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
this.createTimeStr = sdf.format(createTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void setExamTime(Date examTime) {
|
||||||
|
if (examTime != null) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
this.examTimeStr = sdf.format(examTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
|
||||||
|
if (source == null) {
|
||||||
|
this.sourceStr = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (source) {
|
||||||
|
case "01":
|
||||||
|
this.sourceStr = "驾校统招";
|
||||||
|
break;
|
||||||
|
case "02":
|
||||||
|
this.sourceStr = "教练自招";
|
||||||
|
break;
|
||||||
|
case "03":
|
||||||
|
this.sourceStr = "自来客户";
|
||||||
|
break;
|
||||||
|
case "04":
|
||||||
|
this.sourceStr = "业务经理统招";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.sourceStr = "未知渠道";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.course.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
@Data
|
||||||
|
public class CommissionStatisticsVO {
|
||||||
|
// 科二合格数
|
||||||
|
private Integer subject2PassCount;
|
||||||
|
// 科二提成
|
||||||
|
private BigDecimal subject2Commission;
|
||||||
|
// 科三合格数
|
||||||
|
private Integer subject3PassCount;
|
||||||
|
// 科三提成
|
||||||
|
private BigDecimal subject3Commission;
|
||||||
|
// 总合格数
|
||||||
|
private Integer totalPassCount;
|
||||||
|
// 总提成金额
|
||||||
|
private BigDecimal totalCommission;
|
||||||
|
}
|
||||||
@ -7,47 +7,73 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CourseOrderExportVO {
|
public class CourseOrderExportVO {
|
||||||
|
|
||||||
@ExcelProperty(value = " ", index = 0)
|
/*@ExcelProperty(value = " ", index = 0)
|
||||||
@ColumnWidth(8)
|
@ColumnWidth(8)
|
||||||
private Integer serialNumber;
|
private Integer serialNumber;*/
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long studentId;
|
private Long studentId;
|
||||||
|
|
||||||
@ExcelProperty(value = "学员姓名", index = 1)
|
@ExcelProperty(value = "学员姓名", index = 0)
|
||||||
private String studentName;
|
private String studentName;
|
||||||
|
|
||||||
@ExcelProperty(value = "学员身份证号", index = 2)
|
@ExcelProperty(value = "学员身份证号", index = 1)
|
||||||
private String studentIdCard;
|
private String studentIdCard;
|
||||||
|
|
||||||
@ExcelProperty(value = "学员手机号", index = 3)
|
@ExcelProperty(value = "学员手机号", index = 2)
|
||||||
private String studentPhone;
|
private String studentPhone;
|
||||||
|
|
||||||
@ExcelProperty(value = "学员报名时间", index = 4)
|
/*@ExcelProperty(value = "学员报名时间", index = 4)
|
||||||
@DateTimeFormat("yyyy-MM-dd")
|
@DateTimeFormat("yyyy-MM-dd")*/
|
||||||
|
@ExcelIgnore
|
||||||
private Date signUpTime;
|
private Date signUpTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "学员报名时间", index = 3)
|
||||||
|
private String signUpTimeStr;
|
||||||
|
|
||||||
|
public void setSignUpTime(Date signUpTime) {
|
||||||
|
if (signUpTime != null) {
|
||||||
|
this.signUpTimeStr = new SimpleDateFormat("yyyy-MM-dd").format(signUpTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Long courseId;
|
private Long courseId;
|
||||||
|
|
||||||
@ExcelProperty(value = "课程名称", index = 5)
|
@ExcelProperty(value = "课程名称", index = 4)
|
||||||
private String courseName;
|
private String courseName;
|
||||||
|
|
||||||
@ExcelProperty(value = "课程类型", index = 6)
|
@ExcelProperty(value = "课程类型", index = 5)
|
||||||
private String courseType;
|
private String courseType;
|
||||||
|
|
||||||
@ExcelProperty(value = "缴费金额", index = 7)
|
@ExcelProperty(value = "缴费金额", index = 6)
|
||||||
private BigDecimal reserveMoney;
|
private BigDecimal reserveMoney;
|
||||||
|
|
||||||
@ExcelProperty(value = "缴费时间", index = 8)
|
/*@ExcelProperty(value = "缴费时间", index = 8)
|
||||||
@DateTimeFormat("yyyy-MM-dd")
|
@DateTimeFormat("yyyy-MM-dd")*/
|
||||||
|
@ExcelIgnore
|
||||||
private Date payFeesTime;
|
private Date payFeesTime;
|
||||||
|
@ExcelProperty(value = "缴费时间", index = 7)
|
||||||
|
private String payFeesTimeStr;
|
||||||
|
|
||||||
|
public void setPayFeesTimeStr(Date payFeesTime) {
|
||||||
|
if (payFeesTime != null) {
|
||||||
|
this.payFeesTimeStr = new SimpleDateFormat("yyyy-MM-dd").format(payFeesTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "渠道", index = 8)
|
||||||
|
private String sourceStr;
|
||||||
|
|
||||||
@ExcelProperty(value = "订单备注", index = 9)
|
@ExcelProperty(value = "订单备注", index = 9)
|
||||||
private String orderRemark;
|
private String orderRemark;
|
||||||
@ -80,13 +106,25 @@ public class CourseOrderExportVO {
|
|||||||
@ExcelProperty(value = "出纳是否确认收款", index = 16)
|
@ExcelProperty(value = "出纳是否确认收款", index = 16)
|
||||||
private String cashierConfirmDisplay;
|
private String cashierConfirmDisplay;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "收款账号", index = 17)
|
||||||
|
private String paymentAccount;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Integer cashierConfirm;
|
private Integer cashierConfirm;
|
||||||
|
|
||||||
@ExcelProperty(value = "出纳确认时间", index = 17)
|
/*@ExcelProperty(value = "出纳确认时间", index = 17)*/
|
||||||
|
@ExcelIgnore
|
||||||
private Date cashierConfirmTime;
|
private Date cashierConfirmTime;
|
||||||
|
|
||||||
@ExcelProperty(value = "出纳备注", index = 18)
|
@ExcelProperty(value = "出纳确认时间", index = 18)
|
||||||
|
private String cashierConfirmTimeStr;
|
||||||
|
|
||||||
|
public void setCashierConfirmTime(Date cashierConfirmTime) {
|
||||||
|
if (cashierConfirmTime != null) {
|
||||||
|
this.cashierConfirmTimeStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(cashierConfirmTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExcelProperty(value = "出纳备注", index = 19)
|
||||||
private String cashierConfirmRemark;
|
private String cashierConfirmRemark;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,4 +192,32 @@ public class CourseOrderExportVO {
|
|||||||
return "未知状态";
|
return "未知状态";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
|
||||||
|
if (source == null) {
|
||||||
|
this.sourceStr = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (source) {
|
||||||
|
case "01":
|
||||||
|
this.sourceStr = "驾校统招";
|
||||||
|
break;
|
||||||
|
case "02":
|
||||||
|
this.sourceStr = "教练自招";
|
||||||
|
break;
|
||||||
|
case "03":
|
||||||
|
this.sourceStr = "自来客户";
|
||||||
|
break;
|
||||||
|
case "04":
|
||||||
|
this.sourceStr = "业务经理统招";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.sourceStr = "未知渠道";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
package cn.iocoder.yudao.module.course.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CourseOrderStatisticsVO {
|
||||||
|
/** 招生人数 */
|
||||||
|
private Integer studentCount;
|
||||||
|
|
||||||
|
/** 招生金额总和 */
|
||||||
|
private BigDecimal totalAmount;
|
||||||
|
|
||||||
|
/** 科目二提成金额总和 */
|
||||||
|
private BigDecimal subject2DeductTotal;
|
||||||
|
|
||||||
|
/** 科目三提成金额总和 */
|
||||||
|
private BigDecimal subject3DeductTotal;
|
||||||
|
}
|
||||||
@ -44,4 +44,9 @@ public class ProcessVO extends Process {
|
|||||||
* 出纳确认情况
|
* 出纳确认情况
|
||||||
*/
|
*/
|
||||||
private String cashierConfirm;
|
private String cashierConfirm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渠道
|
||||||
|
*/
|
||||||
|
private String source;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,6 +134,7 @@
|
|||||||
dss.sex,
|
dss.sex,
|
||||||
dss.channel,
|
dss.channel,
|
||||||
dsco.course_name,
|
dsco.course_name,
|
||||||
|
dsco.course_id,
|
||||||
dsco.coach_user_name,
|
dsco.coach_user_name,
|
||||||
dsco.reserve_money,
|
dsco.reserve_money,
|
||||||
dsco.rest_money,
|
dsco.rest_money,
|
||||||
|
|||||||
@ -69,7 +69,8 @@
|
|||||||
dsco.rest_money,
|
dsco.rest_money,
|
||||||
dsco.if_end,
|
dsco.if_end,
|
||||||
dsco.create_time AS enrollTime,
|
dsco.create_time AS enrollTime,
|
||||||
dsco.user_no AS studentIdCard
|
dsco.user_no AS studentIdCard,
|
||||||
|
dsco.sign_time
|
||||||
FROM
|
FROM
|
||||||
drive_school_student main
|
drive_school_student main
|
||||||
LEFT JOIN drive_school_course_order dsco ON main.user_id = dsco.user_id
|
LEFT JOIN drive_school_course_order dsco ON main.user_id = dsco.user_id
|
||||||
@ -435,11 +436,12 @@
|
|||||||
|
|
||||||
<select id="selectTrainStudent" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO">
|
<select id="selectTrainStudent" resultType="cn.iocoder.yudao.module.base.vo.DlDriveSchoolStudentVO">
|
||||||
SELECT
|
SELECT
|
||||||
dss.*,dsc.type AS courseType,dst.subject
|
dss.*,dsc.type AS courseType,dst.subject, dsco.sign_time
|
||||||
FROM
|
FROM
|
||||||
drive_school_student dss
|
drive_school_student dss
|
||||||
LEFT JOIN drive_school_train dst ON dss.user_id = dst.user_id AND dst.deleted = 0
|
LEFT JOIN drive_school_train dst ON dss.user_id = dst.user_id AND dst.deleted = 0
|
||||||
LEFT JOIN drive_school_course dsc ON dst.course_id = dsc.id
|
LEFT JOIN drive_school_course dsc ON dst.course_id = dsc.id
|
||||||
|
LEFT JOIN drive_school_course_order dsco ON dsco.user_id = dss.user_id AND dsco.deleted = 0 AND dsco.if_end = 0 AND dsco.is_sign = 1
|
||||||
WHERE
|
WHERE
|
||||||
dst.id IS NOT NULL
|
dst.id IS NOT NULL
|
||||||
AND dss.deleted = 0
|
AND dss.deleted = 0
|
||||||
|
|||||||
@ -114,7 +114,10 @@
|
|||||||
dsc.subject,
|
dsc.subject,
|
||||||
dsc.check_name,
|
dsc.check_name,
|
||||||
dsc.check_remark,
|
dsc.check_remark,
|
||||||
dsc.create_time
|
dsc.create_time,
|
||||||
|
dsc.exam_time,
|
||||||
|
dsc.student_pay,
|
||||||
|
student.source
|
||||||
FROM drive_school_commission dsc
|
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_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_course course ON course.id = dsc.course_id AND course.deleted = 0
|
||||||
@ -135,6 +138,9 @@
|
|||||||
<if test="entity.subject != null and entity.subject != '' ">
|
<if test="entity.subject != null and entity.subject != '' ">
|
||||||
AND dsc.subject = #{entity.subject}
|
AND dsc.subject = #{entity.subject}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entity.source != null and entity.source != '' ">
|
||||||
|
AND student.source = #{entity.source}
|
||||||
|
</if>
|
||||||
<if test="entity.checkName != null and entity.checkName != '' ">
|
<if test="entity.checkName != null and entity.checkName != '' ">
|
||||||
AND dsc.check_name LIKE CONCAT('%', #{entity.checkName}, '%')
|
AND dsc.check_name LIKE CONCAT('%', #{entity.checkName}, '%')
|
||||||
</if>
|
</if>
|
||||||
@ -162,4 +168,60 @@
|
|||||||
</if>
|
</if>
|
||||||
order BY dsc.create_time DESC
|
order BY dsc.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getCommissionStatistics" resultType="cn.iocoder.yudao.module.course.vo.CommissionStatisticsVO">
|
||||||
|
SELECT
|
||||||
|
SUM(CASE WHEN dsc.subject = 2 THEN 1 ELSE 0 END) AS subject2PassCount,
|
||||||
|
SUM(CASE WHEN dsc.subject = 2 THEN dsc.commission_amount ELSE 0 END) AS subject2Commission,
|
||||||
|
SUM(CASE WHEN dsc.subject = 3 THEN 1 ELSE 0 END) AS subject3PassCount,
|
||||||
|
SUM(CASE WHEN dsc.subject = 3 THEN dsc.commission_amount ELSE 0 END) AS subject3Commission,
|
||||||
|
COUNT(*) AS totalPassCount,
|
||||||
|
SUM(dsc.commission_amount) AS totalCommission
|
||||||
|
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)
|
||||||
|
<!-- 这里保持与getCommissionListNoPage相同的条件 -->
|
||||||
|
<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.source != null and entity.source != '' ">
|
||||||
|
AND student.source = #{entity.source}
|
||||||
|
</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>
|
||||||
|
<when test="entity.studentIdCard.length() == 18">
|
||||||
|
AND student.id_card = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<when test="entity.studentIdCard.length() == 4">
|
||||||
|
AND RIGHT(student.id_card, 4) = #{entity.studentIdCard}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
AND student.id_card LIKE concat('%', #{entity.studentIdCard}, '%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -302,6 +302,8 @@
|
|||||||
dsco.order_remark,
|
dsco.order_remark,
|
||||||
dsco.cashier_confirm,
|
dsco.cashier_confirm,
|
||||||
dsco.cashier_confirm_remark,
|
dsco.cashier_confirm_remark,
|
||||||
|
dss.source,
|
||||||
|
dsco.payment_account,
|
||||||
MAX(CASE WHEN dsp.subject = 2 THEN COALESCE(dsp.coach_name, '') END) AS subject2CoachName,
|
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 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 dsp.subject = 3 THEN COALESCE(dsp.coach_name, '') END) AS subject3CoachName,
|
||||||
@ -310,6 +312,7 @@
|
|||||||
drive_school_course_order dsco
|
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_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
|
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
|
||||||
|
LEFT JOIN drive_school_student dss ON dsco.user_id = dss.user_id AND dss.deleted = 0
|
||||||
WHERE dsco.deleted = 0
|
WHERE dsco.deleted = 0
|
||||||
AND dsco.if_end = 0
|
AND dsco.if_end = 0
|
||||||
<if test="entity.courseId != null and entity.courseId != '' ">
|
<if test="entity.courseId != null and entity.courseId != '' ">
|
||||||
@ -348,9 +351,9 @@
|
|||||||
<if test="entity.paymentStatus != null and entity.paymentStatus != '' ">
|
<if test="entity.paymentStatus != null and entity.paymentStatus != '' ">
|
||||||
AND dsco.payment_status = #{entity.paymentStatus}
|
AND dsco.payment_status = #{entity.paymentStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="entity.cashierConfirm != null and entity.cashierConfirm != '' ">
|
<!--<if test="entity.cashierConfirm != null and entity.cashierConfirm != '' ">
|
||||||
AND dsco.cashier_Confirm = #{entity.cashierConfirm}
|
AND dsco.cashier_Confirm = #{entity.cashierConfirm}
|
||||||
</if>
|
</if>-->
|
||||||
<if test="entity.isSign != null">
|
<if test="entity.isSign != null">
|
||||||
AND dsco.is_sign = #{entity.isSign}
|
AND dsco.is_sign = #{entity.isSign}
|
||||||
</if>
|
</if>
|
||||||
@ -361,7 +364,9 @@
|
|||||||
<if test="entity.cashierConfirm == null">
|
<if test="entity.cashierConfirm == null">
|
||||||
AND dsco.cashier_Confirm IS NULL
|
AND dsco.cashier_Confirm IS NULL
|
||||||
</if>
|
</if>
|
||||||
|
<if test="entity.source != null and entity.source != '' ">
|
||||||
|
AND dss.source = #{entity.source}
|
||||||
|
</if>
|
||||||
<if test="entity.studentIdCard != null and entity.studentIdCard != '' ">
|
<if test="entity.studentIdCard != null and entity.studentIdCard != '' ">
|
||||||
<choose>
|
<choose>
|
||||||
<!-- 精确匹配:当输入18位时 -->
|
<!-- 精确匹配:当输入18位时 -->
|
||||||
@ -392,4 +397,84 @@
|
|||||||
dsco.cashier_confirm,
|
dsco.cashier_confirm,
|
||||||
dsco.cashier_confirm_remark
|
dsco.cashier_confirm_remark
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOrderStatistics" resultType="cn.iocoder.yudao.module.course.vo.CourseOrderStatisticsVO">
|
||||||
|
SELECT
|
||||||
|
COUNT(DISTINCT dsco.user_id) AS studentCount,
|
||||||
|
SUM(dsco.reserve_money) AS totalAmount,
|
||||||
|
SUM(CASE WHEN dscd.course_subject = 2 THEN COALESCE(dscd.deduct, 0) ELSE 0 END) AS subject2DeductTotal,
|
||||||
|
SUM(CASE WHEN dscd.course_subject = 3 THEN COALESCE(dscd.deduct, 0) ELSE 0 END) AS subject3DeductTotal
|
||||||
|
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
|
||||||
|
LEFT JOIN drive_school_student dss ON dsco.user_id = dss.user_id AND dss.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.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.source != null and entity.source != '' ">
|
||||||
|
AND dss.source = #{entity.source}
|
||||||
|
</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>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user