Explorar el Código

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

fanxp hace 2 años
padre
commit
7526ccb173
Se han modificado 17 ficheros con 1047 adiciones y 6 borrados
  1. 163 0
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentInspectionController.java
  2. 14 0
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentCadreController.java
  3. 93 0
      src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentAssessmentInspectionDto.java
  4. 66 0
      src/main/java/com/xjrsoft/module/student/dto/BaseStudentAssessmentInspectionPageDto.java
  5. 32 0
      src/main/java/com/xjrsoft/module/student/dto/UpdateBaseStudentAssessmentInspectionDto.java
  6. 143 0
      src/main/java/com/xjrsoft/module/student/entity/BaseStudentAssessmentInspection.java
  7. 66 0
      src/main/java/com/xjrsoft/module/student/entity/BaseStudentAssessmentStudentRelation.java
  8. 16 0
      src/main/java/com/xjrsoft/module/student/mapper/BaseStudentAssessmentInspectionMapper.java
  9. 17 0
      src/main/java/com/xjrsoft/module/student/mapper/BaseStudentAssessmentStudentRelationMapper.java
  10. 14 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentAssessmentInspectionService.java
  11. 15 0
      src/main/java/com/xjrsoft/module/student/service/IBaseStudentAssessmentStudentRelationService.java
  12. 37 6
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentClassRelationServiceImpl.java
  13. 19 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java
  14. 19 0
      src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentStudentRelationServiceImpl.java
  15. 145 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionPageVo.java
  16. 130 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionVo.java
  17. 58 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentStudentRelationVo.java

+ 163 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentInspectionController.java

@@ -0,0 +1,163 @@
+package com.xjrsoft.module.student.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.yulichang.toolkit.MPJWrappers;
+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.base.entity.BaseClass;
+import com.xjrsoft.module.student.dto.AddBaseStudentAssessmentInspectionDto;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
+import com.xjrsoft.module.student.dto.UpdateBaseStudentAssessmentInspectionDto;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentCategory;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentProject;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentClassRelationService;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentClassRelationListVo;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionVo;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentStudentRelationVo;
+import com.xjrsoft.module.teacher.entity.XjrUser;
+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: 2023-11-16
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/student" + "/basestudentassessmentinspection")
+@Api(value = "/student"  + "/basestudentassessmentinspection",tags = "学生班级巡查考核代码")
+@AllArgsConstructor
+public class BaseStudentAssessmentInspectionController {
+
+
+    private final IBaseStudentAssessmentInspectionService baseStudentAssessmentInspectionService;
+    private final IBaseStudentAssessmentClassRelationService baseStudentAssessmentClassRelationService;
+    private final com.xjrsoft.module.student.service.IBaseStudentAssessmentStudentRelationService baseStudentAssessmentStudentRelationService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="学生班级巡查考核列表(分页)")
+    @SaCheckPermission("basestudentassessmentinspection:detail")
+    public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> page(@Valid BaseStudentAssessmentInspectionPageDto dto){
+
+        //未传流程状态不返回数据
+        if(ObjectUtil.isNull(dto) || ObjectUtil.isNull(dto.getStatus())){
+            PageOutput<BaseStudentAssessmentInspectionPageVo> result = ConventPage.getPageOutputNull(BaseStudentAssessmentInspectionPageVo.class);
+            return RT.ok(result);
+        }
+        IPage<BaseStudentAssessmentInspectionPageVo> page = baseStudentAssessmentInspectionService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentAssessmentInspectionPageVo.class,
+                MPJWrappers.<BaseStudentAssessmentInspection>lambdaJoin()
+                .like(StrUtil.isNotEmpty(dto.getCreateUserName()), XjrUser::getName, dto.getCreateUserName())
+                .like(StrUtil.isNotEmpty(dto.getModifyUserName()), XjrUser::getName, dto.getModifyUserName())
+                .eq(BaseStudentAssessmentInspection::getStatus, dto.getStatus())
+                .eq(StrUtil.isNotEmpty(dto.getEnrollType()), BaseClass::getEnrollType, dto.getEnrollType())
+                .eq(ObjectUtil.isNotNull(dto.getGradeId()), BaseClass::getGradeId, dto.getGradeId())
+                .in(ObjectUtil.isNotNull(dto.getBaseStudentAssessmentProjectIds()), BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId, dto.getBaseStudentAssessmentProjectIds())
+                .between(ObjectUtil.isNotNull(dto.getStartDate()) && ObjectUtil.isNotNull(dto.getEndDate()), BaseStudentAssessmentInspection::getCreateDate,dto.getStartDate(),dto.getEndDate())
+                .in(ObjectUtil.isNotNull(dto.getBaseStudentAssessmentProjectIds()), BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId, dto.getBaseStudentAssessmentProjectIds())
+                .select("c.name as class_name")
+                .select("u.name as class_teacher")
+                .select("d.name as dept_name")
+                .select("(SELECT COUNT(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t.id) as student_count")
+                .select("(SELECT name FROM xjr_user WHERE id = t.assessment_user_id) as assessment_user_name")
+                .select(BaseStudentAssessmentInspection::getScore)
+                .select(BaseStudentAssessmentInspection::getSortCode)
+                .select(BaseStudentAssessmentInspection::getReason)
+                .select(BaseStudentAssessmentInspection::getId)
+                .select(BaseStudentAssessmentInspection::getFileId)
+                .selectAs(BaseStudentAssessmentCategory::getName, BaseStudentAssessmentInspectionPageVo::getAssessmentCategoryName)
+                .selectAs(BaseStudentAssessmentProject::getName, BaseStudentAssessmentInspectionPageVo::getAssessmentProjectName)
+                .innerJoin(BaseStudentAssessmentCategory.class, BaseStudentAssessmentCategory::getId, BaseStudentAssessmentInspection::getBaseStudentAssessmentCategoryId)
+                .innerJoin(BaseStudentAssessmentProject.class, BaseStudentAssessmentProject::getId, BaseStudentAssessmentInspection::getBaseStudentAssessmentProjectId)
+                .leftJoin(XjrUser.class, XjrUser::getId, BaseStudentAssessmentInspection::getAssessmentUserId)
+                .innerJoin("base_class c ON t.class_ids LIKE CONCAT('%', c.id, '%')")
+                .innerJoin("xjr_user u on c.teacher_id = u.id")
+                .innerJoin("xjr_department d on c.org_id = d.id")
+                .leftJoin(BaseStudentAssessmentClassRelation.class, BaseStudentAssessmentClassRelation::getBaseStudentAssessmentInspectionId, BaseStudentAssessmentInspection::getId)
+        );
+
+        PageOutput<BaseStudentAssessmentInspectionPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询学生班级巡查考核信息")
+    @SaCheckPermission("basestudentassessmentinspection:detail")
+    public RT<BaseStudentAssessmentInspectionVo> info(@RequestParam Long id){
+        BaseStudentAssessmentInspection baseStudentAssessmentInspection = baseStudentAssessmentInspectionService.getById(id);
+        if (baseStudentAssessmentInspection == null) {
+           return RT.error("找不到此数据!");
+        }
+        BaseStudentAssessmentInspectionVo baseStudentAssessmentInspectionVo = BeanUtil.toBean(baseStudentAssessmentInspection, BaseStudentAssessmentInspectionVo.class);
+        //查询班级
+        LambdaQueryWrapper<BaseStudentAssessmentClassRelation> classQueryWrapper = new LambdaQueryWrapper<>();
+        classQueryWrapper
+                .eq(BaseStudentAssessmentClassRelation::getBaseStudentAssessmentInspectionId, id)
+                .select(BaseStudentAssessmentClassRelation.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentAssessmentClassRelationListVo.class).contains(x.getProperty()));
+        List<BaseStudentAssessmentClassRelation> classList = baseStudentAssessmentClassRelationService.list(classQueryWrapper);
+        baseStudentAssessmentInspectionVo.setClassList(BeanUtil.copyToList(classList, BaseStudentAssessmentClassRelationListVo.class));
+
+        //查询学生
+        LambdaQueryWrapper<BaseStudentAssessmentStudentRelation> studentQueryWrapper = new LambdaQueryWrapper<>();
+        studentQueryWrapper
+                .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, id)
+                .select(BaseStudentAssessmentStudentRelation.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentAssessmentStudentRelationVo.class).contains(x.getProperty()));
+        List<BaseStudentAssessmentStudentRelation> studentList = baseStudentAssessmentStudentRelationService.list(studentQueryWrapper);
+        baseStudentAssessmentInspectionVo.setStudentList(BeanUtil.copyToList(studentList, BaseStudentAssessmentStudentRelationVo.class));
+
+        return RT.ok(baseStudentAssessmentInspectionVo);
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增学生班级巡查考核")
+    @SaCheckPermission("basestudentassessmentinspection:add")
+    public RT<Boolean> add(@Valid @RequestBody AddBaseStudentAssessmentInspectionDto dto){
+        BaseStudentAssessmentInspection baseStudentAssessmentInspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
+        boolean isSuccess = baseStudentAssessmentInspectionService.save(baseStudentAssessmentInspection);
+    return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改学生班级巡查考核")
+    @SaCheckPermission("basestudentassessmentinspection:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentAssessmentInspectionDto dto){
+
+        BaseStudentAssessmentInspection baseStudentAssessmentInspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
+        return RT.ok(baseStudentAssessmentInspectionService.updateById(baseStudentAssessmentInspection));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除学生班级巡查考核")
+    @SaCheckPermission("basestudentassessmentinspection:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(baseStudentAssessmentInspectionService.removeBatchByIds(ids));
+
+    }
+
+}

+ 14 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentCadreController.java

@@ -79,6 +79,8 @@ public class BaseStudentCadreController {
         return RT.ok(pageOutput);
     }
 
+
+
     @GetMapping(value = "/mobliepage")
     @ApiOperation(value="学生干部管理列表(移动端分页)")
     @SaCheckPermission("basestudentcadre:detail")
@@ -216,6 +218,18 @@ public class BaseStudentCadreController {
         return RT.ok(isSuccess);
     }
 
+    @PutMapping("/editStatus")
+    @ApiOperation(value = "修改学生干部状态(离职、复职)")
+    @SaCheckPermission("basestudentcadre:edit")
+    public RT<Boolean> editStatus(@Valid @RequestBody UpdateBaseStudentCadreDto dto){
+        if(ObjectUtil.isNull(dto) || ObjectUtil.isNull(dto.getId()) || ObjectUtil.isNull(dto.getId()) || ObjectUtil.isNull(dto.getLeaveTime())){
+            return RT.error("请传入id、status和leaveTime");
+        }
+
+        BaseStudentCadre baseStudentCadre = BeanUtil.toBean(dto, BaseStudentCadre.class);
+        return RT.ok(baseStudentCadreService.updateById(baseStudentCadre));
+    }
+
     @PutMapping
     @ApiOperation(value = "修改学生干部管理")
     @SaCheckPermission("basestudentcadre:edit")

+ 93 - 0
src/main/java/com/xjrsoft/module/student/dto/AddBaseStudentAssessmentInspectionDto.java

@@ -0,0 +1,93 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 学生班级巡查考核
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class AddBaseStudentAssessmentInspectionDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学生考核项目编号(base_student_assessment_category)
+    */
+    @ApiModelProperty("学生考核项目编号(base_student_assessment_category)")
+    private Long baseStudentAssessmentCategoryId;
+    /**
+    * 班级考核项目编号(base_student_assessment_project)
+    */
+    @ApiModelProperty("班级考核项目编号(base_student_assessment_project)")
+    private Long baseStudentAssessmentProjectId;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 入学年级(base_grade)
+    */
+    @ApiModelProperty("入学年级(base_grade)")
+    private Long gradeId;
+    /**
+    * 班级Ids(多选)
+    */
+    @ApiModelProperty("班级Ids(多选)")
+    private String classIds;
+    /**
+    * 考核时间
+    */
+    @ApiModelProperty("考核时间")
+    private Date assessmentDate;
+    /**
+    * 分数
+    */
+    @ApiModelProperty("分数")
+    private Double score;
+    /**
+    * 分数类型(xjr_dictionary_item[score_type])
+    */
+    @ApiModelProperty("分数类型(xjr_dictionary_item[score_type])")
+    private String scoreType;
+    /**
+    * 考核用户ID(xjr_user)
+    */
+    @ApiModelProperty("考核用户ID(xjr_user)")
+    private Long assessmentUserId;
+    /**
+    * 原因
+    */
+    @ApiModelProperty("原因")
+    private String reason;
+    /**
+    * 文件ID(xjr_file)
+    */
+    @ApiModelProperty("文件ID(xjr_file)")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+}

+ 66 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentAssessmentInspectionPageDto.java

@@ -0,0 +1,66 @@
+package com.xjrsoft.module.student.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+* @title: 学生班级巡查考核分页查询入参
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class BaseStudentAssessmentInspectionPageDto extends PageInput {
+
+    @ApiModelProperty("流程状态")
+    private Integer status;
+
+    @ApiModelProperty("考核项目ids")
+    private List<Long> baseStudentAssessmentProjectIds;
+
+    @ApiModelProperty("组织机构ids")
+    private List<Long> orgIds;
+
+    @ApiModelProperty("年级id")
+    private Long gradeId;
+
+    @ApiModelProperty("专业id")
+    private Long majorSetId;
+
+    @ApiModelProperty("学期id")
+    private Long semesterId;
+
+    @ApiModelProperty("招生类型")
+    private String enrollType;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty("考核日期-开始")
+    private String startDate;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty("考核日期-结束")
+    private String endDate;
+
+    @ApiModelProperty("登记人")
+    private String createUserName;
+
+    @ApiModelProperty("修改人")
+    private String modifyUserName;
+
+    @ApiModelProperty("考核人")
+    private String assessmentUserName;
+
+
+}

+ 32 - 0
src/main/java/com/xjrsoft/module/student/dto/UpdateBaseStudentAssessmentInspectionDto.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 学生班级巡查考核
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class UpdateBaseStudentAssessmentInspectionDto extends AddBaseStudentAssessmentInspectionDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+}

+ 143 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentAssessmentInspection.java

@@ -0,0 +1,143 @@
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+/**
+* @title: 学生班级巡查考核
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+@TableName("base_student_assessment_inspection")
+@ApiModel(value = "学生班级巡查考核对象", description = "学生班级巡查考核")
+public class BaseStudentAssessmentInspection implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学生考核项目编号(base_student_assessment_category)
+    */
+    @ApiModelProperty("学生考核项目编号(base_student_assessment_category)")
+    private Long baseStudentAssessmentCategoryId;
+    /**
+    * 班级考核项目编号(base_student_assessment_project)
+    */
+    @ApiModelProperty("班级考核项目编号(base_student_assessment_project)")
+    private Long baseStudentAssessmentProjectId;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 入学年级(base_grade)
+    */
+    @ApiModelProperty("入学年级(base_grade)")
+    private Long gradeId;
+    /**
+    * 班级Ids(多选)
+    */
+    @ApiModelProperty("班级Ids(多选)")
+    private String classIds;
+    /**
+    * 考核时间
+    */
+    @ApiModelProperty("考核时间")
+    private Date assessmentDate;
+    /**
+    * 分数
+    */
+    @ApiModelProperty("分数")
+    private Double score;
+    /**
+    * 分数类型(xjr_dictionary_item[score_type])
+    */
+    @ApiModelProperty("分数类型(xjr_dictionary_item[score_type])")
+    private String scoreType;
+    /**
+    * 考核用户ID(xjr_user)
+    */
+    @ApiModelProperty("考核用户ID(xjr_user)")
+    private Long assessmentUserId;
+    /**
+    * 原因
+    */
+    @ApiModelProperty("原因")
+    private String reason;
+    /**
+    * 文件ID(xjr_file)
+    */
+    @ApiModelProperty("文件ID(xjr_file)")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+
+}

+ 66 - 0
src/main/java/com/xjrsoft/module/student/entity/BaseStudentAssessmentStudentRelation.java

@@ -0,0 +1,66 @@
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+* @title: 学生干部管理
+* @Author dzx
+* @Date: 2023-11-14
+* @Version 1.0
+*/
+@Data
+@TableName("base_student_assessment_student_relation")
+@ApiModel(value = "学生班级巡查考核-关联学生对象", description = "学生班级巡查考核-关联学生")
+public class BaseStudentAssessmentStudentRelation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+
+    @ApiModelProperty("学生id")
+    private Long userId;
+
+
+    @ApiModelProperty("学生班级巡查考核id")
+    private Long baseStudentAssessmentInspectionId;
+
+
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+
+
+    @ApiModelProperty("学号")
+    private String studentId;
+
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+
+    @ApiModelProperty("所在班级")
+    private String className;
+
+
+    @ApiModelProperty("所学专业")
+    private String majorName;
+
+    @ApiModelProperty("民族(xjr_dictionary_item[nation])")
+    private String nation;
+
+    @ApiModelProperty("性别")
+    private String gender;
+
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentAssessmentInspectionMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.student.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 学生班级巡查考核
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Mapper
+public interface BaseStudentAssessmentInspectionMapper extends MPJBaseMapper<BaseStudentAssessmentInspection> {
+
+}

+ 17 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentAssessmentStudentRelationMapper.java

@@ -0,0 +1,17 @@
+package com.xjrsoft.module.student.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 学生班级巡查考核-关联班级
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Mapper
+public interface BaseStudentAssessmentStudentRelationMapper extends BaseMapper<BaseStudentAssessmentStudentRelation> {
+
+}

+ 14 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentAssessmentInspectionService.java

@@ -0,0 +1,14 @@
+package com.xjrsoft.module.student.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+
+/**
+* @title: 学生班级巡查考核
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+
+public interface IBaseStudentAssessmentInspectionService extends MPJBaseService<BaseStudentAssessmentInspection> {
+}

+ 15 - 0
src/main/java/com/xjrsoft/module/student/service/IBaseStudentAssessmentStudentRelationService.java

@@ -0,0 +1,15 @@
+package com.xjrsoft.module.student.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
+
+/**
+* @title: 学生班级巡查考核-关联班级
+* @Author fanxp
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+
+public interface IBaseStudentAssessmentStudentRelationService extends IService<BaseStudentAssessmentStudentRelation> {
+}

+ 37 - 6
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentClassRelationServiceImpl.java

@@ -1,17 +1,21 @@
 package com.xjrsoft.module.student.service.impl;
 
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.toolkit.MPJWrappers;
+import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentClassRelation;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
 import com.xjrsoft.module.student.mapper.BaseStudentAssessmentClassRelationMapper;
 import com.xjrsoft.module.student.service.IBaseStudentAssessmentClassRelationService;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
+import com.xjrsoft.module.teacher.entity.XjrUser;
+import com.xjrsoft.module.teacher.mapper.XjrUserMapper;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
+
 import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 
 /**
 * @title: 学生班级巡查考核-关联班级
@@ -23,8 +27,35 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 @AllArgsConstructor
 public class BaseStudentAssessmentClassRelationServiceImpl extends ServiceImpl<BaseStudentAssessmentClassRelationMapper, BaseStudentAssessmentClassRelation> implements IBaseStudentAssessmentClassRelationService {
 
+    private final IBaseStudentAssessmentInspectionService baseStudentAssessmentInspectionService;
+    private final BaseStudentAssessmentClassRelationMapper baseStudentAssessmentClassRelationMapper;
+    private final XjrUserMapper xjrUserMapper;
+
     @Override
     public Boolean dataCache(Long dataId) {
-        return null;
+        BaseStudentAssessmentInspection baseStudentAssessmentInspection = baseStudentAssessmentInspectionService.getById(dataId);
+        List<String> classIdList = StrUtil.split(baseStudentAssessmentInspection.getClassIds(), ",");
+
+        for (String classId : classIdList) {
+            BaseStudentAssessmentClassRelation classRelation = new BaseStudentAssessmentClassRelation();
+            Long classIdAsLong = Long.valueOf(classId);
+            classRelation.setClassId(classIdAsLong);
+            classRelation.setBaseStudentAssessmentInspectionId(dataId);
+
+            //根据班主任id查询出班主任的名字
+            XjrUser xjrUser = xjrUserMapper.selectOne(
+                    MPJWrappers.<XjrUser>lambdaJoin()
+                    .eq(BaseClass::getId, classIdAsLong)
+                    .innerJoin(BaseClass.class, BaseClass::getTeacherId, XjrUser::getId)
+            );
+
+            if(ObjectUtil.isNotNull(xjrUser)){
+                classRelation.setTeacherName(xjrUser.getName());
+            }
+
+            baseStudentAssessmentClassRelationMapper.insert(classRelation);
+        }
+
+        return true;
     }
 }

+ 19 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import com.xjrsoft.module.student.mapper.BaseStudentAssessmentInspectionMapper;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 学生班级巡查考核
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceImpl<BaseStudentAssessmentInspectionMapper, BaseStudentAssessmentInspection> implements IBaseStudentAssessmentInspectionService {
+}

+ 19 - 0
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentStudentRelationServiceImpl.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.student.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentStudentRelation;
+import com.xjrsoft.module.student.mapper.BaseStudentAssessmentStudentRelationMapper;
+import com.xjrsoft.module.student.service.IBaseStudentAssessmentStudentRelationService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 学生班级巡查考核-关联班级
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class BaseStudentAssessmentStudentRelationServiceImpl extends ServiceImpl<BaseStudentAssessmentStudentRelationMapper, BaseStudentAssessmentStudentRelation> implements IBaseStudentAssessmentStudentRelationService {
+}

+ 145 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionPageVo.java

@@ -0,0 +1,145 @@
+package com.xjrsoft.module.student.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import com.xjrsoft.common.annotation.Trans;
+import com.xjrsoft.common.enums.TransType;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+* @title: 学生班级巡查考核分页列表出参
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class BaseStudentAssessmentInspectionPageVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学生考核项目编号(base_student_assessment_category)
+    */
+    @ApiModelProperty("学生考核项目编号(base_student_assessment_category)")
+    private Long baseStudentAssessmentCategoryId;
+    /**
+    * 班级考核项目编号(base_student_assessment_project)
+    */
+    @ApiModelProperty("班级考核项目编号(base_student_assessment_project)")
+    private Long baseStudentAssessmentProjectId;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 入学年级(base_grade)
+    */
+    @ApiModelProperty("入学年级(base_grade)")
+    private Long gradeId;
+    /**
+    * 班级Ids(多选)
+    */
+    @ApiModelProperty("班级Ids(多选)")
+    private String classIds;
+    /**
+    * 考核时间
+    */
+    @ApiModelProperty("考核时间")
+    private Date assessmentDate;
+    /**
+    * 分数
+    */
+    @ApiModelProperty("分数")
+    private Double score;
+    /**
+    * 分数类型(xjr_dictionary_item[score_type])
+    */
+    @ApiModelProperty("分数类型(xjr_dictionary_item[score_type])")
+    private String scoreType;
+    /**
+    * 考核用户ID(xjr_user)
+    */
+    @ApiModelProperty("考核用户ID(xjr_user)")
+    private Long assessmentUserId;
+    /**
+    * 原因
+    */
+    @ApiModelProperty("原因")
+    private String reason;
+    /**
+    * 文件ID(xjr_file)
+    */
+    @ApiModelProperty("文件ID(xjr_file)")
+    private Long fileId;
+    /**
+    * 状态(1:结束 0:未结束)
+    */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+    @ApiModelProperty("考核项目")
+    private String assessmentProjectName;
+
+    @ApiModelProperty("考核类别")
+    private String assessmentCategoryName;
+
+    @ApiModelProperty("班级名称")
+    private String className;
+
+    @ApiModelProperty("班主任")
+    private String classTeacher;
+
+    @ApiModelProperty("部门名称")
+    private String deptName;
+
+    @ApiModelProperty("考核人")
+    private String createUserName;
+
+    @ApiModelProperty("影响班级考核的学生人数")
+    private String studentCount;
+
+}

+ 130 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionVo.java

@@ -0,0 +1,130 @@
+package com.xjrsoft.module.student.vo;
+
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+/**
+* @title: 学生班级巡查考核表单出参
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class BaseStudentAssessmentInspectionVo {
+
+    /**
+     * 主键编号
+     */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+     * 序号
+     */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+     * 学生考核项目编号(base_student_assessment_category)
+     */
+    @ApiModelProperty("学生考核项目编号(base_student_assessment_category)")
+    private Long baseStudentAssessmentCategoryId;
+    /**
+     * 班级考核项目编号(base_student_assessment_project)
+     */
+    @ApiModelProperty("班级考核项目编号(base_student_assessment_project)")
+    private Long baseStudentAssessmentProjectId;
+    /**
+     * 学期ID(base_semester)
+     */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+     * 入学年级(base_grade)
+     */
+    @ApiModelProperty("入学年级(base_grade)")
+    private Long gradeId;
+    /**
+     * 班级Ids(多选)
+     */
+    @ApiModelProperty("班级Ids(多选)")
+    private String classIds;
+    /**
+     * 考核时间
+     */
+    @ApiModelProperty("考核时间")
+    private Date assessmentDate;
+    /**
+     * 分数
+     */
+    @ApiModelProperty("分数")
+    private Double score;
+    /**
+     * 分数类型(xjr_dictionary_item[score_type])
+     */
+    @ApiModelProperty("分数类型(xjr_dictionary_item[score_type])")
+    private String scoreType;
+    /**
+     * 考核用户ID(xjr_user)
+     */
+    @ApiModelProperty("考核用户ID(xjr_user)")
+    private Long assessmentUserId;
+    /**
+     * 原因
+     */
+    @ApiModelProperty("原因")
+    private String reason;
+    /**
+     * 文件ID(xjr_file)
+     */
+    @ApiModelProperty("文件ID(xjr_file)")
+    private Long fileId;
+    /**
+     * 状态(1:结束 0:未结束)
+     */
+    @ApiModelProperty("状态(1:结束 0:未结束)")
+    private Integer status;
+
+    /**
+     * 考核人名字
+     */
+    @ApiModelProperty("考核人名字")
+    private String assessmentUserName;
+
+    /**
+     * 考核人名字
+     */
+    @ApiModelProperty("登记人")
+    private String createUserName;
+
+    /**
+     * 最后修改人
+     */
+    @ApiModelProperty("最后修改人")
+    private String modifyUserName;
+
+    /**
+     * 考核项目
+     */
+    @ApiModelProperty("考核项目")
+    private Long assessmentProjectName;
+
+    /**
+     * 影响班级考核的学生
+     */
+    @ApiModelProperty("影响班级考核的学生")
+    @EntityMapping(thisField = "id", joinField = "baseStudentAssessmentInspectionId")
+    private List<BaseStudentAssessmentStudentRelationVo> studentList;
+
+    /**
+     * 考核班级
+     */
+    @ApiModelProperty("考核班级")
+    @EntityMapping(thisField = "id", joinField = "baseStudentAssessmentInspectionId")
+    private List<BaseStudentAssessmentClassRelationListVo> classList;
+}

+ 58 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentStudentRelationVo.java

@@ -0,0 +1,58 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 学生班级巡查考核表单出参
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class BaseStudentAssessmentStudentRelationVo {
+
+    /**
+     * 主键编号
+     */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+     * 序号
+     */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+     * 学号
+     */
+    @ApiModelProperty("学号")
+    private String studentId;
+    /**
+     * 班级考核项目编号(base_student_assessment_project)
+     */
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+     * 性别
+     */
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+     * 民族(xjr_dictionary_item[nation])
+     */
+    @ApiModelProperty("民族(xjr_dictionary_item[nation])")
+    private String nation;
+    /**
+     * 所在班级
+     */
+    @ApiModelProperty("所在班级")
+    private String className;
+    /**
+     * 所学专业
+     */
+    @ApiModelProperty("所学专业")
+    private String majorName;
+}