Browse Source

学生班级

fanxp 1 year ago
parent
commit
cb330a5df9

+ 97 - 96
src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentInspectionController.java

@@ -7,6 +7,7 @@ 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.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.toolkit.MPJWrappers;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
@@ -50,14 +51,14 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
-* @title: 学生班级巡查考核
-* @Author dzx
-* @Date: 2023-11-16
-* @Version 1.0
-*/
+ * @title: 学生班级巡查考核
+ * @Author dzx
+ * @Date: 2023-11-16
+ * @Version 1.0
+ */
 @RestController
 @RequestMapping("/student" + "/basestudentassessmentinspection")
-@Api(value = "/student"  + "/basestudentassessmentinspection",tags = "学生班级巡查考核代码")
+@Api(value = "/student" + "/basestudentassessmentinspection", tags = "学生班级巡查考核代码")
 @AllArgsConstructor
 public class BaseStudentAssessmentInspectionController {
 
@@ -71,17 +72,17 @@ public class BaseStudentAssessmentInspectionController {
     private final BaseClassMapper baseClassMapper;
 
     @GetMapping(value = "/page")
-    @ApiOperation(value="学生班级巡查考核列表(分页)")
+    @ApiOperation(value = "学生班级巡查考核列表(分页)")
     @SaCheckPermission("basestudentassessmentinspection:detail")
-    public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> page(@Valid BaseStudentAssessmentInspectionPageDto dto){
-
-        return RT.ok(getData(dto));
+    public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> page(@Valid BaseStudentAssessmentInspectionPageDto dto) {
+        Page<BaseStudentAssessmentInspectionPageVo> page = baseStudentAssessmentInspectionService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        return RT.ok(ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class));
     }
 
     @GetMapping(value = "/mibliePage")
-    @ApiOperation(value="学生操行分记录管理列表(移动端分页)")
+    @ApiOperation(value = "学生操行分记录管理列表(移动端分页)")
     @SaCheckPermission("basestudentbehaviormanage:detail")
-    public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> mibliePage(@Valid BaseStudentAssessmentInspectionPageDto dto){
+    public RT<PageOutput<BaseStudentAssessmentInspectionPageVo>> mibliePage(@Valid BaseStudentAssessmentInspectionPageDto dto) {
         List<BaseClass> classList = baseClassMapper.selectList(
                 MPJWrappers.<BaseClass>lambdaJoin()
                         .eq(BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
@@ -95,91 +96,91 @@ public class BaseStudentAssessmentInspectionController {
         return RT.ok(getData(dto));
     }
 
-    PageOutput<BaseStudentAssessmentInspectionPageVo> getData(BaseStudentAssessmentInspectionPageDto dto){
+    PageOutput<BaseStudentAssessmentInspectionPageVo> getData(BaseStudentAssessmentInspectionPageDto dto) {
         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(StrUtil.isNotEmpty(dto.getEnrollType()), BaseClass::getEnrollType, dto.getEnrollType())
-                .eq(ObjectUtil.isNotNull(dto.getGradeId()), BaseClass::getGradeId, dto.getGradeId())
-                .eq(BaseStudentAssessmentInspection::getStatus, 1)
-                .in(ObjectUtil.isNotNull(dto.getClassIds()), BaseStudentAssessmentClassRelation::getClassId, dto.getClassIds())
-                .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)
+                        .like(StrUtil.isNotEmpty(dto.getCreateUserName()), XjrUser::getName, dto.getCreateUserName())
+                        .like(StrUtil.isNotEmpty(dto.getModifyUserName()), XjrUser::getName, dto.getModifyUserName())
+                        .eq(StrUtil.isNotEmpty(dto.getEnrollType()), BaseClass::getEnrollType, dto.getEnrollType())
+                        .eq(ObjectUtil.isNotNull(dto.getGradeId()), BaseClass::getGradeId, dto.getGradeId())
+                        .eq(BaseStudentAssessmentInspection::getStatus, 1)
+                        .in(ObjectUtil.isNotNull(dto.getClassIds()), BaseStudentAssessmentClassRelation::getClassId, dto.getClassIds())
+                        .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)
         );
 
         return ConventPage.getPageOutput(page, BaseStudentAssessmentInspectionPageVo.class);
     }
 
-    @GetMapping(value = "/moblieInfo")
-    @ApiOperation(value="根据id查询学生班级巡查考核信息")
-    @SaCheckPermission("basestudentassessmentinspection:detail")
-    public RT<List<BaseStudentAssessmentInspectionPageVo>> moblieInfo(@RequestParam Long id){
-        BaseStudentAssessmentInspection baseStudentAssessmentInspection = baseStudentAssessmentInspectionService.getById(id);
-        if (baseStudentAssessmentInspection == null) {
-           return RT.error("找不到此数据!");
-        }
-        List<BaseStudentAssessmentInspectionPageVo> list = baseStudentAssessmentInspectionService.selectJoinList(BaseStudentAssessmentInspectionPageVo.class,
-                MPJWrappers.<BaseStudentAssessmentInspection>lambdaJoin()
-                .eq(ObjectUtil.isNotNull(id), BaseStudentAssessmentInspection::getId, id)
-                .eq(BaseStudentAssessmentInspection::getStatus, 1)
-                .selectAs(BaseClass::getName, BaseStudentAssessmentInspectionPageVo::getClassName)
-                .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(BaseStudentAssessmentClassRelation.class, BaseStudentAssessmentClassRelation::getBaseStudentAssessmentInspectionId, BaseStudentAssessmentInspection::getId)
-                .innerJoin(BaseClass.class, BaseClass::getId, BaseStudentAssessmentClassRelation::getClassId)
-                .innerJoin("xjr_user u on t5.teacher_id = u.id")
-                .innerJoin("xjr_department d on t5.org_id = d.id")
-        );
-        for (BaseStudentAssessmentInspectionPageVo inspectionPageVo : list) {
-            //查询学生
-            LambdaQueryWrapper<BaseStudentAssessmentStudentRelation> studentQueryWrapper = new LambdaQueryWrapper<>();
-            studentQueryWrapper
-                    .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, inspectionPageVo.getId())
-                    .select(BaseStudentAssessmentStudentRelation.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentAssessmentStudentRelationVo.class).contains(x.getProperty()));
-            List<BaseStudentAssessmentStudentRelation> studentList = baseStudentAssessmentStudentRelationService.list(studentQueryWrapper);
-            inspectionPageVo.setStudentList(BeanUtil.copyToList(studentList, BaseStudentAssessmentStudentRelationVo.class));
-            inspectionPageVo.setStudentCount(studentList.size());
-        }
-        return RT.ok(list);
-    }
+//    @GetMapping(value = "/moblieInfo")
+//    @ApiOperation(value="根据id查询学生班级巡查考核信息")
+//    @SaCheckPermission("basestudentassessmentinspection:detail")
+//    public RT<List<BaseStudentAssessmentInspectionPageVo>> moblieInfo(@RequestParam Long id){
+//        BaseStudentAssessmentInspection baseStudentAssessmentInspection = baseStudentAssessmentInspectionService.getById(id);
+//        if (baseStudentAssessmentInspection == null) {
+//           return RT.error("找不到此数据!");
+//        }
+//        List<BaseStudentAssessmentInspectionPageVo> list = baseStudentAssessmentInspectionService.selectJoinList(BaseStudentAssessmentInspectionPageVo.class,
+//                MPJWrappers.<BaseStudentAssessmentInspection>lambdaJoin()
+//                .eq(ObjectUtil.isNotNull(id), BaseStudentAssessmentInspection::getId, id)
+//                .eq(BaseStudentAssessmentInspection::getStatus, 1)
+//                .selectAs(BaseClass::getName, BaseStudentAssessmentInspectionPageVo::getClassName)
+//                .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(BaseStudentAssessmentClassRelation.class, BaseStudentAssessmentClassRelation::getBaseStudentAssessmentInspectionId, BaseStudentAssessmentInspection::getId)
+//                .innerJoin(BaseClass.class, BaseClass::getId, BaseStudentAssessmentClassRelation::getClassId)
+//                .innerJoin("xjr_user u on t5.teacher_id = u.id")
+//                .innerJoin("xjr_department d on t5.org_id = d.id")
+//        );
+//        for (BaseStudentAssessmentInspectionPageVo inspectionPageVo : list) {
+//            //查询学生
+//            LambdaQueryWrapper<BaseStudentAssessmentStudentRelation> studentQueryWrapper = new LambdaQueryWrapper<>();
+//            studentQueryWrapper
+//                    .eq(BaseStudentAssessmentStudentRelation::getBaseStudentAssessmentInspectionId, inspectionPageVo.getId())
+//                    .select(BaseStudentAssessmentStudentRelation.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentAssessmentStudentRelationVo.class).contains(x.getProperty()));
+//            List<BaseStudentAssessmentStudentRelation> studentList = baseStudentAssessmentStudentRelationService.list(studentQueryWrapper);
+//            inspectionPageVo.setStudentList(BeanUtil.copyToList(studentList, BaseStudentAssessmentStudentRelationVo.class));
+//            inspectionPageVo.setStudentCount(studentList.size());
+//        }
+//        return RT.ok(list);
+//    }
 
     @GetMapping(value = "/info")
-    @ApiOperation(value="根据id查询学生班级巡查考核信息")
+    @ApiOperation(value = "根据id查询学生班级巡查考核信息")
     @SaCheckPermission("basestudentassessmentinspection:detail")
-    public RT<BaseStudentAssessmentInspectionVo> info(@RequestParam Long id){
+    public RT<BaseStudentAssessmentInspectionVo> info(@RequestParam Long id) {
         BaseStudentAssessmentInspection baseStudentAssessmentInspection = baseStudentAssessmentInspectionService.getById(id);
         if (baseStudentAssessmentInspection == null) {
             return RT.error("找不到此数据!");
@@ -204,27 +205,27 @@ public class BaseStudentAssessmentInspectionController {
 
         //查询考核项目
         BaseStudentAssessmentProject project = baseStudentAssessmentProjectMapper.selectById(baseStudentAssessmentInspection.getBaseStudentAssessmentProjectId());
-        if(project != null){
+        if (project != null) {
             baseStudentAssessmentInspectionVo.setAssessmentProjectName(project.getName());
         }
         //查询考核类别
         BaseStudentAssessmentCategory category = baseStudentAssessmentCategoryMapper.selectById(baseStudentAssessmentInspection.getBaseStudentAssessmentCategoryId());
-        if(category != null){
+        if (category != null) {
             baseStudentAssessmentInspectionVo.setAssessmentCategoryName(category.getName());
         }
         //登记人
         XjrUser createUser = xjrUserMapper.selectById(baseStudentAssessmentInspection.getCreateUserId());
-        if(createUser != null){
+        if (createUser != null) {
             baseStudentAssessmentInspectionVo.setCreateUserName(createUser.getName());
         }
         //考核人
         XjrUser assessmentUser = xjrUserMapper.selectById(baseStudentAssessmentInspection.getAssessmentUserId());
-        if(createUser != null){
+        if (createUser != null) {
             baseStudentAssessmentInspectionVo.setAssessmentUserName(assessmentUser.getName());
         }
         //修改人
         XjrUser modifyUser = xjrUserMapper.selectById(baseStudentAssessmentInspection.getModifyUserId());
-        if(modifyUser != null){
+        if (modifyUser != null) {
             baseStudentAssessmentInspectionVo.setModifyUserName(modifyUser.getName());
         }
         return RT.ok(baseStudentAssessmentInspectionVo);
@@ -234,16 +235,16 @@ public class BaseStudentAssessmentInspectionController {
     @PostMapping
     @ApiOperation(value = "新增学生班级巡查考核")
     @SaCheckPermission("basestudentassessmentinspection:add")
-    public RT<Boolean> add(@Valid @RequestBody AddBaseStudentAssessmentInspectionDto dto){
+    public RT<Boolean> add(@Valid @RequestBody AddBaseStudentAssessmentInspectionDto dto) {
         BaseStudentAssessmentInspection baseStudentAssessmentInspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
         boolean isSuccess = baseStudentAssessmentInspectionService.save(baseStudentAssessmentInspection);
-    return RT.ok(isSuccess);
+        return RT.ok(isSuccess);
     }
 
     @PutMapping
     @ApiOperation(value = "修改学生班级巡查考核")
     @SaCheckPermission("basestudentassessmentinspection:edit")
-    public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentAssessmentInspectionDto dto){
+    public RT<Boolean> update(@Valid @RequestBody UpdateBaseStudentAssessmentInspectionDto dto) {
 
         BaseStudentAssessmentInspection baseStudentAssessmentInspection = BeanUtil.toBean(dto, BaseStudentAssessmentInspection.class);
         return RT.ok(baseStudentAssessmentInspectionService.updateById(baseStudentAssessmentInspection));
@@ -253,7 +254,7 @@ public class BaseStudentAssessmentInspectionController {
     @DeleteMapping
     @ApiOperation(value = "删除学生班级巡查考核")
     @SaCheckPermission("basestudentassessmentinspection:delete")
-    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids) {
         return RT.ok(baseStudentAssessmentInspectionService.removeBatchByIds(ids));
 
     }

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

@@ -30,9 +30,6 @@ public class BaseStudentAssessmentInspectionPageDto extends PageInput {
     @ApiModelProperty("考核项目ids")
     private List<Long> baseStudentAssessmentProjectIds;
 
-    @ApiModelProperty("组织机构ids")
-    private List<Long> orgIds;
-
     @ApiModelProperty("年级id")
     private Long gradeId;
 

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

@@ -1,9 +1,15 @@
 package com.xjrsoft.module.student.mapper;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.List;
+
 /**
 * @title: 学生班级巡查考核
 * @Author dzx
@@ -12,5 +18,12 @@ import org.apache.ibatis.annotations.Mapper;
 */
 @Mapper
 public interface BaseStudentAssessmentInspectionMapper extends MPJBaseMapper<BaseStudentAssessmentInspection> {
+    /**
+     * 分页查询
+     * @param dto
+     * @return
+     */
+    Page<BaseStudentAssessmentInspectionPageVo> getPage(Page<BaseStudentAssessmentInspectionPageDto> page,BaseStudentAssessmentInspectionPageDto dto);
 
+    List<BaseStudentAssessmentInspection> getListAll();
 }

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

@@ -1,7 +1,13 @@
 package com.xjrsoft.module.student.service;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.dingtalk.api.response.OapiRhinoOrderQueryResponse;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
+
+import java.util.List;
 
 /**
 * @title: 学生班级巡查考核
@@ -11,4 +17,10 @@ import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
 */
 
 public interface IBaseStudentAssessmentInspectionService extends MPJBaseService<BaseStudentAssessmentInspection> {
+    /**
+     * 分页查询
+     * @param dto
+     * @return
+     */
+    Page<BaseStudentAssessmentInspectionPageVo> getPage(Page<BaseStudentAssessmentInspectionPageDto> page,BaseStudentAssessmentInspectionPageDto dto);
 }

+ 17 - 5
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -1,19 +1,31 @@
 package com.xjrsoft.module.student.service.impl;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto;
 import com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection;
 import com.xjrsoft.module.student.mapper.BaseStudentAssessmentInspectionMapper;
 import com.xjrsoft.module.student.service.IBaseStudentAssessmentInspectionService;
+import com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
-* @title: 学生班级巡查考核
-* @Author dzx
-* @Date: 2023-11-16
-* @Version 1.0
-*/
+ * @title: 学生班级巡查考核
+ * @Author dzx
+ * @Date: 2023-11-16
+ * @Version 1.0
+ */
 @Service
 @AllArgsConstructor
 public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceImpl<BaseStudentAssessmentInspectionMapper, BaseStudentAssessmentInspection> implements IBaseStudentAssessmentInspectionService {
+
+    private final BaseStudentAssessmentInspectionMapper assessmentInspectionMapper;
+
+    @Override
+    public Page<BaseStudentAssessmentInspectionPageVo> getPage(Page<BaseStudentAssessmentInspectionPageDto> page, BaseStudentAssessmentInspectionPageDto dto) {
+        return assessmentInspectionMapper.getPage(page, dto);
+    }
 }

+ 19 - 111
src/main/java/com/xjrsoft/module/student/vo/BaseStudentAssessmentInspectionPageVo.java

@@ -15,107 +15,35 @@ import java.util.List;
 */
 @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("学期(base_semester)")
+    private String semesterName;
+
+    @ApiModelProperty("年级(base_grade)")
+    private String gradeName;
+
+    @ApiModelProperty("考核班级")
+    private String assessmentClassNames;
+
     @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 scoreTypeCn;
+
+    @ApiModelProperty("考核用户(xjr_user)")
+    private String assessmentUserName;
+
     @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;
@@ -123,26 +51,6 @@ public class BaseStudentAssessmentInspectionPageVo {
     @ApiModelProperty("考核类别")
     private String assessmentCategoryName;
 
-    @ApiModelProperty("班级名称")
-    private String className;
-
-    @ApiModelProperty("班主任")
-    private String classTeacher;
-
-    @ApiModelProperty("部门名称")
-    private String deptName;
-
-    @ApiModelProperty("考核人")
-    private String createUserName;
-
     @ApiModelProperty("影响班级考核的学生人数")
     private Integer studentCount;
-
-    /**
-     * 影响班级考核的学生
-     */
-    @ApiModelProperty("影响班级考核的学生")
-    @EntityMapping(thisField = "id", joinField = "baseStudentAssessmentInspectionId")
-    private List<BaseStudentAssessmentStudentRelationVo> studentList;
-
 }

+ 1 - 1
src/main/resources/application.yml

@@ -96,7 +96,7 @@ sa-token:
 
 mybatis-plus-join:
   #是否打印 mybatis plus join banner 默认true
-  banner: true
+  banner: false
   #全局启用副表逻辑删除(默认true) 关闭后关联查询不会加副表逻辑删除
   sub-table-logic: true
   #拦截器MappedStatement缓存(默认true)

+ 27 - 0
src/main/resources/mapper/student/BaseStudentAssessmentInspectionMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.student.mapper.BaseStudentAssessmentInspectionMapper">
+    <select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentAssessmentInspectionPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentAssessmentInspectionPageVo">
+        select t.id,t.score,t.score_type,t.assessment_date,t.reason,t1.name as assessment_category_name,t2.name as assessment_project_name,t3.name as semester_name,t4.name as grade_name,t5.name as assessment_user_name,t6.name as score_type_cn,
+               (
+                   select group_concat(b.name) from base_student_assessment_class_relation a
+                   left join base_class b on a.class_id=b.id
+                   where a.base_student_assessment_inspection_id=t.id group by a.base_student_assessment_inspection_id
+               ) as assessment_class_names,
+               (SELECT count(*) FROM base_student_assessment_student_relation WHERE base_student_assessment_inspection_id = t.id) as student_count
+                from base_student_assessment_inspection t
+                 left join base_student_assessment_category t1 on (t1.id = t.base_student_assessment_category_id)
+                 left join base_student_assessment_project t2 on (t2.id = t.base_student_assessment_project_id)
+                 left join base_semester t3 on t.base_semester_id=t3.id
+                 left join base_grade t4 on t.grade_id=t4.id
+                 left join xjr_user t5 on t.assessment_user_id=t5.id
+                 left join xjr_dictionary_detail t6 on t6.code=t.score_type
+        where  t.delete_mark=0 and t1.delete_mark=0  and t2.delete_mark=0  and t3.delete_mark=0 and t.status=1;
+    </select>
+
+    <select id="getListAll" resultType="com.xjrsoft.module.student.entity.BaseStudentAssessmentInspection">
+        select * from base_student_assessment_inspection;
+    </select>
+</mapper>

+ 40 - 40
src/main/resources/sqlScript/20231113_sql.sql

@@ -6,9 +6,9 @@ CREATE TABLE base_student_post
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -29,9 +29,9 @@ CREATE TABLE base_student_cadre
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -56,9 +56,9 @@ CREATE TABLE base_punishment_type
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -76,9 +76,9 @@ CREATE TABLE base_student_punishment_info
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `base_semester_id` BIGINT COMMENT '学期ID(base_semester)',
@@ -123,7 +123,7 @@ ALTER TABLE `tl`.`base_punishment_student_relation`
 
 ALTER TABLE `tl`.`base_punishment_student_relation`
   ADD COLUMN `modify_user_id` INT NULL   COMMENT '修改人' AFTER `adjust_date`,
-  ADD COLUMN `modify_date` DATE NULL   COMMENT '修改时间' AFTER `modify_user_id`;
+  ADD COLUMN `modify_date` datetime NULL   COMMENT '修改时间' AFTER `modify_user_id`;
 ALTER TABLE `tl`.`base_student_punishment_info`
   CHANGE `class_id` `class_id` BIGINT NULL   COMMENT '班级id';
 
@@ -137,9 +137,9 @@ CREATE TABLE base_student_assessment_base_score
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -157,9 +157,9 @@ CREATE TABLE base_student_assessment_base_level
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -177,9 +177,9 @@ CREATE TABLE base_student_assessment_category
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -198,9 +198,9 @@ CREATE TABLE base_student_assessment_project
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -232,22 +232,22 @@ CREATE TABLE base_student_assessment_inspection
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
     `base_student_assessment_category_id` BIGINT NULL DEFAULT NULL COMMENT '学生考核类别编号(base_student_assessment_category)',
     `base_student_assessment_project_id` BIGINT NULL DEFAULT NULL COMMENT '学生考核项目编号(base_student_assessment_project)',
     `base_semester_id` bigint COMMENT '学期ID(base_semester)',
-    `grade_id` bigint NOT NULL COMMENT '入学年级(base_grade)',
-    `class_ids` varchar(4000) NOT NULL COMMENT '班级Ids(多选)',
+    `grade_id` bigint  NULL DEFAULT NULL COMMENT '入学年级(base_grade)',
+    `class_ids` varchar(4000)  NULL DEFAULT NULL COMMENT '班级Ids(多选)',
     `assessment_date` date NULL DEFAULT NULL COMMENT '考核时间',
     `score` double NOT NULL DEFAULT 0 COMMENT '分数',
     `score_type` varchar(20) NULL DEFAULT NULL COMMENT '分数类型(xjr_dictionary_item[score_type])',
-    `assessment_user_id` bigint not null COMMENT '考核用户ID(xjr_user)',
-    `reason` VARCHAR(1000) COMMENT '原因',
+    `assessment_user_id` bigint  NULL DEFAULT NULL COMMENT '考核用户ID(xjr_user)',
+    `reason` VARCHAR(1000)  NULL DEFAULT NULL COMMENT '原因',
     `file_id` bigint NULL DEFAULT NULL COMMENT '文件ID(xjr_file)',
     `status` INT NOT NULL default 0 COMMENT '状态(1:结束 0:未结束)',
     PRIMARY KEY (`id`)
@@ -300,9 +300,9 @@ CREATE TABLE base_student_behavior_base_score
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -321,9 +321,9 @@ CREATE TABLE base_student_behavior_base_level
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -341,9 +341,9 @@ CREATE TABLE base_student_behavior_category
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -362,9 +362,9 @@ CREATE TABLE base_student_behavior_project
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
@@ -393,26 +393,26 @@ CREATE TABLE base_student_behavior_manage
 (
     id BIGINT NOT NULL COMMENT '主键编号',
     `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
-    `create_date` DATE NULL DEFAULT NULL COMMENT '创建时间',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
     `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
-    `modify_date` DATE NULL DEFAULT NULL COMMENT '修改时间',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
     `delete_mark` INT NOT NULL COMMENT '删除标记',
     `enabled_mark` INT NOT NULL COMMENT '有效标志',
     `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
     `base_student_behavior_category_id` BIGINT NULL DEFAULT NULL COMMENT '学生操行分考核类别编号(base_student_behavior_category)',
     `base_student_behavior_project_id` BIGINT NULL DEFAULT NULL COMMENT '学生操行分考核项目编号(base_student_behavior_project)',
-    `base_semester_id` bigint COMMENT '学期ID(base_semester)',
-    `grade_id` bigint NOT NULL COMMENT '入学年级(base_grade)',
-    `class_ids` varchar(4000) NOT NULL COMMENT '班级Ids(多选)',
-    `assessment_date` date NULL DEFAULT NULL COMMENT '考核时间',
+    `base_semester_id` bigint NULL DEFAULT NULL COMMENT '学期ID(base_semester)',
+    `grade_id` bigint NULL DEFAULT NULL COMMENT '入学年级(base_grade)',
+    `class_ids` varchar(4000) NULL DEFAULT NULL COMMENT '班级Ids(多选)',
+    `assessment_date` datetime NULL DEFAULT NULL COMMENT '考核时间',
     `total_score` double NOT NULL DEFAULT 0 COMMENT '总分',
     `score` double NOT NULL DEFAULT 0 COMMENT '分数',
     `score_number` double NOT NULL DEFAULT 0 COMMENT '分数次数',
     `is_affect` INT NULL DEFAULT 0 COMMENT '是否影响(1:是 0:否)',
-    `assessment_user_id` bigint not null COMMENT '考核用户ID(xjr_user)',
-    `assessment_department_id` bigint NOT NULL COMMENT '考核机构(xjr_department)',
+    `assessment_user_id` bigint NULL DEFAULT NULL COMMENT '考核用户ID(xjr_user)',
+    `assessment_department_id` bigint NULL DEFAULT NULL COMMENT '考核机构(xjr_department)',
     `assessment_address` varchar(1000) NULL DEFAULT NULL COMMENT '考核地点',
-    `remark` VARCHAR(1000) COMMENT '备注',
+    `remark` VARCHAR(1000) NULL DEFAULT NULL COMMENT '备注',
     `file_id` bigint NULL DEFAULT NULL COMMENT '文件ID(xjr_file)',
     `status` INT NOT NULL default 0 COMMENT '状态(1:结束 0:未结束)',
     PRIMARY KEY (`id`)