|
|
@@ -1,10 +1,13 @@
|
|
|
package com.xjrsoft.module.internship.service.impl;
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
+import com.xjrsoft.common.exception.MyException;
|
|
|
+import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.module.base.entity.BaseSemester;
|
|
|
import com.xjrsoft.module.base.mapper.BaseSemesterMapper;
|
|
|
import com.xjrsoft.module.internship.dto.AddInternshipPlanManageDto;
|
|
|
@@ -19,6 +22,7 @@ import com.xjrsoft.module.internship.mapper.InternshipPlanTeacherMapper;
|
|
|
import com.xjrsoft.module.internship.mapper.StudentInternshipAloneApplyMapper;
|
|
|
import com.xjrsoft.module.internship.service.IInternshipPlanManageService;
|
|
|
import com.xjrsoft.module.internship.vo.InternshipPlanManagePageVo;
|
|
|
+import com.xjrsoft.module.internship.vo.InternshipPlanManageVo;
|
|
|
import com.xjrsoft.module.veb.entity.CompanyCoop;
|
|
|
import com.xjrsoft.module.veb.entity.TrainingOutside;
|
|
|
import com.xjrsoft.module.veb.entity.TrainingSchool;
|
|
|
@@ -136,4 +140,25 @@ public class InternshipPlanManageServiceImpl extends MPJBaseServiceImpl<Internsh
|
|
|
}
|
|
|
return mapperPage;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public InternshipPlanManageVo getInfoById(Long id) {
|
|
|
+ InternshipPlanManage internshipPlanManage = this.getById(id);
|
|
|
+ if (internshipPlanManage == null) {
|
|
|
+ throw new MyException("找不到此数据!");
|
|
|
+ }
|
|
|
+ InternshipPlanManageVo manageVo = BeanUtil.toBean(internshipPlanManage, InternshipPlanManageVo.class);
|
|
|
+
|
|
|
+ StudentInternshipAloneApply aloneApply = internshipAloneApplyMapper.selectOne(
|
|
|
+ new QueryWrapper<StudentInternshipAloneApply>().lambda()
|
|
|
+ .eq(StudentInternshipAloneApply::getStudentUserId, StpUtil.getLoginIdAsLong())
|
|
|
+ .eq(StudentInternshipAloneApply::getInternshipPlanManageId, id)
|
|
|
+ );
|
|
|
+ if(aloneApply != null){
|
|
|
+ manageVo.setIsInternshipAlone(1);
|
|
|
+ }else{
|
|
|
+ manageVo.setIsInternshipAlone(0);
|
|
|
+ }
|
|
|
+ return manageVo;
|
|
|
+ }
|
|
|
}
|