Parcourir la source

Merge remote-tracking branch 'origin/dev' into pre

dzx il y a 5 mois
Parent
commit
0140721f57
19 fichiers modifiés avec 396 ajouts et 78 suppressions
  1. 15 0
      src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageController.java
  2. 21 27
      src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageParticipantController.java
  3. 0 2
      src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanTeacherController.java
  4. 5 44
      src/main/java/com/xjrsoft/module/internship/dto/AddInternshipPlanManageParticipantDto.java
  5. 4 0
      src/main/java/com/xjrsoft/module/internship/dto/InternshipPlanManagePageDto.java
  6. 3 1
      src/main/java/com/xjrsoft/module/internship/dto/InternshipPlanManageParticipantPageDto.java
  7. 110 0
      src/main/java/com/xjrsoft/module/internship/entity/StudentInternshipAloneApply.java
  8. 12 0
      src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageParticipantService.java
  9. 122 0
      src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageParticipantServiceImpl.java
  10. 0 2
      src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageServiceImpl.java
  11. 8 0
      src/main/java/com/xjrsoft/module/student/dto/BaseStudentInfoPageDto.java
  12. 3 0
      src/main/java/com/xjrsoft/module/student/dto/BaseStudentUserPageDto.java
  13. 9 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentUserPageVo.java
  14. 6 0
      src/main/java/com/xjrsoft/module/system/service/impl/MenuServiceImpl.java
  15. 11 0
      src/main/resources/mapper/internship/InternshipPlanManageMapper.xml
  16. 2 1
      src/main/resources/mapper/student/BaseStudentMapper.xml
  17. 12 0
      src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml
  18. 28 1
      src/main/resources/sqlScript/20250623sql.sql
  19. 25 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

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

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.internship.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.annotation.XjrLog;
@@ -56,6 +57,20 @@ public class InternshipPlanManageController {
         return RT.ok(pageOutput);
     }
 
+    @GetMapping(value = "/teacher-page")
+    @ApiOperation(value="实习计划管理表教师列表(分页)")
+    @SaCheckPermission("internshipplanmanage:detail")
+    @XjrLog(value = "实习计划管理表教师列表(分页)")
+    public RT<PageOutput<InternshipPlanManagePageVo>> teacherPage(@Valid InternshipPlanManagePageDto dto){
+        if(dto.getTeacherId() == null){
+            dto.setTeacherId(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")

+ 21 - 27
src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageParticipantController.java

@@ -2,21 +2,18 @@ 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.metadata.IPage;
-import com.github.yulichang.wrapper.MPJLambdaWrapper;
+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.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
 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;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -47,33 +44,23 @@ public class InternshipPlanManageParticipantController {
 
     private final IInternshipPlanManageParticipantService internshipPlanManageParticipantService;
 
-    @GetMapping(value = "/page")
+    @GetMapping(value = "/team-student-page")
     @ApiOperation(value="实习计划参与人表列表(分页)")
     @SaCheckPermission("internshipplanmanageparticipant:detail")
     @XjrLog(value = "实习计划参与人表列表(分页)")
-    public RT<PageOutput<InternshipPlanManageParticipantPageVo>> page(@Valid InternshipPlanManageParticipantPageDto dto){
-
-        MPJLambdaWrapper<InternshipPlanManageParticipant> queryWrapper = new MPJLambdaWrapper<>();
-        queryWrapper
-                    .orderByDesc(InternshipPlanManageParticipant::getId)
-                .select(InternshipPlanManageParticipant.class,x -> VoToColumnUtil.fieldsToColumns(InternshipPlanManageParticipantPageVo.class).contains(x.getProperty()));
-        IPage<InternshipPlanManageParticipant> page = internshipPlanManageParticipantService.page(ConventPage.getPage(dto), queryWrapper);
-        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = ConventPage.getPageOutput(page, InternshipPlanManageParticipantPageVo.class);
+    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);
         return RT.ok(pageOutput);
     }
 
-    @GetMapping(value = "/student-page")
+    @GetMapping(value = "/choose-student-page")
     @ApiOperation(value="实习学生选择列表(分页)")
     @SaCheckPermission("internshipplanmanageparticipant:detail")
     @XjrLog(value = "实习学生选择列表(分页)")
-    public RT<PageOutput<InternshipPlanManageParticipantPageVo>> studentPage(@Valid InternshipPlanManageParticipantPageDto dto){
-
-        MPJLambdaWrapper<InternshipPlanManageParticipant> queryWrapper = new MPJLambdaWrapper<>();
-        queryWrapper
-                .orderByDesc(InternshipPlanManageParticipant::getId)
-                .select(InternshipPlanManageParticipant.class,x -> VoToColumnUtil.fieldsToColumns(InternshipPlanManageParticipantPageVo.class).contains(x.getProperty()));
-        IPage<InternshipPlanManageParticipant> page = internshipPlanManageParticipantService.page(ConventPage.getPage(dto), queryWrapper);
-        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = ConventPage.getPageOutput(page, InternshipPlanManageParticipantPageVo.class);
+    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);
         return RT.ok(pageOutput);
     }
 
@@ -95,9 +82,17 @@ public class InternshipPlanManageParticipantController {
     @SaCheckPermission("internshipplanmanageparticipant:add")
     @XjrLog(value = "新增实习计划参与人表")
     public RT<Boolean> add(@Valid @RequestBody AddInternshipPlanManageParticipantDto dto){
-        InternshipPlanManageParticipant internshipPlanManageParticipant = BeanUtil.toBean(dto, InternshipPlanManageParticipant.class);
-        boolean isSuccess = internshipPlanManageParticipantService.save(internshipPlanManageParticipant);
-    return RT.ok(isSuccess);
+        boolean isSuccess = internshipPlanManageParticipantService.add(dto);
+        return RT.ok(isSuccess);
+    }
+
+    @PostMapping(value = "/remove")
+    @ApiOperation(value = "移除实习参与学生")
+    @SaCheckPermission("internshipplanmanageparticipant:remove")
+    @XjrLog(value = "移除实习参与学生")
+    public RT<Boolean> remove(@Valid @RequestBody AddInternshipPlanManageParticipantDto dto){
+        boolean isSuccess = internshipPlanManageParticipantService.removeStudent(dto);
+        return RT.ok(isSuccess);
     }
 
     @PutMapping
@@ -117,7 +112,6 @@ public class InternshipPlanManageParticipantController {
     @XjrLog(value = "删除实习计划参与人表")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
         return RT.ok(internshipPlanManageParticipantService.removeBatchByIds(ids));
-
     }
 
 }

+ 0 - 2
src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanTeacherController.java

@@ -1,7 +1,6 @@
 package com.xjrsoft.module.internship.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
-import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.annotation.XjrLog;
 import com.xjrsoft.common.model.result.RT;
@@ -10,7 +9,6 @@ import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanTeacherDto;
 import com.xjrsoft.module.internship.dto.InternshipPlanTeacherPageDto;
 import com.xjrsoft.module.internship.dto.UpdateInternshipPlanTeacherDto;
-import com.xjrsoft.module.internship.entity.InternshipPlanTeacher;
 import com.xjrsoft.module.internship.service.IInternshipPlanTeacherService;
 import com.xjrsoft.module.internship.vo.InternshipPlanTeacherPageVo;
 import com.xjrsoft.module.internship.vo.InternshipPlanTeacherVo;

+ 5 - 44
src/main/java/com/xjrsoft/module/internship/dto/AddInternshipPlanManageParticipantDto.java

@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
-
+import java.util.List;
 
 
 /**
@@ -28,50 +28,11 @@ public class AddInternshipPlanManageParticipantDto implements Serializable {
     */
     @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;
-    /**
-    * 班级名称
-    */
-    @ApiModelProperty("班级名称")
-    private String className;
-    /**
-    * 带队老师(xjr_user)
-    */
-    @ApiModelProperty("带队老师(xjr_user)")
-    private Long teacherId;
-    /**
-    * 实习结果评价
-    */
-    @ApiModelProperty("实习结果评价")
-    private String result;
+
+    @ApiModelProperty("学生ids")
+    private List<Long> studentUserIds;
 
 }

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

@@ -52,4 +52,8 @@ public class InternshipPlanManagePageDto extends PageInput {
 
     @ApiModelProperty("学期主键id(base_semester)")
     private Long baseSemesterId;
+
+
+    @ApiModelProperty("教师id")
+    private Long teacherId;
 }

+ 3 - 1
src/main/java/com/xjrsoft/module/internship/dto/InternshipPlanManageParticipantPageDto.java

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.internship.dto;
 
 import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,5 +16,6 @@ import lombok.EqualsAndHashCode;
 @EqualsAndHashCode(callSuper = false)
 public class InternshipPlanManageParticipantPageDto extends PageInput {
 
-
+    @ApiModelProperty("实习计划id")
+    private Long internshipPlanManageId;
 }

+ 110 - 0
src/main/java/com/xjrsoft/module/internship/entity/StudentInternshipAloneApply.java

@@ -0,0 +1,110 @@
+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_alone_apply")
+@ApiModel(value = "student_internship_alone_apply", description = "学生自主实习申请表")
+public class StudentInternshipAloneApply 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;
+
+    @ApiModelProperty("缘由")
+    private String reason;
+
+    @ApiModelProperty("登记学生(xjr_user)")
+    private Long studentUserId;
+    /**
+    * 实习时间
+    */
+    @ApiModelProperty("所属班级(base_class)")
+    private Long classId;
+
+
+    /**
+    * 所属实习计划id(internship_plan_manage)
+    */
+    @ApiModelProperty("所属实习计划id(internship_plan_manage)")
+    private Long internshipPlanManageId;
+
+    /**
+    * 附件(xjr_file)
+    */
+    @ApiModelProperty("申请附件(xjr_file)")
+    private Long folderId;
+
+
+    @ApiModelProperty("实习报告内容")
+    private String reportContent;
+
+    @ApiModelProperty("合同附件(xjr_file)")
+    private Long contractFolderId;
+
+    @ApiModelProperty("工资流水附件(xjr_file)")
+    private Long wagesFolderId;
+
+    @ApiModelProperty("总结材料附件(xjr_file)")
+    private Long summarizeFolderId;
+
+}

+ 12 - 0
src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageParticipantService.java

@@ -1,7 +1,11 @@
 package com.xjrsoft.module.internship.service;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+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.student.vo.BaseStudentInfoPageVo;
 
 /**
 * @title: 实习计划参与人表
@@ -11,4 +15,12 @@ import com.xjrsoft.module.internship.entity.InternshipPlanManageParticipant;
 */
 
 public interface IInternshipPlanManageParticipantService extends MPJBaseService<InternshipPlanManageParticipant> {
+
+    Boolean add(AddInternshipPlanManageParticipantDto dto);
+
+    Boolean removeStudent(AddInternshipPlanManageParticipantDto dto);
+
+    Page<BaseStudentInfoPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
+
+    Page<BaseStudentInfoPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
 }

+ 122 - 0
src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageParticipantServiceImpl.java

@@ -1,11 +1,35 @@
 package com.xjrsoft.module.internship.service.impl;
 
+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.xjrsoft.common.mybatis.SqlRunnerAdapter;
+import com.xjrsoft.module.base.entity.BaseClass;
+import com.xjrsoft.module.base.mapper.BaseClassMapper;
+import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
+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.mapper.InternshipPlanClassMapper;
+import com.xjrsoft.module.internship.mapper.InternshipPlanManageMapper;
 import com.xjrsoft.module.internship.mapper.InternshipPlanManageParticipantMapper;
 import com.xjrsoft.module.internship.service.IInternshipPlanManageParticipantService;
+import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
+import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
+import com.xjrsoft.module.student.service.IBaseStudentService;
+import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
 * @title: 实习计划参与人表
@@ -16,4 +40,102 @@ import org.springframework.stereotype.Service;
 @Service
 @AllArgsConstructor
 public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceImpl<InternshipPlanManageParticipantMapper, InternshipPlanManageParticipant> implements IInternshipPlanManageParticipantService {
+    private final InternshipPlanManageMapper internshipPlanManageMapper;
+    private final InternshipPlanClassMapper internshipPlanClassMapper;
+
+    private final IBaseStudentSchoolRollService baseStudentSchoolRollService;
+    private final IBaseStudentService baseStudentService;
+    private final BaseClassMapper classMapper;
+    @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());
+        }});
+
+        for (BaseStudentUserPageVo student : studentList) {
+            insertList.add(new InternshipPlanManageParticipant(){{
+                setClassId(dto.getClassId());
+                setParticipantUserId(Long.parseLong(student.getId()));
+                setInternshipPlanManageId(planManage.getId());
+                setTeacherId(planClass.getInternshipPlanTeacherId());
+                setParticipantUserStudentId(student.getStudentId());
+                setParticipantUserName(student.getName());
+                setBaseMajorName(student.getMajorSetName());
+                setBaseMajorId(student.getMajorSetId());
+                setClassName(baseClass.getName());
+            }});
+        }
+        if(!insertList.isEmpty()){
+            this.saveBatch(insertList);
+        }
+        return true;
+    }
+
+    @Override
+    @Transactional
+    public Boolean removeStudent(AddInternshipPlanManageParticipantDto dto) {
+        this.baseMapper.delete(
+                new QueryWrapper<InternshipPlanManageParticipant>().lambda()
+                        .eq(InternshipPlanManageParticipant::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .in(InternshipPlanManageParticipant::getParticipantUserId, dto.getStudentUserIds())
+        );
+        return true;
+    }
+
+    @Override
+    public Page<BaseStudentInfoPageVo> 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)" +
+                " WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1 AND t2.current_state = 'COMPLETED'";
+        List<Map<String, Object>> internshipAloneApplyList = SqlRunnerAdapter.db().selectList(sql);
+        List<Long> notInIds = new ArrayList<>();
+        for (Map<String, Object> objectMap : internshipAloneApplyList) {
+            notInIds.add(Long.parseLong(objectMap.get("id").toString()));
+        }
+
+        sql = "SELECT t1.* FROM student_special_constitution t1" +
+                " INNER JOIN xjr_workflow_form_relation t2 ON t1.id = CAST(t2.form_key_value AS SIGNED)" +
+                " WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1 AND t2.current_state = 'COMPLETED'";
+        List<Map<String, Object>> specialConstitutionList = SqlRunnerAdapter.db().selectList(sql);
+        for (Map<String, Object> objectMap : specialConstitutionList) {
+            notInIds.add(Long.parseLong(objectMap.get("id").toString()));
+        }
+
+        BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
+        studentInfoPageDto.setNotInIds(notInIds);
+        return baseStudentSchoolRollService.getMobilePage(page, studentInfoPageDto);
+    }
+
+    /**
+     * 查询带队的学生
+     * @param page
+     * @param dto
+     * @return
+     */
+    @Override
+    public Page<BaseStudentInfoPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
+        long teacherId = StpUtil.getLoginIdAsLong();
+
+        List<InternshipPlanManageParticipant> list = this.list(
+                new QueryWrapper<InternshipPlanManageParticipant>().lambda()
+                        .eq(InternshipPlanManageParticipant::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .eq(InternshipPlanManageParticipant::getTeacherId, teacherId)
+        );
+        BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
+        studentInfoPageDto.setInIds(list.stream().map(InternshipPlanManageParticipant::getParticipantUserId).collect(Collectors.toList()));
+        return baseStudentSchoolRollService.getMobilePage(page, studentInfoPageDto);
+    }
 }

+ 0 - 2
src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageServiceImpl.java

@@ -27,8 +27,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
 
 /**
 * @title: 实习计划管理表

+ 8 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentInfoPageDto.java

@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.List;
+
 
 /**
  * @title: 学生职务设置分页查询入参
@@ -47,4 +49,10 @@ public class BaseStudentInfoPageDto extends PageInput {
 
     @ApiModelProperty("最新收费区间")
     private String beltcode;
+
+    @ApiModelProperty("不包含的学生id")
+    private List<Long> notInIds;
+
+    @ApiModelProperty("包含的学生id")
+    private List<Long> inIds;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentUserPageDto.java

@@ -73,4 +73,7 @@ public class BaseStudentUserPageDto extends PageInput {
     @ApiModelProperty("身份证号")
     private String classIdStr;
 
+    @JsonIgnore
+    private List<Long> userIds;
+
 }

+ 9 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentUserPageVo.java

@@ -56,4 +56,13 @@ public class BaseStudentUserPageVo {
 
     @ApiModelProperty("微信openId")
     private String openId;
+
+    @ApiModelProperty("学号")
+    private String studentId;
+
+    @ApiModelProperty("专业")
+    private String majorSetName;
+
+    @ApiModelProperty("专业id")
+    private Long majorSetId;
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/system/service/impl/MenuServiceImpl.java

@@ -447,6 +447,9 @@ public class MenuServiceImpl extends MPJBaseServiceImpl<MenuMapper, Menu> implem
                 Long number = menuVos.stream().filter(x -> x.getParentId().equals(node.getId())).count();
                 if (number == 0 && !Objects.equals(parentId, GlobalConstant.FIRST_NODE_VALUE)) {
                     MenuVo parentMenu = getParentMenu(parentId, menuMap);
+                    if(parentMenu == null){
+                        return;
+                    }
                     node.setSystemId(parentMenu.getSystemId());
                     node.setSystemName(parentMenu.getSystemName());
                     node.setParentSortCode(parentMenu.getSortCode());
@@ -472,6 +475,9 @@ public class MenuServiceImpl extends MPJBaseServiceImpl<MenuMapper, Menu> implem
         if (menuVo != null && GlobalConstant.FIRST_NODE_VALUE.equals(menuVo.getParentId())) {
             return menuVo;
         }
+        if(menuVo == null){
+            return null;
+        }
         return getParentMenu(menuVo.getParentId(), menuMap);
     }
 

+ 11 - 0
src/main/resources/mapper/internship/InternshipPlanManageMapper.xml

@@ -47,5 +47,16 @@
         <if test="dto.baseSemesterId != null">
             and t1.base_semester_id = #{dto.baseSemesterId}
         </if>
+        <if test="dto.teacherId != null">
+            and (t1.id in (
+                SELECT DISTINCT c1.internship_plan_manage_id FROM internship_plan_class c1
+                INNER JOIN base_class c2 ON c1.class_id = c2.id
+                WHERE c1.delete_mark = 0 AND c2.delete_mark = 0
+                AND c2.teacher_id = #{dto.teacherId}
+            ) or t1.id in (
+                SELECT DISTINCT internship_plan_manage_id FROM internship_plan_teacher
+                WHERE delete_mark = 0 AND user_id = #{dto.teacherId}
+            ))
+        </if>
     </select>
 </mapper>

+ 2 - 1
src/main/resources/mapper/student/BaseStudentMapper.xml

@@ -138,12 +138,13 @@
     <select id="getStudentList" parameterType="com.xjrsoft.module.student.dto.BaseStudentUserPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentUserPageVo">
         SELECT t1.id,t4.name AS class_name,t5.name AS teacher_name,t1.name,t1.gender AS gender_cn,t1.credential_number,
         t1.mobile,t3.archives_status AS archives_status_cn ,t3.stduy_status AS stduy_status_cn,t3.student_type AS student_type_cn,
-        t3.learn_status as learn_status_cn,t3.grade_id,t6.name as grade_name,t3.class_id,t1.open_id FROM xjr_user t1
+        t3.learn_status as learn_status_cn,t3.grade_id,t6.name as grade_name,t3.class_id,t1.open_id,t2.student_id,t7.name as major_set_name, t3.major_set_id FROM xjr_user t1
         INNER JOIN base_student t2 ON t1.id = t2.user_id
         LEFT JOIN base_student_school_roll t3 ON t1.id = t3.user_id
         LEFT JOIN base_class t4 ON t4.id = t3.class_id
         LEFT JOIN xjr_user t5 ON t4.teacher_id = t5.id
         LEFT JOIN base_grade t6 ON t3.grade_id = t6.id
+        left join base_major_set t7 on t3.major_set_id = t7.id
         WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
         and t3.archives_status = 'FB2901' and t2.is_normal = 1
         <if test="dto.classIds != null and dto.classIds.size() > 0">

+ 12 - 0
src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

@@ -73,6 +73,18 @@
             OR t2.mobile LIKE concat('%', #{dto.keyWord}, '%')
             )
         </if>
+        <if test="dto.notInIds != null and dto.notInIds.size() > 0">
+            and t2.id in
+            <foreach item="notInId" index="index" collection="dto.notInIds" open="(" close=")" separator=",">
+                #{notInId}
+            </foreach>
+        </if>
+        <if test="dto.inIds != null and dto.inIds.size() > 0">
+            and t2.id in
+            <foreach item="inId" index="index" collection="dto.inIds" open="(" close=")" separator=",">
+                #{inId}
+            </foreach>
+        </if>
     </select>
 
     <select id="getInfoById" parameterType="com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto" resultType="com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo">

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

@@ -146,11 +146,38 @@ CREATE TABLE `student_internship_alone_apply` (
   `student_user_id` BIGINT NOT NULL COMMENT '登记学生(xjr_user)',
   `class_id` BIGINT DEFAULT NULL COMMENT '所属班级(base_class)',
   `internship_plan_manage_id` BIGINT NOT NULL COMMENT '所属实习计划id(internship_plan_manage)',
-  `folder_id` BIGINT DEFAULT NULL COMMENT '附件(xjr_file)',
+  `folder_id` BIGINT DEFAULT NULL COMMENT '申请附件(xjr_file)',
+  `report_content` VARCHAR(1000) DEFAULT NULL COMMENT '实习报告内容',
+  `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)',
   PRIMARY KEY (`id`)
 ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学生自主实习申请表';
 
 
+-- -------------------------------------------------------------------------------------------------------------------
+-- 学生实习记录
+-- -------------------------------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS student_internship_record;
+CREATE TABLE `student_internship_record` (
+  `id` BIGINT NOT NULL COMMENT '主键编号',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改时间',
+  `delete_mark` INT NOT NULL COMMENT '删除标记',
+  `enabled_mark` INT NOT NULL COMMENT '有效标志',
+  `modify_user_id` BIGINT DEFAULT NULL,
+  `create_user_id` BIGINT DEFAULT NULL,
+  `student_user_id` BIGINT NOT NULL COMMENT '登记学生(xjr_user)',
+  `record_time` DATETIME DEFAULT NULL COMMENT '实习时间',
+  `record_report_type` INT DEFAULT NULL COMMENT '实行类型(0:实习综合报告 1:周报 2:月报)',
+  `internship_plan_manage_id` BIGINT NOT NULL COMMENT '所属实习计划id(internship_plan_manage)',
+  `is_internship_alone` INT NOT NULL COMMENT '是否自主实习(1:是 0:否)',
+  `record_content` VARCHAR(1000) DEFAULT NULL COMMENT '实习报告内容',
+  `folder_id` BIGINT DEFAULT NULL COMMENT '附件(xjr_file)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学生实习记录表';
+
+
 
 
 

+ 25 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -5228,4 +5228,29 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    @Test
+    public void gcstudent_internship_record() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("student_internship_record");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("internship");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
 }