更新
This commit is contained in:
parent
ef525bd909
commit
b0c641fb6d
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -31,7 +32,6 @@ public interface DlDriveSchoolStudentService extends IService<DlDriveSchoolStude
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* return boolean
|
||||
*
|
||||
*/
|
||||
DlDriveSchoolStudent getStudentByIdCard(String idCard);
|
||||
|
||||
@ -122,24 +122,33 @@ public interface DlDriveSchoolStudentService extends IService<DlDriveSchoolStude
|
||||
IPage<DlDriveSchoolStudentVO> queryCoachListPage(DlDriveSchoolStudentVO pageReqVO, Page<DlDriveSchoolStudentVO> page);
|
||||
|
||||
/**
|
||||
*
|
||||
* @author PQZ
|
||||
* @date 17:08 2025/2/19
|
||||
* @param type 时间查询类型(01驾校统招,02教练自招,03自来客户)
|
||||
* @param coachId 教练id
|
||||
* @param startTime 查询时间范围--开始
|
||||
* @param endTime 查询时间范围--结束
|
||||
* @return java.util.List<cn.iocoder.yudao.module.base.vo.StudentCountVO>
|
||||
* @author PQZ
|
||||
* @date 17:08 2025/2/19
|
||||
**/
|
||||
List<StudentCountVO> indexGetTrainList(String type, Long coachId, String startTime, String endTime);
|
||||
|
||||
/**
|
||||
* 查自来客户
|
||||
* @author PQZ
|
||||
* @date 11:43 2025/2/20
|
||||
*
|
||||
* @param startTimeStr 查询时间范围--开始
|
||||
* @param endTimeStr 查询时间范围--结束
|
||||
* @return cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO
|
||||
* @author PQZ
|
||||
* @date 11:43 2025/2/20
|
||||
**/
|
||||
List<DlDriveSchoolStaffVO> indexGetFormList(String startTimeStr, String endTimeStr);
|
||||
|
||||
/**
|
||||
* 更新学员拿证时间
|
||||
*
|
||||
* @param passTime 拿证日期
|
||||
* @param userId 学员id
|
||||
* @param tenantId 租户id
|
||||
*/
|
||||
Boolean updateStudentPassAndGradTime(Date passTime, Long userId, String tenantId);
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||
import cn.iocoder.yudao.module.base.constant.SchoolBaseConstants;
|
||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolStudent;
|
||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolStudentMapper;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolStudentService;
|
||||
@ -14,13 +16,16 @@ import cn.iocoder.yudao.module.course.service.ProcessService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -91,7 +96,6 @@ public class DlDriveSchoolStudentServiceImpl extends ServiceImpl<DlDriveSchoolSt
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public DlDriveSchoolStudent getDlDriveSchoolStudent(String id) {
|
||||
return dlDriveSchoolStudentMapper.selectById(id);
|
||||
@ -219,6 +223,7 @@ public class DlDriveSchoolStudentServiceImpl extends ServiceImpl<DlDriveSchoolSt
|
||||
|
||||
/**
|
||||
* 查自来客户
|
||||
*
|
||||
* @param startTimeStr 查询时间范围--开始
|
||||
* @param endTimeStr 查询时间范围--结束
|
||||
* @return cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO
|
||||
@ -230,5 +235,29 @@ public class DlDriveSchoolStudentServiceImpl extends ServiceImpl<DlDriveSchoolSt
|
||||
return dlDriveSchoolStudentMapper.indexGetFormList(startTimeStr, endTimeStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新学员拿证时间
|
||||
*
|
||||
* @param passTime 拿证日期
|
||||
* @param userId 学员id
|
||||
* @param tenantId 租户id
|
||||
*/
|
||||
@TenantIgnore
|
||||
@Override
|
||||
public Boolean updateStudentPassAndGradTime(Date passTime, Long userId, String tenantId) {
|
||||
if (ObjectUtils.isEmpty(passTime) || ObjectUtils.isEmpty(userId) || ObjectUtils.isEmpty(tenantId)) {
|
||||
return false;
|
||||
}
|
||||
// 更新学员拿证时间
|
||||
update(Wrappers.lambdaUpdate(DlDriveSchoolStudent.class)
|
||||
.eq(DlDriveSchoolStudent::getUserId, userId)
|
||||
.eq(DlDriveSchoolStudent::getTenantId, tenantId)
|
||||
.set(DlDriveSchoolStudent::getPassTime, passTime)
|
||||
.eq(DlDriveSchoolStudent::getDeleted, SchoolBaseConstants.COMMON_NO)
|
||||
.set(DlDriveSchoolStudent::getGradTime, new Date()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -52,6 +52,13 @@
|
||||
<if test="entity.courseName != null and entity.courseName != '' "> and dsp.name like concat('%', #{entity.courseName}, '%')</if>
|
||||
<if test="entity.userId != null "> and dsp.user_id = #{entity.userId}</if>
|
||||
</where>
|
||||
order by dsp.create_time desc
|
||||
ORDER BY
|
||||
(CASE
|
||||
WHEN exam_status = '1' AND finance_pass IS NULL THEN 1 -- 优先级最高
|
||||
WHEN exam_status = '9' THEN 2
|
||||
WHEN status = '1' THEN 2
|
||||
ELSE 4
|
||||
END),
|
||||
create_time DESC; -- 再按创建时间降序
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user