5
0

13 Commity 0140721f57 ... 3891946cc1

Autor SHA1 Wiadomość Data
  dzx 3891946cc1 学生实习记录 7 miesięcy temu
  dzx a301d7d608 学生实习记录 8 miesięcy temu
  dzx da32a0d8dc 学生实习记录 8 miesięcy temu
  dzx 7417f11a32 学生实习记录 8 miesięcy temu
  dzx ce5b8736f3 学生实习记录 8 miesięcy temu
  dzx 00a99a09d8 学生实习记录 8 miesięcy temu
  dzx 110a3c0bcb 学生实习记录 8 miesięcy temu
  dzx 1f19c0fb39 学生实习记录 8 miesięcy temu
  dzx a4b5559c2d 学生实习记录 8 miesięcy temu
  dzx 141e672de8 学生实习记录 8 miesięcy temu
  dzx f1d84d4dd2 学生实习记录 8 miesięcy temu
  dzx 5634458eed Merge remote-tracking branch 'origin/dev' into dev 8 miesięcy temu
  dzx 19e1afbbc4 学生实习记录 8 miesięcy temu
27 zmienionych plików z 961 dodań i 117 usunięć
  1. 15 5
      src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageController.java
  2. 22 6
      src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageParticipantController.java
  3. 132 0
      src/main/java/com/xjrsoft/module/internship/controller/StudentInternshipRecordController.java
  4. 39 0
      src/main/java/com/xjrsoft/module/internship/dto/AddStudentInternshipAloneApplyDto.java
  5. 58 0
      src/main/java/com/xjrsoft/module/internship/dto/AddStudentInternshipRecordDto.java
  6. 34 0
      src/main/java/com/xjrsoft/module/internship/dto/EvaluateInternshipPlanManageParticipantDto.java
  7. 4 0
      src/main/java/com/xjrsoft/module/internship/dto/InternshipPlanManagePageDto.java
  8. 25 0
      src/main/java/com/xjrsoft/module/internship/dto/StudentInternshipRecordPageDto.java
  9. 24 0
      src/main/java/com/xjrsoft/module/internship/dto/UpdateStudentInternshipRecordDto.java
  10. 109 0
      src/main/java/com/xjrsoft/module/internship/entity/StudentInternshipRecord.java
  11. 17 0
      src/main/java/com/xjrsoft/module/internship/mapper/StudentInternshipAloneApplyMapper.java
  12. 16 0
      src/main/java/com/xjrsoft/module/internship/mapper/StudentInternshipRecordMapper.java
  13. 4 2
      src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageParticipantService.java
  14. 3 0
      src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageService.java
  15. 17 0
      src/main/java/com/xjrsoft/module/internship/service/IStudentInternshipRecordService.java
  16. 80 16
      src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageParticipantServiceImpl.java
  17. 47 1
      src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageServiceImpl.java
  18. 47 0
      src/main/java/com/xjrsoft/module/internship/service/impl/StudentInternshipRecordServiceImpl.java
  19. 6 0
      src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManagePageVo.java
  20. 93 85
      src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManageParticipantPageVo.java
  21. 3 0
      src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManageVo.java
  22. 88 0
      src/main/java/com/xjrsoft/module/internship/vo/StudentInternshipRecordPageVo.java
  23. 63 0
      src/main/java/com/xjrsoft/module/internship/vo/StudentInternshipRecordVo.java
  24. 1 1
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java
  25. 7 1
      src/main/resources/mapper/internship/InternshipPlanManageMapper.xml
  26. 6 0
      src/main/resources/mapper/student/BaseStudentMapper.xml
  27. 1 0
      src/main/resources/sqlScript/20250623sql.sql

+ 15 - 5
src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageController.java

@@ -70,17 +70,27 @@ public class InternshipPlanManageController {
         return RT.ok(pageOutput);
     }
 
+    @GetMapping(value = "/student-page")
+    @ApiOperation(value="实习计划管理表学生列表(分页)")
+    @SaCheckPermission("internshipplanmanage:detail")
+    @XjrLog(value = "实习计划管理表学生列表(分页)")
+    public RT<PageOutput<InternshipPlanManagePageVo>> studentPage(@Valid InternshipPlanManagePageDto dto){
+        if(dto.getStudentUserId() == null){
+            dto.setStudentUserId(StpUtil.getLoginIdAsLong());
+        }
+        Page<InternshipPlanManagePageVo> page = internshipPlanManageService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<InternshipPlanManagePageVo> pageOutput = ConventPage.getPageOutput(page, InternshipPlanManagePageVo.class);
+        return RT.ok(pageOutput);
+    }
+
 
     @GetMapping(value = "/info")
     @ApiOperation(value="根据id查询实习计划管理表信息")
     @SaCheckPermission("internshipplanmanage:detail")
     @XjrLog(value = "根据id查询实习计划管理表信息")
     public RT<InternshipPlanManageVo> info(@RequestParam Long id){
-        InternshipPlanManage internshipPlanManage = internshipPlanManageService.getByIdDeep(id);
-        if (internshipPlanManage == null) {
-           return RT.error("找不到此数据!");
-        }
-        return RT.ok(BeanUtil.toBean(internshipPlanManage, InternshipPlanManageVo.class));
+        InternshipPlanManageVo internshipPlanManage = internshipPlanManageService.getInfoById(id);
+        return RT.ok(internshipPlanManage);
     }
 
 

+ 22 - 6
src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageParticipantController.java

@@ -2,16 +2,19 @@ package com.xjrsoft.module.internship.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.annotation.XjrLog;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
+import com.xjrsoft.module.internship.dto.EvaluateInternshipPlanManageParticipantDto;
 import com.xjrsoft.module.internship.dto.InternshipPlanManageParticipantPageDto;
 import com.xjrsoft.module.internship.dto.UpdateInternshipPlanManageParticipantDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanManageParticipant;
 import com.xjrsoft.module.internship.service.IInternshipPlanManageParticipantService;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantPageVo;
 import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantVo;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
 import io.swagger.annotations.Api;
@@ -48,9 +51,8 @@ public class InternshipPlanManageParticipantController {
     @ApiOperation(value="实习计划参与人表列表(分页)")
     @SaCheckPermission("internshipplanmanageparticipant:detail")
     @XjrLog(value = "实习计划参与人表列表(分页)")
-    public RT<PageOutput<BaseStudentInfoPageVo>> page(@Valid InternshipPlanManageParticipantPageDto dto){
-        Page<BaseStudentInfoPageVo> teamStudentPage = internshipPlanManageParticipantService.getTeamStudentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
-        PageOutput<BaseStudentInfoPageVo> pageOutput = ConventPage.getPageOutput(teamStudentPage, BaseStudentInfoPageVo.class);
+    public RT<PageOutput<InternshipPlanManageParticipantPageVo>> page(@Valid InternshipPlanManageParticipantPageDto dto){
+        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = internshipPlanManageParticipantService.getTeamStudentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
         return RT.ok(pageOutput);
     }
 
@@ -58,9 +60,8 @@ public class InternshipPlanManageParticipantController {
     @ApiOperation(value="实习学生选择列表(分页)")
     @SaCheckPermission("internshipplanmanageparticipant:detail")
     @XjrLog(value = "实习学生选择列表(分页)")
-    public RT<PageOutput<BaseStudentInfoPageVo>> studentPage(@Valid InternshipPlanManageParticipantPageDto dto){
-        Page<BaseStudentInfoPageVo> page = internshipPlanManageParticipantService.getChooseStudentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
-        PageOutput<BaseStudentInfoPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentInfoPageVo.class);
+    public RT<PageOutput<InternshipPlanManageParticipantPageVo>> studentPage(@Valid InternshipPlanManageParticipantPageDto dto){
+        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = internshipPlanManageParticipantService.getChooseStudentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
         return RT.ok(pageOutput);
     }
 
@@ -95,6 +96,21 @@ public class InternshipPlanManageParticipantController {
         return RT.ok(isSuccess);
     }
 
+    @PostMapping(value = "/evaluate")
+    @ApiOperation(value = "评价学生实习")
+    @SaCheckPermission("internshipplanmanageparticipant:evaluate")
+    @XjrLog(value = "评价学生实习")
+    public RT<Boolean> evaluate(@Valid @RequestBody EvaluateInternshipPlanManageParticipantDto dto){
+        InternshipPlanManageParticipant participant = internshipPlanManageParticipantService.getOne(
+                new QueryWrapper<InternshipPlanManageParticipant>().lambda()
+                        .eq(InternshipPlanManageParticipant::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .eq(InternshipPlanManageParticipant::getParticipantUserId, dto.getId())
+        );
+        participant.setResult(dto.getResult());
+        internshipPlanManageParticipantService.updateById(participant);
+        return RT.ok(true);
+    }
+
     @PutMapping
     @ApiOperation(value = "修改实习计划参与人表")
     @SaCheckPermission("internshipplanmanageparticipant:edit")

+ 132 - 0
src/main/java/com/xjrsoft/module/internship/controller/StudentInternshipRecordController.java

@@ -0,0 +1,132 @@
+package com.xjrsoft.module.internship.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+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.xjrsoft.common.annotation.XjrLog;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.internship.dto.AddStudentInternshipAloneApplyDto;
+import com.xjrsoft.module.internship.dto.AddStudentInternshipRecordDto;
+import com.xjrsoft.module.internship.dto.StudentInternshipRecordPageDto;
+import com.xjrsoft.module.internship.dto.UpdateStudentInternshipRecordDto;
+import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
+import com.xjrsoft.module.internship.service.IStudentInternshipRecordService;
+import com.xjrsoft.module.internship.vo.StudentInternshipRecordPageVo;
+import com.xjrsoft.module.internship.vo.StudentInternshipRecordVo;
+import com.xjrsoft.module.system.entity.File;
+import com.xjrsoft.module.system.service.IFileService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/internship" + "/studentInternshipRecord")
+@Api(value = "/internship"  + "/studentInternshipRecord",tags = "学生实习记录表代码")
+@AllArgsConstructor
+public class StudentInternshipRecordController {
+
+
+    private final IStudentInternshipRecordService studentInternshipRecordService;
+    private final IFileService fileService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="学生实习记录表列表(分页)")
+    @SaCheckPermission("studentinternshiprecord:detail")
+    @XjrLog(value = "学生实习记录表列表(分页)")
+    public RT<PageOutput<StudentInternshipRecordPageVo>> page(@Valid StudentInternshipRecordPageDto dto){
+
+        LambdaQueryWrapper<StudentInternshipRecord> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .select(StudentInternshipRecord.class,x -> VoToColumnUtil.fieldsToColumns(StudentInternshipRecordPageVo.class).contains(x.getProperty()))
+                .eq(StudentInternshipRecord::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                .eq(StudentInternshipRecord::getStudentUserId, dto.getStudentUserId())
+                .orderByDesc(StudentInternshipRecord::getId);
+
+        IPage<StudentInternshipRecord> page = studentInternshipRecordService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<StudentInternshipRecordPageVo> pageOutput = ConventPage.getPageOutput(page, StudentInternshipRecordPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询学生实习记录表信息")
+    @SaCheckPermission("studentinternshiprecord:detail")
+    @XjrLog(value = "根据id查询学生实习记录表信息")
+    public RT<StudentInternshipRecordVo> info(@RequestParam Long id){
+        StudentInternshipRecord studentInternshipRecord = studentInternshipRecordService.getById(id);
+        if (studentInternshipRecord == null) {
+           return RT.error("找不到此数据!");
+        }
+        File file = fileService.getOne(
+                new QueryWrapper<File>().lambda()
+                        .eq(File::getFolderId, studentInternshipRecord.getFolderId())
+        );
+        StudentInternshipRecordVo recordVo = BeanUtil.toBean(studentInternshipRecord, StudentInternshipRecordVo.class);
+        if(file != null){
+            recordVo.setFileUrl(file.getFileUrl());
+        }
+        return RT.ok(recordVo);
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增学生实习记录表")
+    @SaCheckPermission("studentinternshiprecord:add")
+    @XjrLog(value = "新增学生实习记录表")
+    public RT<Boolean> add(@Valid @RequestBody AddStudentInternshipRecordDto dto){
+        StudentInternshipRecord studentInternshipRecord = BeanUtil.toBean(dto, StudentInternshipRecord.class);
+        boolean isSuccess = studentInternshipRecordService.save(studentInternshipRecord);
+        return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改学生实习记录表")
+    @SaCheckPermission("studentinternshiprecord:edit")
+    @XjrLog(value = "修改学生实习记录表")
+    public RT<Boolean> update(@Valid @RequestBody UpdateStudentInternshipRecordDto dto){
+
+        StudentInternshipRecord studentInternshipRecord = BeanUtil.toBean(dto, StudentInternshipRecord.class);
+        return RT.ok(studentInternshipRecordService.updateById(studentInternshipRecord));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除学生实习记录表")
+    @SaCheckPermission("studentinternshiprecord:delete")
+    @XjrLog(value = "删除学生实习记录表")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(studentInternshipRecordService.removeBatchByIds(ids));
+
+    }
+
+    @PostMapping(value = "alone-material-submit")
+    @ApiOperation(value = "自主实习材料提交")
+    @SaCheckPermission("studentinternshiprecord:add")
+    @XjrLog(value = "自主实习材料提交")
+    public RT<Boolean> aloneMaterialSubmit(@Valid @RequestBody AddStudentInternshipAloneApplyDto dto){
+        boolean isSuccess = studentInternshipRecordService.aloneMaterialSubmit(dto);
+        return RT.ok(isSuccess);
+    }
+
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/internship/dto/AddStudentInternshipAloneApplyDto.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.internship.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+* @title: 自主实习材料提交
+* @Author dzx
+* @Date: 2025-06-26
+* @Version 1.0
+*/
+@Data
+public class AddStudentInternshipAloneApplyDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("登记学生(xjr_user)")
+    private Long studentUserId;
+
+    @ApiModelProperty("实习报告内容")
+    private String reportContent;
+
+    @ApiModelProperty("合同附件(xjr_file)")
+    private Long contractFolderId;
+
+    @ApiModelProperty("工资流水附件(xjr_file)")
+    private Long wagesFolderId;
+
+    @ApiModelProperty("总结材料附件(xjr_file)")
+    private Long summarizeFolderId;
+
+    @ApiModelProperty("所属实习计划id(internship_plan_manage)")
+    private Long internshipPlanManageId;
+
+}

+ 58 - 0
src/main/java/com/xjrsoft/module/internship/dto/AddStudentInternshipRecordDto.java

@@ -0,0 +1,58 @@
+package com.xjrsoft.module.internship.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Data
+public class AddStudentInternshipRecordDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 登记学生(xjr_user)
+    */
+    @ApiModelProperty("登记学生(xjr_user)")
+    private Long studentUserId;
+    /**
+    * 实习时间
+    */
+    @ApiModelProperty("实习时间")
+    private LocalDateTime recordTime;
+    /**
+    * 实行类型(0:实习综合报告 1:周报 2:月报)
+    */
+    @ApiModelProperty("实行类型(0:实习综合报告 1:周报 2:月报)")
+    private Integer recordReportType;
+    /**
+    * 所属实习计划id(internship_plan_manage)
+    */
+    @ApiModelProperty("所属实习计划id(internship_plan_manage)")
+    private Long internshipPlanManageId;
+    /**
+    * 是否自主实习(1:是 0:否)
+    */
+    @ApiModelProperty("是否自主实习(1:是 0:否)")
+    private Integer isInternshipAlone;
+    /**
+    * 实习报告内容
+    */
+    @ApiModelProperty("实习报告内容")
+    private String recordContent;
+    /**
+    * 附件(xjr_file)
+    */
+    @ApiModelProperty("附件(xjr_file)")
+    private Long folderId;
+
+}

+ 34 - 0
src/main/java/com/xjrsoft/module/internship/dto/EvaluateInternshipPlanManageParticipantDto.java

@@ -0,0 +1,34 @@
+package com.xjrsoft.module.internship.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+* @title: 实习计划参与人表
+* @Author dzx
+* @Date: 2025-06-26
+* @Version 1.0
+*/
+@Data
+public class EvaluateInternshipPlanManageParticipantDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+    * 实习计划id
+    */
+    @ApiModelProperty("实习计划id")
+    private Long id;
+
+    @ApiModelProperty("实习结果评价")
+    private String result;
+
+    @ApiModelProperty("实习评价id")
+    private Long internshipPlanManageId;
+
+}

+ 4 - 0
src/main/java/com/xjrsoft/module/internship/dto/InternshipPlanManagePageDto.java

@@ -56,4 +56,8 @@ public class InternshipPlanManagePageDto extends PageInput {
 
     @ApiModelProperty("教师id")
     private Long teacherId;
+
+
+    @ApiModelProperty("学生userId")
+    private Long studentUserId;
 }

+ 25 - 0
src/main/java/com/xjrsoft/module/internship/dto/StudentInternshipRecordPageDto.java

@@ -0,0 +1,25 @@
+package com.xjrsoft.module.internship.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 学生实习记录表分页查询入参
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class StudentInternshipRecordPageDto extends PageInput {
+
+
+    @ApiModelProperty("学生userId")
+    private Long studentUserId;
+
+    @ApiModelProperty("实习计划id")
+    private Long internshipPlanManageId;
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/internship/dto/UpdateStudentInternshipRecordDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.internship.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Data
+public class UpdateStudentInternshipRecordDto extends AddStudentInternshipRecordDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+}

+ 109 - 0
src/main/java/com/xjrsoft/module/internship/entity/StudentInternshipRecord.java

@@ -0,0 +1,109 @@
+package com.xjrsoft.module.internship.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Data
+@TableName("student_internship_record")
+@ApiModel(value = "student_internship_record", description = "学生实习记录表")
+public class StudentInternshipRecord implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private LocalDateTime createDate;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private LocalDateTime modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 登记学生(xjr_user)
+    */
+    @ApiModelProperty("登记学生(xjr_user)")
+    private Long studentUserId;
+    /**
+    * 实习时间
+    */
+    @ApiModelProperty("实习时间")
+    private LocalDateTime recordTime;
+    /**
+    * 实行类型(0:实习综合报告 1:周报 2:月报)
+    */
+    @ApiModelProperty("实行类型(0:实习综合报告 1:周报 2:月报)")
+    private Integer recordReportType;
+    /**
+    * 所属实习计划id(internship_plan_manage)
+    */
+    @ApiModelProperty("所属实习计划id(internship_plan_manage)")
+    private Long internshipPlanManageId;
+    /**
+    * 是否自主实习(1:是 0:否)
+    */
+    @ApiModelProperty("是否自主实习(1:是 0:否)")
+    private Integer isInternshipAlone;
+    /**
+    * 实习报告内容
+    */
+    @ApiModelProperty("实习报告内容")
+    private String recordContent;
+    /**
+    * 附件(xjr_file)
+    */
+    @ApiModelProperty("附件(xjr_file)")
+    private Long folderId;
+
+
+}

+ 17 - 0
src/main/java/com/xjrsoft/module/internship/mapper/StudentInternshipAloneApplyMapper.java

@@ -0,0 +1,17 @@
+package com.xjrsoft.module.internship.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.internship.entity.StudentInternshipAloneApply;
+import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Mapper
+public interface StudentInternshipAloneApplyMapper extends MPJBaseMapper<StudentInternshipAloneApply> {
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/internship/mapper/StudentInternshipRecordMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.internship.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Mapper
+public interface StudentInternshipRecordMapper extends MPJBaseMapper<StudentInternshipRecord> {
+
+}

+ 4 - 2
src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageParticipantService.java

@@ -2,9 +2,11 @@ package com.xjrsoft.module.internship.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
 import com.xjrsoft.module.internship.dto.InternshipPlanManageParticipantPageDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanManageParticipant;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
 
 /**
@@ -20,7 +22,7 @@ public interface IInternshipPlanManageParticipantService extends MPJBaseService<
 
     Boolean removeStudent(AddInternshipPlanManageParticipantDto dto);
 
-    Page<BaseStudentInfoPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
+    PageOutput<InternshipPlanManageParticipantPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
 
-    Page<BaseStudentInfoPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
+    PageOutput<InternshipPlanManageParticipantPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageService.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.internship.dto.AddInternshipPlanManageDto;
 import com.xjrsoft.module.internship.dto.InternshipPlanManagePageDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanManage;
 import com.xjrsoft.module.internship.vo.InternshipPlanManagePageVo;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageVo;
 
 import java.util.List;
 
@@ -45,4 +46,6 @@ public interface IInternshipPlanManageService extends MPJBaseService<InternshipP
 
     Page<InternshipPlanManagePageVo> getPage(Page<InternshipPlanManagePageVo> page, InternshipPlanManagePageDto dto);
 
+    InternshipPlanManageVo getInfoById(Long id);
+
 }

+ 17 - 0
src/main/java/com/xjrsoft/module/internship/service/IStudentInternshipRecordService.java

@@ -0,0 +1,17 @@
+package com.xjrsoft.module.internship.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.internship.dto.AddStudentInternshipAloneApplyDto;
+import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+
+public interface IStudentInternshipRecordService extends MPJBaseService<StudentInternshipRecord> {
+
+    Boolean aloneMaterialSubmit(AddStudentInternshipAloneApplyDto dto);
+}

+ 80 - 16
src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageParticipantServiceImpl.java

@@ -4,7 +4,11 @@ import cn.dev33.satoken.stp.StpUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
@@ -12,12 +16,16 @@ import com.xjrsoft.module.internship.dto.InternshipPlanManageParticipantPageDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanClass;
 import com.xjrsoft.module.internship.entity.InternshipPlanManage;
 import com.xjrsoft.module.internship.entity.InternshipPlanManageParticipant;
+import com.xjrsoft.module.internship.entity.InternshipPlanTeacher;
 import com.xjrsoft.module.internship.mapper.InternshipPlanClassMapper;
 import com.xjrsoft.module.internship.mapper.InternshipPlanManageMapper;
 import com.xjrsoft.module.internship.mapper.InternshipPlanManageParticipantMapper;
+import com.xjrsoft.module.internship.mapper.InternshipPlanTeacherMapper;
 import com.xjrsoft.module.internship.service.IInternshipPlanManageParticipantService;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantPageVo;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
+import com.xjrsoft.module.student.mapper.BaseStudentSchoolRollMapper;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IBaseStudentService;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
@@ -29,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -42,39 +51,44 @@ import java.util.stream.Collectors;
 public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceImpl<InternshipPlanManageParticipantMapper, InternshipPlanManageParticipant> implements IInternshipPlanManageParticipantService {
     private final InternshipPlanManageMapper internshipPlanManageMapper;
     private final InternshipPlanClassMapper internshipPlanClassMapper;
-
+    private final InternshipPlanTeacherMapper internshipPlanTeacherMapper;
     private final IBaseStudentSchoolRollService baseStudentSchoolRollService;
     private final IBaseStudentService baseStudentService;
-    private final BaseClassMapper classMapper;
+    private final BaseStudentSchoolRollMapper baseStudentSchoolRollMapper;
+    private final BaseClassMapper baseClassMapper;
     @Override
     @Transactional
     public Boolean add(AddInternshipPlanManageParticipantDto dto) {
         InternshipPlanManage planManage = internshipPlanManageMapper.selectById(dto.getInternshipPlanManageId());
-        InternshipPlanClass planClass = internshipPlanClassMapper.selectOne(
-                new QueryWrapper<InternshipPlanClass>().lambda()
-                        .eq(InternshipPlanClass::getInternshipPlanManageId, dto.getInternshipPlanManageId())
-                        .eq(InternshipPlanClass::getClassId, dto.getClassId())
-        );
-
-        BaseClass baseClass = classMapper.selectById(planClass.getClassId());
 
         List<InternshipPlanManageParticipant> insertList = new ArrayList<>();
 
         List<BaseStudentUserPageVo> studentList = baseStudentService.getStudentList(new BaseStudentUserPageDto() {{
             setUserIds(dto.getStudentUserIds());
         }});
+        List<Long> classIds = studentList.stream().map(BaseStudentUserPageVo::getClassId).collect(Collectors.toList());
 
+        List<InternshipPlanClass> planClassList = internshipPlanClassMapper.selectList(
+                new QueryWrapper<InternshipPlanClass>().lambda()
+                        .eq(InternshipPlanClass::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .in(InternshipPlanClass::getClassId, classIds)
+        );
+
+        Map<Long, Long> classTeacherIdMaps = planClassList.stream().collect(Collectors.toMap(InternshipPlanClass::getClassId, InternshipPlanClass::getInternshipPlanTeacherId));
+        List<Long> internshipPlanTeacherIds = planClassList.stream().map(InternshipPlanClass::getInternshipPlanTeacherId).collect(Collectors.toList());
+        List<InternshipPlanTeacher> internshipPlanTeachers = internshipPlanTeacherMapper.selectBatchIds(internshipPlanTeacherIds);
+        Map<Long, Long> teacherMap = internshipPlanTeachers.stream().collect(Collectors.toMap(InternshipPlanTeacher::getId, InternshipPlanTeacher::getUserId));
         for (BaseStudentUserPageVo student : studentList) {
             insertList.add(new InternshipPlanManageParticipant(){{
-                setClassId(dto.getClassId());
+                setClassId(student.getClassId());
                 setParticipantUserId(Long.parseLong(student.getId()));
                 setInternshipPlanManageId(planManage.getId());
-                setTeacherId(planClass.getInternshipPlanTeacherId());
+                setTeacherId(teacherMap.get(classTeacherIdMaps.get(student.getClassId())));
                 setParticipantUserStudentId(student.getStudentId());
                 setParticipantUserName(student.getName());
                 setBaseMajorName(student.getMajorSetName());
                 setBaseMajorId(student.getMajorSetId());
-                setClassName(baseClass.getName());
+                setClassName(student.getClassName());
             }});
         }
         if(!insertList.isEmpty()){
@@ -95,7 +109,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
     }
 
     @Override
-    public Page<BaseStudentInfoPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
+    public PageOutput<InternshipPlanManageParticipantPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
         //查询自主实习和特异体质的学生
         String sql = "SELECT t1.* FROM student_internship_alone_apply t1" +
                 " INNER JOIN xjr_workflow_form_relation t2 ON t1.id = CAST(t2.form_key_value AS SIGNED)" +
@@ -116,7 +130,47 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
 
         BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
         studentInfoPageDto.setNotInIds(notInIds);
-        return baseStudentSchoolRollService.getMobilePage(page, studentInfoPageDto);
+
+        List<String> roleList = StpUtil.getRoleList();
+
+        long teacherId = StpUtil.getLoginIdAsLong();
+        List<BaseClass> classList = baseClassMapper.selectList(
+                new MPJLambdaWrapper<BaseClass>()
+                        .select(BaseClass::getId)
+                        .innerJoin(InternshipPlanClass.class, InternshipPlanClass::getClassId, BaseClass::getId)
+                        .eq(BaseClass::getTeacherId, teacherId)
+                        .eq(InternshipPlanClass::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        if(classList.isEmpty()){
+            return new PageOutput<>();
+        }
+        if (roleList.size() == 2 && roleList.contains("CLASSTE")) {
+            studentInfoPageDto.setTeacherId(teacherId);
+        } else {
+            if (studentInfoPageDto.getClassId() == null) {
+                studentInfoPageDto.setClassId(classList.get(0).getId());
+            }
+        }
+        studentInfoPageDto.setKeyWord(dto.getKeyword());
+        Page<BaseStudentInfoPageVo> mobilePage = baseStudentSchoolRollMapper.getMobilePage(page, studentInfoPageDto);
+
+        List<InternshipPlanManageParticipant> participantList = this.list(
+                new QueryWrapper<InternshipPlanManageParticipant>().lambda()
+                        .eq(InternshipPlanManageParticipant::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .eq(InternshipPlanManageParticipant::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        Map<Long, String> collect = participantList.stream().filter(x -> x.getResult() != null).collect(Collectors.toMap(InternshipPlanManageParticipant::getParticipantUserId, InternshipPlanManageParticipant::getResult));
+        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = ConventPage.getPageOutput(mobilePage, InternshipPlanManageParticipantPageVo.class);
+        for (InternshipPlanManageParticipantPageVo vo : pageOutput.getList()) {
+            if(collect.containsKey(vo.getId())){
+                vo.setIsSelected(1);
+            }else{
+                vo.setIsSelected(0);
+            }
+            vo.setEvaluateResult(collect.get(vo.getId()));
+        }
+        return pageOutput;
     }
 
     /**
@@ -126,7 +180,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
      * @return
      */
     @Override
-    public Page<BaseStudentInfoPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
+    public PageOutput<InternshipPlanManageParticipantPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
         long teacherId = StpUtil.getLoginIdAsLong();
 
         List<InternshipPlanManageParticipant> list = this.list(
@@ -134,8 +188,18 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
                         .eq(InternshipPlanManageParticipant::getInternshipPlanManageId, dto.getInternshipPlanManageId())
                         .eq(InternshipPlanManageParticipant::getTeacherId, teacherId)
         );
+
+        Map<Long, String> collect = list.stream().collect(Collectors.toMap(InternshipPlanManageParticipant::getParticipantUserId, InternshipPlanManageParticipant::getResult));
+
         BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
         studentInfoPageDto.setInIds(list.stream().map(InternshipPlanManageParticipant::getParticipantUserId).collect(Collectors.toList()));
-        return baseStudentSchoolRollService.getMobilePage(page, studentInfoPageDto);
+        studentInfoPageDto.setKeyWord(dto.getKeyword());
+
+        Page<BaseStudentInfoPageVo> mobilePage = baseStudentSchoolRollService.getMobilePage(page, studentInfoPageDto);
+        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = ConventPage.getPageOutput(mobilePage, InternshipPlanManageParticipantPageVo.class);
+        for (InternshipPlanManageParticipantPageVo vo : pageOutput.getList()) {
+            vo.setEvaluateResult(collect.get(vo.getId()));
+        }
+        return pageOutput;
     }
 }

+ 47 - 1
src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageServiceImpl.java

@@ -1,9 +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;
@@ -11,11 +15,14 @@ import com.xjrsoft.module.internship.dto.InternshipPlanManagePageDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanClass;
 import com.xjrsoft.module.internship.entity.InternshipPlanManage;
 import com.xjrsoft.module.internship.entity.InternshipPlanTeacher;
+import com.xjrsoft.module.internship.entity.StudentInternshipAloneApply;
 import com.xjrsoft.module.internship.mapper.InternshipPlanClassMapper;
 import com.xjrsoft.module.internship.mapper.InternshipPlanManageMapper;
 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;
@@ -27,6 +34,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
 * @title: 实习计划管理表
@@ -46,6 +55,7 @@ public class InternshipPlanManageServiceImpl extends MPJBaseServiceImpl<Internsh
     private final TrainingOutsideMapper trainingOutsideMapper;
     private final TrainingSchoolMapper trainingSchoolMapper;
     private final CompanyCoopMapper companyCoopMapper;
+    private final StudentInternshipAloneApplyMapper internshipAloneApplyMapper;
 
 
     @Override
@@ -113,6 +123,42 @@ public class InternshipPlanManageServiceImpl extends MPJBaseServiceImpl<Internsh
 
     @Override
     public Page<InternshipPlanManagePageVo> getPage(Page<InternshipPlanManagePageVo> page, InternshipPlanManagePageDto dto) {
-        return internshipPlanManageMapper.getPage(page, dto);
+        Page<InternshipPlanManagePageVo> mapperPage = internshipPlanManageMapper.getPage(page, dto);
+        if(dto.getStudentUserId() != null){
+            List<StudentInternshipAloneApply> aloneApplyList = internshipAloneApplyMapper.selectList(
+                    new QueryWrapper<StudentInternshipAloneApply>().lambda()
+                            .eq(StudentInternshipAloneApply::getStudentUserId, dto.getStudentUserId())
+            );
+            Set<Long> collect = aloneApplyList.stream().map(StudentInternshipAloneApply::getInternshipPlanManageId).collect(Collectors.toSet());
+            for (InternshipPlanManagePageVo record : mapperPage.getRecords()) {
+                if(collect.contains(Long.parseLong(record.getId()))){
+                    record.setIsInternshipAlone(1);
+                }else {
+                    record.setIsInternshipAlone(0);
+                }
+            }
+        }
+        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;
     }
 }

+ 47 - 0
src/main/java/com/xjrsoft/module/internship/service/impl/StudentInternshipRecordServiceImpl.java

@@ -0,0 +1,47 @@
+package com.xjrsoft.module.internship.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.common.exception.MyException;
+import com.xjrsoft.module.internship.dto.AddStudentInternshipAloneApplyDto;
+import com.xjrsoft.module.internship.entity.StudentInternshipAloneApply;
+import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
+import com.xjrsoft.module.internship.mapper.StudentInternshipAloneApplyMapper;
+import com.xjrsoft.module.internship.mapper.StudentInternshipRecordMapper;
+import com.xjrsoft.module.internship.service.IStudentInternshipRecordService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class StudentInternshipRecordServiceImpl extends MPJBaseServiceImpl<StudentInternshipRecordMapper, StudentInternshipRecord> implements IStudentInternshipRecordService {
+
+    private final StudentInternshipAloneApplyMapper studentInternshipAloneApplyMapper;
+
+    @Override
+    @Transactional
+    public Boolean aloneMaterialSubmit(AddStudentInternshipAloneApplyDto dto) {
+
+        StudentInternshipAloneApply studentInternshipAloneApply = studentInternshipAloneApplyMapper.selectOne(
+                new QueryWrapper<StudentInternshipAloneApply>().lambda()
+                        .eq(StudentInternshipAloneApply::getStudentUserId, dto.getStudentUserId())
+                        .eq(StudentInternshipAloneApply::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+        );
+        if(studentInternshipAloneApply == null){
+            throw new MyException("未提交自主实习申请,无法提交材料");
+        }
+        studentInternshipAloneApply.setContractFolderId(dto.getContractFolderId());
+        studentInternshipAloneApply.setWagesFolderId(dto.getWagesFolderId());
+        studentInternshipAloneApply.setSummarizeFolderId(dto.getSummarizeFolderId());
+        studentInternshipAloneApply.setReportContent(dto.getReportContent());
+        studentInternshipAloneApplyMapper.updateById(studentInternshipAloneApply);
+        return true;
+    }
+}

+ 6 - 0
src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManagePageVo.java

@@ -66,4 +66,10 @@ public class InternshipPlanManagePageVo {
     @ApiModelProperty("实训基地名称")
     private String trainingBaseName;
 
+    @ApiModelProperty("是否自主实习(1:是 0:否)")
+    private Integer isInternshipAlone;
+
+    @ApiModelProperty("实习岗位名称")
+    private String internshipJobName;
+
 }

+ 93 - 85
src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManageParticipantPageVo.java

@@ -1,9 +1,11 @@
 package com.xjrsoft.module.internship.vo;
 
+import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
 * @title: 实习计划参与人表分页列表出参
@@ -14,95 +16,101 @@ import java.time.LocalDateTime;
 @Data
 public class InternshipPlanManageParticipantPageVo {
 
-    /**
-    * 主键编号
-    */
     @ApiModelProperty("主键编号")
-    private String id;
-    /**
-    * 创建人
-    */
-    @ApiModelProperty("创建人")
-    private Long createUserId;
-    /**
-    * 创建时间
-    */
-    @ApiModelProperty("创建时间")
-    private LocalDateTime createDate;
-    /**
-    * 修改人
-    */
-    @ApiModelProperty("修改人")
-    private Long modifyUserId;
-    /**
-    * 修改时间
-    */
-    @ApiModelProperty("修改时间")
-    private LocalDateTime modifyDate;
-    /**
-    * 删除标记
-    */
-    @ApiModelProperty("删除标记")
-    private Integer deleteMark;
-    /**
-    * 有效标志
-    */
-    @ApiModelProperty("有效标志")
-    private Integer enabledMark;
-    /**
-    * 序号
-    */
+    private Long id;
+
+    @ContentStyle(dataFormat = 49)
     @ApiModelProperty("序号")
     private Integer sortCode;
-    /**
-    * 实习计划id
-    */
-    @ApiModelProperty("实习计划id")
-    private Long internshipPlanManageId;
-    /**
-    * 实习参与人id
-    */
-    @ApiModelProperty("实习参与人id")
-    private Long participantUserId;
-    /**
-    * 实习参与人学号
-    */
-    @ApiModelProperty("实习参与人学号")
-    private String participantUserStudentId;
-    /**
-    * 实习参与人姓名
-    */
-    @ApiModelProperty("实习参与人姓名")
-    private String participantUserName;
-    /**
-    * 所属专业id(base_major)
-    */
-    @ApiModelProperty("所属专业id(base_major)")
-    private Long baseMajorId;
-    /**
-    * 所属专业名称
-    */
-    @ApiModelProperty("所属专业名称")
-    private String baseMajorName;
-    /**
-    * 班级id(base_class)
-    */
-    @ApiModelProperty("班级id(base_class)")
-    private Long classId;
-    /**
-    * 班级名称
-    */
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("学生姓名")
+    private String studentName;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("学号")
+    private String studentId;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("本人电话")
+    private String phone;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("监护人电话")
+    private String guardianPhone;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班主任名称")
+    private String teacherName;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班主任电话")
+    private String teacherPhone;
+
+    @ContentStyle(dataFormat = 49)
     @ApiModelProperty("班级名称")
     private String className;
-    /**
-    * 带队老师(xjr_user)
-    */
-    @ApiModelProperty("带队老师(xjr_user)")
-    private Long teacherId;
-    /**
-    * 实习结果评价
-    */
-    @ApiModelProperty("实习结果评价")
-    private String result;
+
+    @ApiModelProperty("学习形式")
+    private String rollModality;
+
+    @ApiModelProperty("学习形式")
+    private String rollModalityCode;
+
+    @ApiModelProperty("学籍状态(xjr_dictionary_item[archives_status])")
+    private String archivesStatus;
+
+    @ApiModelProperty("学籍状态(xjr_dictionary_item[archives_status])")
+    private String archivesStatusCode;
+
+    @ApiModelProperty("就读方式(xjr_dictionary_item[stduy_status])")
+    private String stduyStatus;
+
+    @ApiModelProperty("就读方式(xjr_dictionary_item[stduy_status])")
+    private String stduyStatusCode;
+
+    @ApiModelProperty("床位信息")
+    private String bedInfo;
+
+    @ApiModelProperty("头像")
+    private String avatar;
+
+    @ApiModelProperty("出生日期")
+    private Date birthDate;
+
+    @ApiModelProperty("民族")
+    private String nation;
+
+    private String majorSetName;
+
+    @ApiModelProperty("性别")
+    private String gender;
+
+    @ApiModelProperty("性别中文")
+    private String genderCn;
+
+    @ApiModelProperty("军训费")
+    private String jxf;
+
+    @ApiModelProperty("教材费")
+    private String jcf;
+
+    @ApiModelProperty("宿舍费")
+    private String ssf;
+
+    @ApiModelProperty("学生类别")
+    private String studentForm;
+
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
+
+    @ApiModelProperty("实习状态")
+    private String internshipStateCn;
+
+    @ApiModelProperty("是否已被选择(1:是 0:否)")
+    private Integer isSelected;
+
+    @ApiModelProperty("评价结果")
+    private String evaluateResult;
 
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManageVo.java

@@ -151,4 +151,7 @@ public class InternshipPlanManageVo {
     @ApiModelProperty("合作企业id")
     private String internshipUnitId;
 
+    @ApiModelProperty("是否自主实习(1:是 0:否)")
+    private Integer isInternshipAlone;
+
 }

+ 88 - 0
src/main/java/com/xjrsoft/module/internship/vo/StudentInternshipRecordPageVo.java

@@ -0,0 +1,88 @@
+package com.xjrsoft.module.internship.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+* @title: 学生实习记录表分页列表出参
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Data
+public class StudentInternshipRecordPageVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    private LocalDateTime createDate;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    private LocalDateTime modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    private Integer enabledMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long modifyUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long createUserId;
+    /**
+    * 登记学生(xjr_user)
+    */
+    @ApiModelProperty("登记学生(xjr_user)")
+    private Long studentUserId;
+    /**
+    * 实习时间
+    */
+    @ApiModelProperty("实习时间")
+    private LocalDateTime recordTime;
+    /**
+    * 实行类型(0:实习综合报告 1:周报 2:月报)
+    */
+    @ApiModelProperty("实行类型(0:实习综合报告 1:周报 2:月报)")
+    private Integer recordReportType;
+    /**
+    * 所属实习计划id(internship_plan_manage)
+    */
+    @ApiModelProperty("所属实习计划id(internship_plan_manage)")
+    private Long internshipPlanManageId;
+    /**
+    * 是否自主实习(1:是 0:否)
+    */
+    @ApiModelProperty("是否自主实习(1:是 0:否)")
+    private Integer isInternshipAlone;
+    /**
+    * 实习报告内容
+    */
+    @ApiModelProperty("实习报告内容")
+    private String recordContent;
+    /**
+    * 附件(xjr_file)
+    */
+    @ApiModelProperty("附件(xjr_file)")
+    private Long folderId;
+
+}

+ 63 - 0
src/main/java/com/xjrsoft/module/internship/vo/StudentInternshipRecordVo.java

@@ -0,0 +1,63 @@
+package com.xjrsoft.module.internship.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+* @title: 学生实习记录表表单出参
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Data
+public class StudentInternshipRecordVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+    * 登记学生(xjr_user)
+    */
+    @ApiModelProperty("登记学生(xjr_user)")
+    private Long studentUserId;
+    /**
+    * 实习时间
+    */
+    @ApiModelProperty("实习时间")
+    private LocalDateTime recordTime;
+    /**
+    * 实行类型(0:实习综合报告 1:周报 2:月报)
+    */
+    @ApiModelProperty("实行类型(0:实习综合报告 1:周报 2:月报)")
+    private Integer recordReportType;
+    /**
+    * 所属实习计划id(internship_plan_manage)
+    */
+    @ApiModelProperty("所属实习计划id(internship_plan_manage)")
+    private Long internshipPlanManageId;
+    /**
+    * 是否自主实习(1:是 0:否)
+    */
+    @ApiModelProperty("是否自主实习(1:是 0:否)")
+    private Integer isInternshipAlone;
+    /**
+    * 实习报告内容
+    */
+    @ApiModelProperty("实习报告内容")
+    private String recordContent;
+    /**
+    * 附件(xjr_file)
+    */
+    @ApiModelProperty("附件(xjr_file)")
+    private Long folderId;
+
+    @ApiModelProperty("附件地址(xjr_file)")
+    private String fileUrl;
+
+
+
+}

+ 1 - 1
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java

@@ -67,7 +67,7 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
                 new QueryWrapper<BaseClass>().lambda().eq(BaseClass::getTeacherId, teacherId)
                         .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
         );
-        if (roleList.size() == 1 && roleList.contains("CLASSTE")) {
+        if (roleList.size() == 2 && roleList.contains("CLASSTE")) {
             if (classList != null && !classList.isEmpty()) {
                 dto.setTeacherId(teacherId);
             }

+ 7 - 1
src/main/resources/mapper/internship/InternshipPlanManageMapper.xml

@@ -7,7 +7,7 @@
         SELECT t1.id,t1.base_semester,t1.internship_plan_name,t1.status,t1.start_time,t1.end_time,t2.name AS insurance_purchaser_cn,
         t3.name AS internship_plan_type_cn,t4.name AS internship_whereabouts_cn,t5.name AS insurance_type_cn,t1.internship_unit_name,
         t6.name AS enterprise_industry_cn,t7.name AS lodging_plan_cn,t8.name AS internship_site_type_cn,t9.name AS internship_unit_source_cn,
-        t10.name AS professional_relevance_enterprise_cn,IFNULL(t11.training_name,t12.training_name) AS training_base_name FROM internship_plan_manage t1
+        t10.name AS professional_relevance_enterprise_cn,IFNULL(t11.training_name,t12.training_name) AS training_base_name,t1.internship_job_name FROM internship_plan_manage t1
         LEFT JOIN xjr_dictionary_detail t2 ON t1.insurance_purchaser = t2.code AND t2.item_id = 1826514469123567618
         LEFT JOIN xjr_dictionary_detail t3 ON t1.internship_plan_type = t3.code AND t3.item_id = 1826151188882042882
         LEFT JOIN xjr_dictionary_detail t4 ON t1.internship_whereabouts = t4.code AND t4.item_id = 1826520014937174017
@@ -58,5 +58,11 @@
                 WHERE delete_mark = 0 AND user_id = #{dto.teacherId}
             ))
         </if>
+        <if test="dto.studentUserId != null">
+            and t1.id in (
+                SELECT DISTINCT internship_plan_manage_id FROM internship_plan_manage_participant
+                WHERE delete_mark = 0 AND participant_user_id = #{dto.studentUserId}
+            )
+        </if>
     </select>
 </mapper>

+ 6 - 0
src/main/resources/mapper/student/BaseStudentMapper.xml

@@ -159,6 +159,12 @@
                 #{credentialNumber}
             </foreach>
         </if>
+        <if test="dto.userIds != null and dto.userIds.size() > 0">
+            and t1.id in
+            <foreach item="userId" index="index" collection="dto.userIds" open="(" close=")" separator=",">
+                #{userId}
+            </foreach>
+        </if>
     </select>
 
 </mapper>

+ 1 - 0
src/main/resources/sqlScript/20250623sql.sql

@@ -151,6 +151,7 @@ CREATE TABLE `student_internship_alone_apply` (
   `contract_folder_id` BIGINT DEFAULT NULL COMMENT '合同附件(xjr_file)',
   `wages_folder_id` BIGINT DEFAULT NULL COMMENT '工资流水附件(xjr_file)',
   `summarize_folder_id` BIGINT DEFAULT NULL COMMENT '总结材料附件(xjr_file)',
+  `teacher_id` BIGINT DEFAULT NULL COMMENT '班主任id(xjr_user)',
   PRIMARY KEY (`id`)
 ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学生自主实习申请表';