|
@@ -9,6 +9,8 @@ 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.record.StudentPracticeRecordDetailRespVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.student.record.StudentPracticeRecordPageReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.person.student.record.StudentPracticeRecordSchoolPageReqVO;
|
|
|
+import com.citu.module.menduner.system.controller.base.person.student.record.StudentPracticeRecordSchoolRespVO;
|
|
|
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.person.PersonInfoDO;
|
|
@@ -95,6 +97,25 @@ public interface StudentPracticeRecordMapper extends BaseMapperX<StudentPractice
|
|
|
return selectJoinList(CommonRespVO.class, wrapper);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 实习记录状态统计
|
|
|
+ **/
|
|
|
+ default List<CommonRespVO> getStatusCountBySchoolId(Long schoolId) {
|
|
|
+ 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.eqIfExists(StudentDO::getSchoolId, schoolId);
|
|
|
+ wrapper.groupBy(StudentPracticeRecordDO::getStatus);
|
|
|
+ wrapper.orderByAsc("`key`");
|
|
|
+
|
|
|
+ return selectJoinList(CommonRespVO.class, wrapper);
|
|
|
+ }
|
|
|
|
|
|
default List<Long> selectEnterpriseIdListByUserId(Long userId) {
|
|
|
MPJLambdaWrapperX<StudentPracticeRecordDO> wrapper = new MPJLambdaWrapperX<>();
|
|
@@ -103,4 +124,69 @@ public interface StudentPracticeRecordMapper extends BaseMapperX<StudentPractice
|
|
|
return selectJoinList(Long.class, wrapper);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ default List<StudentPracticeRecordDetailRespVO> selectByUserId(Long userId) {
|
|
|
+ MPJLambdaWrapperX<StudentPracticeRecordDO> wrapper =
|
|
|
+ new MPJLambdaWrapperX<>();
|
|
|
+ wrapper.selectAll(StudentPracticeRecordDO.class);
|
|
|
+ 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.eq(StudentPracticeRecordDO::getUserId, userId);
|
|
|
+ return selectJoinList(StudentPracticeRecordDetailRespVO.class, wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ default PageResult<StudentPracticeRecordSchoolRespVO> selectCount(StudentPracticeRecordSchoolPageReqVO reqVO) {
|
|
|
+ MPJLambdaWrapperX<StudentPracticeRecordDO> wrapper =
|
|
|
+ new MPJLambdaWrapperX<>();
|
|
|
+ wrapper.selectAsClass(EnterpriseDO.class, StudentPracticeRecordSchoolRespVO.class);
|
|
|
+ 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.eq(StudentDO::getSchoolId, reqVO.getSchoolId());
|
|
|
+ wrapper.eqIfExists(StudentPracticeRecordDO::getEnterpriseId, reqVO.getEnterpriseId());
|
|
|
+ wrapper.eqIfExists(StudentPracticeRecordDO::getStatus, reqVO.getStatus());
|
|
|
+ wrapper.groupBy(StudentPracticeRecordDO::getEnterpriseId);
|
|
|
+ return selectJoinPage(reqVO, StudentPracticeRecordSchoolRespVO.class, wrapper);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ default Long getNumByEnterpriseIdAndStatus(Long enterpriseId, String status) {
|
|
|
+ MPJLambdaWrapperX<StudentPracticeRecordDO> wrapper =
|
|
|
+ new MPJLambdaWrapperX<>();
|
|
|
+ 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.eqIfExists(StudentPracticeRecordDO::getEnterpriseId, enterpriseId);
|
|
|
+ wrapper.eqIfExists(StudentPracticeRecordDO::getStatus, status);
|
|
|
+ return selectJoinCount(wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 招聘端-企业分页查询实习的学生信息
|
|
|
+ */
|
|
|
+ default PageResult<StudentPracticeRecordDetailRespVO> page(StudentPracticeRecordSchoolPageReqVO 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.eq(StudentDO::getSchoolId, reqVO.getSchoolId());
|
|
|
+ wrapper.eqIfExists(StudentPracticeRecordDO::getEnterpriseId, reqVO.getEnterpriseId());
|
|
|
+ wrapper.eqIfExists(StudentPracticeRecordDO::getStatus, reqVO.getStatus());
|
|
|
+ return selectJoinPage(reqVO, StudentPracticeRecordDetailRespVO.class, wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
}
|