|
@@ -4,10 +4,23 @@ package com.citu.module.menduner.system.dal.mysql.person;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.mybatis.core.mapper.BaseMapperX;
|
|
|
import com.citu.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
+import com.citu.framework.mybatis.core.query.MPJLambdaWrapperX;
|
|
|
+import com.citu.module.menduner.system.controller.base.CommonRespVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.analysis.RecruitAnalysisPageReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.person.student.StudentPracticeRecordDetailRespVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.student.StudentPracticeRecordPageReqVO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.enterprise.EnterpriseDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.job.JobAdvertisedDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.job.JobCvRelDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.person.PersonInfoDO;
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.person.StudentDO;
|
|
|
import com.citu.module.menduner.system.dal.dataobject.person.StudentPracticeRecordDO;
|
|
|
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 学生实习记录 Mapper
|
|
|
*
|
|
@@ -18,16 +31,12 @@ public interface StudentPracticeRecordMapper extends BaseMapperX<StudentPractice
|
|
|
|
|
|
default PageResult<StudentPracticeRecordDO> selectPage(StudentPracticeRecordPageReqVO reqVO) {
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<StudentPracticeRecordDO>()
|
|
|
- .eqIfPresent(StudentPracticeRecordDO::getUserId, reqVO.getUserId())
|
|
|
- .eqIfPresent(StudentPracticeRecordDO::getPersonId, reqVO.getPersonId())
|
|
|
- .eqIfPresent(StudentPracticeRecordDO::getStudentId, reqVO.getStudentId())
|
|
|
.eqIfPresent(StudentPracticeRecordDO::getEnterpriseId, reqVO.getEnterpriseId())
|
|
|
.eqIfPresent(StudentPracticeRecordDO::getJobId, reqVO.getJobId())
|
|
|
.eqIfPresent(StudentPracticeRecordDO::getJobFairId, reqVO.getJobFairId())
|
|
|
.betweenIfPresent(StudentPracticeRecordDO::getStartTime, reqVO.getStartTime())
|
|
|
.betweenIfPresent(StudentPracticeRecordDO::getEndTime, reqVO.getEndTime())
|
|
|
.eqIfPresent(StudentPracticeRecordDO::getStatus, reqVO.getStatus())
|
|
|
- .betweenIfPresent(StudentPracticeRecordDO::getCreateTime, reqVO.getCreateTime())
|
|
|
.orderByDesc(StudentPracticeRecordDO::getId));
|
|
|
}
|
|
|
|
|
@@ -35,4 +44,56 @@ public interface StudentPracticeRecordMapper extends BaseMapperX<StudentPractice
|
|
|
return selectOne(StudentPracticeRecordDO::getInviteId, inviteId);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 招聘端-企业分页查询实习的学生信息
|
|
|
+ */
|
|
|
+ default PageResult<StudentPracticeRecordDetailRespVO> page(StudentPracticeRecordPageReqVO reqVO) {
|
|
|
+ MPJLambdaWrapperX<StudentPracticeRecordDO> wrapper =
|
|
|
+ new MPJLambdaWrapperX<>();
|
|
|
+ wrapper.selectAll(StudentPracticeRecordDO.class);
|
|
|
+ wrapper.selectAssociation(PersonInfoDO.class, StudentPracticeRecordDetailRespVO::getPerson);
|
|
|
+ wrapper.selectAssociation(StudentDO.class, StudentPracticeRecordDetailRespVO::getStudent);
|
|
|
+ wrapper.selectAssociation(EnterpriseDO.class,StudentPracticeRecordDetailRespVO::getEnterprise);
|
|
|
+ wrapper.selectAssociation(JobAdvertisedDO.class,StudentPracticeRecordDetailRespVO::getJob);
|
|
|
+ wrapper.innerJoin(PersonInfoDO.class, PersonInfoDO::getId, StudentPracticeRecordDO::getPersonId);
|
|
|
+ wrapper.innerJoin(StudentDO.class, StudentDO::getId, StudentPracticeRecordDO::getStudentId);
|
|
|
+ wrapper.innerJoin(EnterpriseDO.class, EnterpriseDO::getId, StudentPracticeRecordDO::getEnterpriseId);
|
|
|
+ wrapper.innerJoin(JobAdvertisedDO.class, JobAdvertisedDO::getId, StudentPracticeRecordDO::getJobId);
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getJobId, reqVO.getJobId());
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getJobFairId, reqVO.getJobFairId());
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getEnterpriseId, reqVO.getEnterpriseId());
|
|
|
+ wrapper.betweenIfPresent(StudentPracticeRecordDO::getStartTime, reqVO.getStartTime());
|
|
|
+ wrapper.betweenIfPresent(StudentPracticeRecordDO::getEndTime, reqVO.getEndTime());
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getStatus, reqVO.getStatus());
|
|
|
+
|
|
|
+ return selectJoinPage(reqVO, StudentPracticeRecordDetailRespVO.class, wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 实习记录状态统计
|
|
|
+ **/
|
|
|
+ default List<CommonRespVO> getStatusCount
|
|
|
+ (RecruitAnalysisPageReqVO reqVO, LocalDateTime startTime, LocalDateTime endTime) {
|
|
|
+ MPJLambdaWrapperX<StudentPracticeRecordDO> wrapper = new MPJLambdaWrapperX<>();
|
|
|
+ wrapper.selectAs(StudentPracticeRecordDO::getStatus, "`key`");
|
|
|
+ wrapper.selectCount(StudentPracticeRecordDO::getId, CommonRespVO::getValue);
|
|
|
+
|
|
|
+ wrapper.innerJoin(PersonInfoDO.class, PersonInfoDO::getId, StudentPracticeRecordDO::getPersonId);
|
|
|
+ wrapper.innerJoin(StudentDO.class, StudentDO::getId, StudentPracticeRecordDO::getStudentId);
|
|
|
+ wrapper.innerJoin(EnterpriseDO.class, EnterpriseDO::getId, StudentPracticeRecordDO::getEnterpriseId);
|
|
|
+ wrapper.innerJoin(JobAdvertisedDO.class, JobAdvertisedDO::getId, StudentPracticeRecordDO::getJobId);
|
|
|
+
|
|
|
+ wrapper.betweenIfPresent(StudentPracticeRecordDO::getCreateTime, startTime, endTime);
|
|
|
+
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getJobId, reqVO.getJobId());
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getStatus, reqVO.getStatus());
|
|
|
+ wrapper.eqIfPresent(StudentPracticeRecordDO::getEnterpriseId, reqVO.getEnterpriseId());
|
|
|
+ wrapper.inIfPresent(StudentPracticeRecordDO::getUserId, reqVO.getUserId());
|
|
|
+ wrapper.groupBy(StudentPracticeRecordDO::getStatus);
|
|
|
+ wrapper.orderByAsc("`key`");
|
|
|
+
|
|
|
+ return selectJoinList(CommonRespVO.class, wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
}
|