dzx 5 месяцев назад
Родитель
Сommit
19e1afbbc4

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

@@ -0,0 +1,117 @@
+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.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.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 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;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="学生实习记录表列表(分页)")
+    @SaCheckPermission("studentinternshiprecord:detail")
+    @XjrLog(value = "学生实习记录表列表(分页)")
+    public RT<PageOutput<StudentInternshipRecordPageVo>> page(@Valid StudentInternshipRecordPageDto dto){
+
+        LambdaQueryWrapper<StudentInternshipRecord> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                    .orderByDesc(StudentInternshipRecord::getId)
+                .select(StudentInternshipRecord.class,x -> VoToColumnUtil.fieldsToColumns(StudentInternshipRecordPageVo.class).contains(x.getProperty()));
+        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("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(studentInternshipRecord, StudentInternshipRecordVo.class));
+    }
+
+
+    @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 AddStudentInternshipRecordDto dto){
+        StudentInternshipRecord studentInternshipRecord = BeanUtil.toBean(dto, StudentInternshipRecord.class);
+        boolean isSuccess = studentInternshipRecordService.save(studentInternshipRecord);
+        return RT.ok(isSuccess);
+    }
+
+}

+ 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;
+
+}

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

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.internship.dto;
+
+import com.xjrsoft.common.page.PageInput;
+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 {
+
+
+}

+ 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;
+
+
+}

+ 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> {
+
+}

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

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

+ 2 - 6
src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageParticipantServiceImpl.java

@@ -5,8 +5,6 @@ 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;
@@ -45,7 +43,6 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
 
     private final IBaseStudentSchoolRollService baseStudentSchoolRollService;
     private final IBaseStudentService baseStudentService;
-    private final BaseClassMapper classMapper;
     @Override
     @Transactional
     public Boolean add(AddInternshipPlanManageParticipantDto dto) {
@@ -56,7 +53,6 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
                         .eq(InternshipPlanClass::getClassId, dto.getClassId())
         );
 
-        BaseClass baseClass = classMapper.selectById(planClass.getClassId());
 
         List<InternshipPlanManageParticipant> insertList = new ArrayList<>();
 
@@ -66,7 +62,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
 
         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());
@@ -74,7 +70,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
                 setParticipantUserName(student.getName());
                 setBaseMajorName(student.getMajorSetName());
                 setBaseMajorId(student.getMajorSetId());
-                setClassName(baseClass.getName());
+                setClassName(student.getClassName());
             }});
         }
         if(!insertList.isEmpty()){

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

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.internship.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
+import com.xjrsoft.module.internship.mapper.StudentInternshipRecordMapper;
+import com.xjrsoft.module.internship.service.IStudentInternshipRecordService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 学生实习记录表
+* @Author dzx
+* @Date: 2025-07-01
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class StudentInternshipRecordServiceImpl extends MPJBaseServiceImpl<StudentInternshipRecordMapper, StudentInternshipRecord> implements IStudentInternshipRecordService {
+}

+ 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;
+
+}

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

@@ -0,0 +1,60 @@
+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;
+
+
+
+}