|
@@ -1,14 +1,19 @@
|
|
package com.citu.module.menduner.system.controller.app.jobhunt.person;
|
|
package com.citu.module.menduner.system.controller.app.jobhunt.person;
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
|
+import com.citu.framework.common.util.object.BeanUtils;
|
|
import com.citu.framework.security.core.annotations.PreAuthenticated;
|
|
import com.citu.framework.security.core.annotations.PreAuthenticated;
|
|
import com.citu.module.menduner.common.util.LoginUserContext;
|
|
import com.citu.module.menduner.common.util.LoginUserContext;
|
|
|
|
+import com.citu.module.menduner.system.controller.base.enterprise.vo.EnterpriseBaseSimpleRespVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.evaluate.StudentPracticeEvaluateSaveReqVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.evaluate.StudentPracticeEvaluateSaveReqVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.record.StudentPracticeRecordDetailRespVO;
|
|
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.StudentPracticeRecordPageReqVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.report.StudentPracticeReportRespVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.report.StudentPracticeReportRespVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.report.StudentPracticeReportSaveReqVO;
|
|
import com.citu.module.menduner.system.controller.base.person.student.report.StudentPracticeReportSaveReqVO;
|
|
|
|
+import com.citu.module.menduner.system.dal.dataobject.enterprise.EnterpriseDO;
|
|
|
|
+import com.citu.module.menduner.system.service.enterprise.EnterpriseService;
|
|
import com.citu.module.menduner.system.service.person.student.StudentPracticeEvaluateService;
|
|
import com.citu.module.menduner.system.service.person.student.StudentPracticeEvaluateService;
|
|
import com.citu.module.menduner.system.service.person.student.StudentPracticeRecordService;
|
|
import com.citu.module.menduner.system.service.person.student.StudentPracticeRecordService;
|
|
import com.citu.module.menduner.system.service.person.student.StudentPracticeReportService;
|
|
import com.citu.module.menduner.system.service.person.student.StudentPracticeReportService;
|
|
@@ -20,7 +25,6 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
-
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -40,13 +44,15 @@ public class AppStudentController {
|
|
private StudentPracticeEvaluateService evaluateService;
|
|
private StudentPracticeEvaluateService evaluateService;
|
|
@Resource
|
|
@Resource
|
|
private StudentPracticeReportService reportService;
|
|
private StudentPracticeReportService reportService;
|
|
|
|
+ @Resource
|
|
|
|
+ private EnterpriseService enterpriseService;
|
|
|
|
|
|
@PreAuthenticated
|
|
@PreAuthenticated
|
|
@GetMapping("/page")
|
|
@GetMapping("/page")
|
|
@Operation(summary = "获得学生实习记录分页")
|
|
@Operation(summary = "获得学生实习记录分页")
|
|
public CommonResult<PageResult<StudentPracticeRecordDetailRespVO>> page
|
|
public CommonResult<PageResult<StudentPracticeRecordDetailRespVO>> page
|
|
(StudentPracticeRecordPageReqVO reqVO) {
|
|
(StudentPracticeRecordPageReqVO reqVO) {
|
|
- return success(studentPracticeRecordService.page(LoginUserContext.getUserId(),reqVO));
|
|
|
|
|
|
+ return success(studentPracticeRecordService.page(LoginUserContext.getUserId(), reqVO));
|
|
}
|
|
}
|
|
|
|
|
|
@PreAuthenticated
|
|
@PreAuthenticated
|
|
@@ -69,7 +75,7 @@ public class AppStudentController {
|
|
@GetMapping("/get/report/list")
|
|
@GetMapping("/get/report/list")
|
|
@Operation(summary = "获取学生实习报告列表")
|
|
@Operation(summary = "获取学生实习报告列表")
|
|
public CommonResult<Map<String, List<StudentPracticeReportRespVO>>> getReportList
|
|
public CommonResult<Map<String, List<StudentPracticeReportRespVO>>> getReportList
|
|
- (@RequestParam("enterpriseId") Long enterpriseId) {
|
|
|
|
|
|
+ (@RequestParam(value = "enterpriseId", required = false) Long enterpriseId) {
|
|
return success(reportService.getReportList(enterpriseId));
|
|
return success(reportService.getReportList(enterpriseId));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -80,4 +86,18 @@ public class AppStudentController {
|
|
reportService.save(reqVO);
|
|
reportService.save(reqVO);
|
|
return success(true);
|
|
return success(true);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @PreAuthenticated
|
|
|
|
+ @GetMapping("/record-enterprise/list")
|
|
|
|
+ @Operation(summary = "获取学生实习的企业列表")
|
|
|
|
+ public CommonResult<List<EnterpriseBaseSimpleRespVO>> getRecordEnterpriseId() {
|
|
|
|
+ List<Long> enterpriseIds = studentPracticeRecordService.getRecordEnterpriseId();
|
|
|
|
+ if (CollUtil.isNotEmpty(enterpriseIds)) {
|
|
|
|
+ List<EnterpriseDO> enterpriseList = enterpriseService.getByIdList(enterpriseIds);
|
|
|
|
+ return success(BeanUtils.toBean(enterpriseList, EnterpriseBaseSimpleRespVO.class));
|
|
|
|
+ }
|
|
|
|
+ return success(null);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|