Browse Source

学生成绩

dzx 4 months ago
parent
commit
b48919e5ad

+ 1 - 1
src/main/java/com/xjrsoft/module/job/ExamScoreDataTask.java

@@ -31,7 +31,7 @@ public class ExamScoreDataTask {
         String active = SpringUtil.getActiveProfile();
         String active = SpringUtil.getActiveProfile();
         if(!"prod".equals(active)){
         if(!"prod".equals(active)){
             log.info("非正式环境,无法执行数据推送");
             log.info("非正式环境,无法执行数据推送");
-            return;
+            //return;
         }
         }
         doExecute();
         doExecute();
     }
     }

+ 1 - 68
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -23,26 +23,19 @@ import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseGrade;
 import com.xjrsoft.module.base.entity.BaseGrade;
-import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.base.service.IBaseClassService;
 import com.xjrsoft.module.base.service.IBaseClassService;
 import com.xjrsoft.module.base.service.IBaseGradeService;
 import com.xjrsoft.module.base.service.IBaseGradeService;
 import com.xjrsoft.module.concat.service.IXjrUserService;
 import com.xjrsoft.module.concat.service.IXjrUserService;
 import com.xjrsoft.module.hikvision.util.DataUtil;
 import com.xjrsoft.module.hikvision.util.DataUtil;
-import com.xjrsoft.module.organization.entity.Department;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
-import com.xjrsoft.module.organization.service.IDepartmentService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.room.service.IRoomBedService;
 import com.xjrsoft.module.room.service.IRoomBedService;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
-import com.xjrsoft.module.student.entity.BaseClassMajorSet;
-import com.xjrsoft.module.student.entity.BaseMajor;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
-import com.xjrsoft.module.student.service.IBaseMajorService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
-import com.xjrsoft.module.student.vo.BaseClassMajorSetVo;
 import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
 import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
 import com.xjrsoft.module.student.vo.BaseStudentSchoolRollVo;
 import com.xjrsoft.module.student.vo.BaseStudentSchoolRollVo;
 import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
 import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
@@ -89,8 +82,6 @@ public class StudentManagerController {
 
 
     private final IStudentManagerService studentManagerService;
     private final IStudentManagerService studentManagerService;
     private final IBaseGradeService baseGradeService;
     private final IBaseGradeService baseGradeService;
-    private final IDepartmentService baseDeparmentService;
-    private final IBaseMajorService baseMajorService;
     private final IBaseClassService baseClassService;
     private final IBaseClassService baseClassService;
     private final IXjrUserService xjrUserService;
     private final IXjrUserService xjrUserService;
     private final IRoomBedService roomBedService;
     private final IRoomBedService roomBedService;
@@ -214,65 +205,7 @@ public class StudentManagerController {
     @ApiOperation(value = "学生部门专业年级班级树")
     @ApiOperation(value = "学生部门专业年级班级树")
     @SaCheckPermission("studentmanager:detail")
     @SaCheckPermission("studentmanager:detail")
     public RT<List<BaseDepMajorGradeClassStudenTreeVo>> tree2() {
     public RT<List<BaseDepMajorGradeClassStudenTreeVo>> tree2() {
-        List<BaseDepMajorGradeClassStudenTreeVo> voList = new ArrayList<>();
-        MPJLambdaWrapper<BaseClass> baseClassMPJLambdaWrapper = new MPJLambdaWrapper<>();
-        baseClassMPJLambdaWrapper
-                .selectAs(BaseClass::getId, BaseClassMajorSetVo::getClassId)
-                .selectAs(BaseMajorSet::getMajorId, BaseClassMajorSetVo::getMajorId)
-                .selectAs(BaseClass::getName, BaseClassMajorSetVo::getClassName)
-                .selectAs(BaseClass::getGradeId, BaseClassMajorSetVo::getGradeId)
-                .leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, BaseClass::getId)
-                .leftJoin(BaseMajorSet.class, BaseMajorSet::getId, BaseClassMajorSet::getMajorSetId)
-        ;
-
-        List<BaseClassMajorSetVo> majorSetList = baseClassService.selectJoinList(BaseClassMajorSetVo.class, baseClassMPJLambdaWrapper);
-
-
-        List<BaseGrade> gradeList = baseGradeService.list(
-                new QueryWrapper<BaseGrade>().lambda().eq(BaseGrade::getDeleteMark, DeleteMark.NODELETE.getCode())
-        );
-        List<BaseMajor> majorList = baseMajorService.list(
-                new QueryWrapper<BaseMajor>().lambda().eq(BaseMajor::getDeleteMark, DeleteMark.NODELETE.getCode())
-        );
-        List<Department> departmentList =baseDeparmentService.list(
-                new QueryWrapper<Department>().lambda().eq(Department::getDeleteMark, DeleteMark.NODELETE.getCode())
-                        .eq(Department::getParentId,"1684107782861680008")
-        );
-        departmentList.forEach((node) -> {
-            voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
-                setId(node.getId().toString());
-                setTreeType(1);
-                setName(node.getName());
-                setParentId("0");
-            }});
-        });
-        majorList.forEach((node)->{
-            voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
-                setId(node.getId().toString());
-                setName(node.getName());
-                setTreeType(2);
-                setParentId(node.getDepartmentId().toString());
-            }});
-            gradeList.forEach((DDD)->{
-                voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
-                    setId(node.getId().toString()+"_"+DDD.getId().toString());
-                    setName(DDD.getName());
-                    setTreeType(3);
-                    setParentId(node.getId().toString());
-                }});
-            });
-        });
-        majorSetList.forEach((node)->{
-            voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
-                setId(node.getClassId().toString());
-                setName(node.getClassName());
-                setTreeType(4);
-                setParentId(node.getMajorId().toString()+"_"+node.getGradeId());
-            }});
-        });
-
-        List<BaseDepMajorGradeClassStudenTreeVo> treeVoList = TreeUtil.build(voList);
-
+        List<BaseDepMajorGradeClassStudenTreeVo> treeVoList = studentManagerService.deptMajorGradeClassTree();
         return RT.ok(treeVoList);
         return RT.ok(treeVoList);
     }
     }
 
 

+ 3 - 0
src/main/java/com/xjrsoft/module/student/service/IStudentManagerService.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
+import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
 import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
@@ -63,4 +64,6 @@ public interface IStudentManagerService extends MPJBaseService<BaseStudentUser>
     Page<BaseStudentUserPageVo> getStudentPage(Page<BaseStudentUserPageVo> page, BaseStudentUserPageDto dto);
     Page<BaseStudentUserPageVo> getStudentPage(Page<BaseStudentUserPageVo> page, BaseStudentUserPageDto dto);
 
 
     Boolean uploadImage(Long userId, MultipartFile file) throws IOException;
     Boolean uploadImage(Long userId, MultipartFile file) throws IOException;
+
+    List<BaseDepMajorGradeClassStudenTreeVo> deptMajorGradeClassTree();
 }
 }

+ 78 - 0
src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java

@@ -20,6 +20,7 @@ import com.xjrsoft.common.enums.RoleEnum;
 import com.xjrsoft.common.enums.YesOrNoEnum;
 import com.xjrsoft.common.enums.YesOrNoEnum;
 import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.utils.RedisUtil;
 import com.xjrsoft.common.utils.RedisUtil;
+import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.entity.BaseGrade;
 import com.xjrsoft.module.base.entity.BaseGrade;
@@ -27,16 +28,22 @@ import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.base.mapper.BaseGradeMapper;
 import com.xjrsoft.module.base.mapper.BaseGradeMapper;
 import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;
 import com.xjrsoft.module.base.mapper.BaseMajorSetMapper;
+import com.xjrsoft.module.base.service.IBaseClassService;
+import com.xjrsoft.module.base.service.IBaseGradeService;
+import com.xjrsoft.module.organization.entity.Department;
 import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
 import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.mapper.UserDeptRelationMapper;
 import com.xjrsoft.module.organization.mapper.UserDeptRelationMapper;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
+import com.xjrsoft.module.organization.service.IDepartmentService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
+import com.xjrsoft.module.student.entity.BaseClassMajorSet;
+import com.xjrsoft.module.student.entity.BaseMajor;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentContact;
 import com.xjrsoft.module.student.entity.BaseStudentContact;
 import com.xjrsoft.module.student.entity.BaseStudentFamily;
 import com.xjrsoft.module.student.entity.BaseStudentFamily;
@@ -48,12 +55,15 @@ import com.xjrsoft.module.student.mapper.BaseStudentFamilyMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentFamilyMemberMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentFamilyMemberMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
 import com.xjrsoft.module.student.mapper.BaseStudentUserMapper;
+import com.xjrsoft.module.student.service.IBaseMajorService;
 import com.xjrsoft.module.student.service.IBaseStudentContactService;
 import com.xjrsoft.module.student.service.IBaseStudentContactService;
 import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
 import com.xjrsoft.module.student.service.IBaseStudentFamilyService;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IBaseStudentService;
 import com.xjrsoft.module.student.service.IBaseStudentService;
 import com.xjrsoft.module.student.service.IBaseStudentSubsidizeService;
 import com.xjrsoft.module.student.service.IBaseStudentSubsidizeService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
+import com.xjrsoft.module.student.vo.BaseClassMajorSetVo;
+import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
 import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
@@ -118,6 +128,11 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     private final IUserService userService;
     private final IUserService userService;
     private final CommonPropertiesConfig propertiesConfig;
     private final CommonPropertiesConfig propertiesConfig;
 
 
+    private final IBaseGradeService baseGradeService;
+    private final IDepartmentService baseDeparmentService;
+    private final IBaseMajorService baseMajorService;
+    private final IBaseClassService baseClassService;
+
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
     public Long add(AddBaseStudentUserDto dto){
     public Long add(AddBaseStudentUserDto dto){
@@ -990,6 +1005,69 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         return true;
         return true;
     }
     }
 
 
+    @Override
+    public List<BaseDepMajorGradeClassStudenTreeVo> deptMajorGradeClassTree() {
+        List<BaseDepMajorGradeClassStudenTreeVo> voList = new ArrayList<>();
+        MPJLambdaWrapper<BaseClass> baseClassMPJLambdaWrapper = new MPJLambdaWrapper<>();
+        baseClassMPJLambdaWrapper
+                .selectAs(BaseClass::getId, BaseClassMajorSetVo::getClassId)
+                .selectAs(BaseMajorSet::getMajorId, BaseClassMajorSetVo::getMajorId)
+                .selectAs(BaseClass::getName, BaseClassMajorSetVo::getClassName)
+                .selectAs(BaseClass::getGradeId, BaseClassMajorSetVo::getGradeId)
+                .leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, BaseClass::getId)
+                .leftJoin(BaseMajorSet.class, BaseMajorSet::getId, BaseClassMajorSet::getMajorSetId)
+        ;
+
+        List<BaseClassMajorSetVo> majorSetList = baseClassService.selectJoinList(BaseClassMajorSetVo.class, baseClassMPJLambdaWrapper);
+
+
+        List<BaseGrade> gradeList = baseGradeService.list(
+                new QueryWrapper<BaseGrade>().lambda().eq(BaseGrade::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        List<BaseMajor> majorList = baseMajorService.list(
+                new QueryWrapper<BaseMajor>().lambda().eq(BaseMajor::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        List<Department> departmentList =baseDeparmentService.list(
+                new QueryWrapper<Department>().lambda().eq(Department::getDeleteMark, DeleteMark.NODELETE.getCode())
+                        .eq(Department::getParentId,"1684107782861680008")
+        );
+        departmentList.forEach((node) -> {
+            voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
+                setId(node.getId().toString());
+                setTreeType(1);
+                setName(node.getName());
+                setParentId("0");
+            }});
+        });
+        majorList.forEach((node)->{
+            voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
+                setId(node.getId().toString());
+                setName(node.getName());
+                setTreeType(2);
+                setParentId(node.getDepartmentId().toString());
+            }});
+            gradeList.forEach((DDD)->{
+                voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
+                    setId(node.getId().toString()+"_"+DDD.getId().toString());
+                    setName(DDD.getName());
+                    setTreeType(3);
+                    setParentId(node.getId().toString());
+                }});
+            });
+        });
+        majorSetList.forEach((node)->{
+            voList.add(new BaseDepMajorGradeClassStudenTreeVo(){{
+                setId(node.getClassId().toString());
+                setName(node.getClassName());
+                setTreeType(4);
+                setParentId(node.getMajorId().toString()+"_"+node.getGradeId());
+            }});
+        });
+
+        List<BaseDepMajorGradeClassStudenTreeVo> treeVoList = TreeUtil.build(voList);
+        return treeVoList;
+    }
+
     /**
     /**
      * 初始化字典信息
      * 初始化字典信息
      * 身份证类型、
      * 身份证类型、

+ 9 - 0
src/main/java/com/xjrsoft/module/xycxedu/controller/ExamPlanController.java

@@ -18,6 +18,7 @@ import com.xjrsoft.module.xycxedu.service.IExamPlanService;
 import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
 import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
 import com.xjrsoft.module.xycxedu.vo.ExamPlanPageVo;
 import com.xjrsoft.module.xycxedu.vo.ExamPlanPageVo;
 import com.xjrsoft.module.xycxedu.vo.ExamPlanVo;
 import com.xjrsoft.module.xycxedu.vo.ExamPlanVo;
+import com.xjrsoft.module.xycxedu.vo.XycxeduExamListVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
@@ -111,6 +112,14 @@ public class ExamPlanController {
     @SaCheckPermission("examplan:delete")
     @SaCheckPermission("examplan:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
         return RT.ok(examPlanService.removeBatchByIds(ids));
         return RT.ok(examPlanService.removeBatchByIds(ids));
+    }
 
 
+    @GetMapping(value = "/exam-list")
+    @ApiOperation(value="查询所有考试")
+    @SaCheckPermission("examplan:detail")
+    public RT<List<XycxeduExamListVo>> allExam(){
+        List<XycxeduExamList> list = examListService.list();
+        List<XycxeduExamListVo> listVos = BeanUtil.copyToList(list, XycxeduExamListVo.class);
+        return RT.ok(listVos);
     }
     }
 }
 }

+ 44 - 0
src/main/java/com/xjrsoft/module/xycxedu/controller/ExamSubjectScoreController.java

@@ -0,0 +1,44 @@
+package com.xjrsoft.module.xycxedu.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.xycxedu.dto.ExamSubjectScoreDto;
+import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
+import com.xjrsoft.module.xycxedu.vo.ExamSubjectScorePageVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+* @title: 考试计划维护
+* @Author dzx
+* @Date: 2024-07-18
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/xycxedu" + "/ExamSubjectScore")
+@Api(value = "/xycxedu"  + "/ExamSubjectScore",tags = "成绩查询代码")
+@AllArgsConstructor
+public class ExamSubjectScoreController {
+
+
+    private final IExamSubjectScoreService scoreService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="考试成绩查询(分页)")
+    @SaCheckPermission("examplan:detail")
+    public RT<PageOutput<ExamSubjectScorePageVo>> page(@Valid ExamSubjectScoreDto dto){
+        Page<ExamSubjectScorePageVo> page = scoreService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<ExamSubjectScorePageVo> pageOutput = ConventPage.getPageOutput(page, ExamSubjectScorePageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+}

+ 27 - 0
src/main/java/com/xjrsoft/module/xycxedu/dto/ExamSubjectScoreDto.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.xycxedu.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class ExamSubjectScoreDto extends PageInput {
+    private static final long serialVersionUID = 1L;
+    /**
+     * 用户ID(xjr_user)
+     */
+    @ApiModelProperty("用户id")
+    private Long userId;
+    /**
+     * 学号
+     */
+    @ApiModelProperty("学期id")
+    private Long semesterId;
+
+    @ApiModelProperty("考试计划id")
+    private Long examPlanId;
+}

+ 5 - 0
src/main/java/com/xjrsoft/module/xycxedu/mapper/ExamSubjectScoreMappper.java

@@ -1,7 +1,10 @@
 package com.xjrsoft.module.xycxedu.mapper;
 package com.xjrsoft.module.xycxedu.mapper;
 
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.xycxedu.dto.ExamSubjectScoreDto;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
+import com.xjrsoft.module.xycxedu.vo.ExamSubjectScorePageVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
@@ -15,4 +18,6 @@ import org.apache.ibatis.annotations.Param;
 public interface ExamSubjectScoreMappper extends MPJBaseMapper<ExamSubjectScore> {
 public interface ExamSubjectScoreMappper extends MPJBaseMapper<ExamSubjectScore> {
 
 
     Long getUserIdByIdNumber(@Param("idNumber") String idNumber);
     Long getUserIdByIdNumber(@Param("idNumber") String idNumber);
+
+    Page<ExamSubjectScorePageVo> getPage(Page<ExamSubjectScorePageVo> page, @Param("dto") ExamSubjectScoreDto dto);
 }
 }

+ 7 - 0
src/main/java/com/xjrsoft/module/xycxedu/service/IExamSubjectScoreService.java

@@ -1,7 +1,12 @@
 package com.xjrsoft.module.xycxedu.service;
 package com.xjrsoft.module.xycxedu.service;
 
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.room.dto.RoomPageDto;
+import com.xjrsoft.module.room.vo.RoomPageVo;
+import com.xjrsoft.module.xycxedu.dto.ExamSubjectScoreDto;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
+import com.xjrsoft.module.xycxedu.vo.ExamSubjectScorePageVo;
 
 
 /**
 /**
  * @title: 晓羊策学考试计划表
  * @title: 晓羊策学考试计划表
@@ -13,4 +18,6 @@ import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
 public interface IExamSubjectScoreService extends MPJBaseService<ExamSubjectScore> {
 public interface IExamSubjectScoreService extends MPJBaseService<ExamSubjectScore> {
 
 
     Long getUserIdByIdNumber(String idNumber);
     Long getUserIdByIdNumber(String idNumber);
+
+    Page<ExamSubjectScorePageVo> getPage(Page<ExamSubjectScorePageVo> page, ExamSubjectScoreDto dto);
 }
 }

+ 9 - 1
src/main/java/com/xjrsoft/module/xycxedu/service/impl/ExamSubjectScoreServiceImpl.java

@@ -1,9 +1,12 @@
 package com.xjrsoft.module.xycxedu.service.impl;
 package com.xjrsoft.module.xycxedu.service.impl;
 
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.xycxedu.dto.ExamSubjectScoreDto;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
 import com.xjrsoft.module.xycxedu.mapper.ExamSubjectScoreMappper;
 import com.xjrsoft.module.xycxedu.mapper.ExamSubjectScoreMappper;
 import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
 import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
+import com.xjrsoft.module.xycxedu.vo.ExamSubjectScorePageVo;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
@@ -18,6 +21,11 @@ import org.springframework.stereotype.Service;
 public class ExamSubjectScoreServiceImpl extends MPJBaseServiceImpl<ExamSubjectScoreMappper, ExamSubjectScore> implements IExamSubjectScoreService {
 public class ExamSubjectScoreServiceImpl extends MPJBaseServiceImpl<ExamSubjectScoreMappper, ExamSubjectScore> implements IExamSubjectScoreService {
     @Override
     @Override
     public Long getUserIdByIdNumber(String idNumber) {
     public Long getUserIdByIdNumber(String idNumber) {
-        return this.getUserIdByIdNumber(idNumber);
+        return this.baseMapper.getUserIdByIdNumber(idNumber);
+    }
+
+    @Override
+    public Page<ExamSubjectScorePageVo> getPage(Page<ExamSubjectScorePageVo> page, ExamSubjectScoreDto dto) {
+        return this.baseMapper.getPage(page, dto);
     }
     }
 }
 }

+ 9 - 0
src/main/java/com/xjrsoft/module/xycxedu/util/ApiUtil.java

@@ -25,6 +25,9 @@ public class ApiUtil {
         String result = HttpUtil.get(url);
         String result = HttpUtil.get(url);
         JsonParser parser = new JsonParser();
         JsonParser parser = new JsonParser();
         JsonObject asJsonObject = parser.parse(result).getAsJsonObject();
         JsonObject asJsonObject = parser.parse(result).getAsJsonObject();
+        if(asJsonObject.get("data").isJsonNull()){
+            return new JsonArray();
+        }
         JsonArray jsonArray = asJsonObject.get("data").getAsJsonArray();
         JsonArray jsonArray = asJsonObject.get("data").getAsJsonArray();
         return jsonArray;
         return jsonArray;
     }
     }
@@ -35,6 +38,9 @@ public class ApiUtil {
         String result = HttpUtil.get(url);
         String result = HttpUtil.get(url);
         JsonParser parser = new JsonParser();
         JsonParser parser = new JsonParser();
         JsonObject asJsonObject = parser.parse(result).getAsJsonObject();
         JsonObject asJsonObject = parser.parse(result).getAsJsonObject();
+        if(asJsonObject.get("data").isJsonNull()){
+            return new JsonArray();
+        }
         JsonArray jsonArray = asJsonObject.get("data").getAsJsonArray();
         JsonArray jsonArray = asJsonObject.get("data").getAsJsonArray();
         return jsonArray;
         return jsonArray;
     }
     }
@@ -50,6 +56,9 @@ public class ApiUtil {
         String result = HttpUtil.get(url);
         String result = HttpUtil.get(url);
         JsonParser parser = new JsonParser();
         JsonParser parser = new JsonParser();
         JsonObject asJsonObject = parser.parse(result).getAsJsonObject();
         JsonObject asJsonObject = parser.parse(result).getAsJsonObject();
+        if(asJsonObject.get("data").isJsonNull()){
+            return new JsonArray();
+        }
         JsonArray jsonArray = asJsonObject.get("data").getAsJsonArray();
         JsonArray jsonArray = asJsonObject.get("data").getAsJsonArray();
         return jsonArray;
         return jsonArray;
     }
     }

+ 18 - 6
src/main/java/com/xjrsoft/module/xycxedu/util/DataUtil.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonObject;
+import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.module.base.entity.BaseCourseSubject;
 import com.xjrsoft.module.base.entity.BaseCourseSubject;
 import com.xjrsoft.module.base.service.IBaseCourseSubjectService;
 import com.xjrsoft.module.base.service.IBaseCourseSubjectService;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
 import com.xjrsoft.module.xycxedu.entity.ExamSubjectScore;
@@ -13,6 +14,8 @@ import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
 import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
 import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
 import com.yomahub.liteflow.util.JsonUtil;
 import com.yomahub.liteflow.util.JsonUtil;
 
 
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
@@ -35,8 +38,15 @@ public class DataUtil {
         List<XycxeduExamList> updateList = new ArrayList<>();
         List<XycxeduExamList> updateList = new ArrayList<>();
         List<XycxeduExamList> insertList = new ArrayList<>();
         List<XycxeduExamList> insertList = new ArrayList<>();
         Date date = new Date();
         Date date = new Date();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         for (JsonElement jsonElement : examList) {
         for (JsonElement jsonElement : examList) {
-            XycxeduExamList parseObject = JsonUtil.parseObject(jsonElement.toString(), XycxeduExamList.class);
+            XycxeduExamList parseObject = new XycxeduExamList();
+            JsonObject object = jsonElement.getAsJsonObject();
+            parseObject.setMilexamname(object.get("milexamname").getAsString());
+            parseObject.setMilexamid(object.get("milexamid").getAsLong());
+            parseObject.setRegyear(object.get("regyear").getAsInt());
+            parseObject.setGrade(object.get("grade").getAsString());
+            parseObject.setSdate(LocalDate.parse(object.get("sdate").getAsString(), formatter));
             XycxeduExamList oldData = examListService.getOne(
             XycxeduExamList oldData = examListService.getOne(
                     new QueryWrapper<XycxeduExamList>().lambda()
                     new QueryWrapper<XycxeduExamList>().lambda()
                             .eq(XycxeduExamList::getMilexamid, parseObject.getMilexamid())
                             .eq(XycxeduExamList::getMilexamid, parseObject.getMilexamid())
@@ -75,14 +85,16 @@ public class DataUtil {
                 examidXCoursenameMap.put(courseObj.get("examid").getAsInt(), courseObj.get("coursename").getAsString());
                 examidXCoursenameMap.put(courseObj.get("examid").getAsInt(), courseObj.get("coursename").getAsString());
             }
             }
         }
         }
-        Map<String, Long> courseMap = courseService.list().stream().collect(
+        Map<String, Long> courseMap = courseService.list(
+                new QueryWrapper<BaseCourseSubject>().lambda().eq(BaseCourseSubject::getDeleteMark, DeleteMark.NODELETE.getCode())
+        ).stream().collect(
                 Collectors.toMap(BaseCourseSubject::getName, BaseCourseSubject::getId)
                 Collectors.toMap(BaseCourseSubject::getName, BaseCourseSubject::getId)
         );
         );
 
 
-        List<ExamSubjectScore> insertList = new ArrayList<>();
         Date date = new Date();
         Date date = new Date();
         // 查询每次考试每个科目的学生的成绩
         // 查询每次考试每个科目的学生的成绩
         for (Integer examid : examidXMilexamidMap.keySet()) {
         for (Integer examid : examidXMilexamidMap.keySet()) {
+            List<ExamSubjectScore> insertList = new ArrayList<>();
             JsonArray jsonArray = ApiUtil.getStudentScoreByCourse(examid);
             JsonArray jsonArray = ApiUtil.getStudentScoreByCourse(examid);
             for (JsonElement jsonElement : jsonArray) {
             for (JsonElement jsonElement : jsonArray) {
                 JsonObject scoreObj = jsonElement.getAsJsonObject();
                 JsonObject scoreObj = jsonElement.getAsJsonObject();
@@ -108,9 +120,9 @@ public class DataUtil {
                 }};
                 }};
                 insertList.add(score);
                 insertList.add(score);
             }
             }
-        }
-        if(!insertList.isEmpty()){
-            scoreService.saveBatch(insertList);
+            if(!insertList.isEmpty()){
+                scoreService.saveBatch(insertList);
+            }
         }
         }
     }
     }
 }
 }

+ 36 - 0
src/main/java/com/xjrsoft/module/xycxedu/vo/ExamSubjectScorePageVo.java

@@ -0,0 +1,36 @@
+package com.xjrsoft.module.xycxedu.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 考试计划维护表单出参
+* @Author dzx
+* @Date: 2024-07-18
+* @Version 1.0
+*/
+@Data
+public class ExamSubjectScorePageVo {
+
+    /**
+    * 考试计划名称
+    */
+    @ApiModelProperty("学期名称")
+    private String semesterName;
+    /**
+    * 晓羊策学考试计划id
+    */
+    @ApiModelProperty("考试名称")
+    private String milexamname;
+
+    @ApiModelProperty("科目")
+    private String coursename;
+
+    @ApiModelProperty("成绩")
+    private Integer score;
+
+    @ApiModelProperty("年级排名")
+    private Integer gradeRanking;
+
+
+}

+ 27 - 0
src/main/java/com/xjrsoft/module/xycxedu/vo/XycxeduExamListVo.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.xycxedu.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 考试计划维护表单出参
+* @Author dzx
+* @Date: 2024-07-18
+* @Version 1.0
+*/
+@Data
+public class XycxeduExamListVo {
+
+    /**
+    * 考试计划名称
+    */
+    @ApiModelProperty("考试计划名称")
+    private String milexamname;
+    /**
+    * 晓羊策学考试计划id
+    */
+    @ApiModelProperty("晓羊策学考试计划id")
+    private Long milexamid;
+
+
+}

+ 18 - 2
src/main/resources/mapper/xycxedu/ExamSubjectScoreMappper.xml

@@ -3,7 +3,23 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.xycxedu.mapper.ExamSubjectScoreMappper">
 <mapper namespace="com.xjrsoft.module.xycxedu.mapper.ExamSubjectScoreMappper">
-    <select id="getUserIdByIdNumber" resultType="java.lang.Long">
-        SELECT id FROM xjr_user WHERE credential_number = #{idNumber}
+    <select id="getUserIdByIdNumber" parameterType="java.lang.String" resultType="java.lang.Long">
+        SELECT t1.id FROM xjr_user t1
+        INNER JOIN base_student t2 ON t1.id = t2.user_id
+        WHERE t1.credential_number = #{idNumber}
+    </select>
+
+    <select id="getPage" parameterType="com.xjrsoft.module.xycxedu.dto.ExamSubjectScoreDto" resultType="com.xjrsoft.module.xycxedu.vo.ExamSubjectScorePageVo">
+        SELECT t4.name AS semester_name,t2.milexamname,t1.coursename,t1.score,t1.grade_ranking FROM exam_subject_score t1
+        INNER JOIN xycxedu_exam_list t2 ON t1.milexamid = t2.milexamid
+        LEFT JOIN exam_plan t3 ON t3.milexamids LIKE CONCAT('%', t1.milexamid, '%')
+        LEFT JOIN base_semester t4 ON t3.semester_id = t4.id
+        WHERE t1.delete_mark = 0 AND t1.user_id = #{dto.userId}
+        <if test="dto.semesterId != null">
+            and t4.id = #{dto.semesterId}
+        </if>
+        <if test="dto.semesterId != null">
+            and t3.id = #{dto.examPlanId}
+        </if>
     </select>
     </select>
 </mapper>
 </mapper>

+ 208 - 118
src/main/resources/sqlScript/20240718_sql.sql

@@ -2,55 +2,55 @@
 DROP TABLE IF EXISTS `party_cadre_study`;
 DROP TABLE IF EXISTS `party_cadre_study`;
 CREATE TABLE `party_cadre_study`
 CREATE TABLE `party_cadre_study`
 (
 (
-    id                        bigint       not null comment '主键编号'
-        primary key,
-    create_user_id            bigint       null comment '创建人',
-    create_date               datetime     null comment '创建时间',
-    modify_user_id            bigint       null comment '修改人',
-    modify_date               datetime     null comment '修改时间',
-    delete_mark               int          not null comment '删除标记',
-    enabled_mark              int          not null comment '有效标志',
-    sort_code                 int          null comment '序号',
-
-    party_tissue_id           bigint       not null comment '党组织主键id(party_tissue_manager)',
-    party_tissue_name         varchar(256) not null comment '党组织名称',
-    party_tissue_code         varchar(256) not null comment '党组织编号',
-
-    party_train_way_carrier   varchar(500) not null comment '党员干部学习培训主要途径和载体',
-    party_train_way_content   varchar(500) not null comment '党员干部学习培训内容',
-
-    start_time                date         not null comment '活动开始日期',
-    end_time                  date         not null comment '活动结束日期',
-
-    participate_teacher_count int          null comment '参与教师数',
-    participate_student_count int          null comment '参与学生数'
-) ENGINE = InnoDB
+    id                        BIGINT       NOT NULL COMMENT '主键编号'
+        PRIMARY KEY,
+    create_user_id            BIGINT       NULL COMMENT '创建人',
+    create_date               DATETIME     NULL COMMENT '创建时间',
+    modify_user_id            BIGINT       NULL COMMENT '修改人',
+    modify_date               DATETIME     NULL COMMENT '修改时间',
+    delete_mark               INT          NOT NULL COMMENT '删除标记',
+    enabled_mark              INT          NOT NULL COMMENT '有效标志',
+    sort_code                 INT          NULL COMMENT '序号',
+
+    party_tissue_id           BIGINT       NOT NULL COMMENT '党组织主键id(party_tissue_manager)',
+    party_tissue_name         VARCHAR(256) NOT NULL COMMENT '党组织名称',
+    party_tissue_code         VARCHAR(256) NOT NULL COMMENT '党组织编号',
+
+    party_train_way_carrier   VARCHAR(500) NOT NULL COMMENT '党员干部学习培训主要途径和载体',
+    party_train_way_content   VARCHAR(500) NOT NULL COMMENT '党员干部学习培训内容',
+
+    start_time                DATE         NOT NULL COMMENT '活动开始日期',
+    end_time                  DATE         NOT NULL COMMENT '活动结束日期',
+
+    participate_teacher_count INT          NULL COMMENT '参与教师数',
+    participate_student_count INT          NULL COMMENT '参与学生数'
+) ENGINE = INNODB
   DEFAULT CHARSET = utf8mb4
   DEFAULT CHARSET = utf8mb4
-    comment '党员干部学习';
+    COMMENT '党员干部学习';
 
 
 -- 党员干部学习活动参与人
 -- 党员干部学习活动参与人
 DROP TABLE IF EXISTS `party_cadre_study_participant`;
 DROP TABLE IF EXISTS `party_cadre_study_participant`;
 CREATE TABLE `party_cadre_study_participant`
 CREATE TABLE `party_cadre_study_participant`
 (
 (
-    id                   bigint       not null comment '主键编号'
-        primary key,
-    create_user_id       bigint       null comment '创建人',
-    create_date          datetime     null comment '创建时间',
-    modify_user_id       bigint       null comment '修改人',
-    modify_date          datetime     null comment '修改时间',
-    delete_mark          int          not null comment '删除标记',
-    enabled_mark         int          not null comment '有效标志',
-    sort_code            int          null comment '序号',
-
-    party_cadre_study_id bigint       null comment '党员干部学习主键id(party_cadre_study)',
-    participant_id       bigint       null comment '活动参与人id',
-    participant_remark   varchar(256) null comment '活动参与人类型',
-    participant_username varchar(256) null comment '活动参与人oa',
-    participant_user_id  varchar(256) null comment '活动参与人学号,工号',
-    participant_name     varchar(256) null comment '活动参与人姓名'
-) ENGINE = InnoDB
+    id                   BIGINT       NOT NULL COMMENT '主键编号'
+        PRIMARY KEY,
+    create_user_id       BIGINT       NULL COMMENT '创建人',
+    create_date          DATETIME     NULL COMMENT '创建时间',
+    modify_user_id       BIGINT       NULL COMMENT '修改人',
+    modify_date          DATETIME     NULL COMMENT '修改时间',
+    delete_mark          INT          NOT NULL COMMENT '删除标记',
+    enabled_mark         INT          NOT NULL COMMENT '有效标志',
+    sort_code            INT          NULL COMMENT '序号',
+
+    party_cadre_study_id BIGINT       NULL COMMENT '党员干部学习主键id(party_cadre_study)',
+    participant_id       BIGINT       NULL COMMENT '活动参与人id',
+    participant_remark   VARCHAR(256) NULL COMMENT '活动参与人类型',
+    participant_username VARCHAR(256) NULL COMMENT '活动参与人oa',
+    participant_user_id  VARCHAR(256) NULL COMMENT '活动参与人学号,工号',
+    participant_name     VARCHAR(256) NULL COMMENT '活动参与人姓名'
+) ENGINE = INNODB
   DEFAULT CHARSET = utf8mb4
   DEFAULT CHARSET = utf8mb4
-    comment '党员干部学习活动参与人';
+    COMMENT '党员干部学习活动参与人';
 
 
 # 数据字典
 # 数据字典
 # par_part 党员干部学习培训内容
 # par_part 党员干部学习培训内容
@@ -85,31 +85,31 @@ CREATE TABLE `party_cadre_study_participant`
 DROP TABLE IF EXISTS party_class_manage;
 DROP TABLE IF EXISTS party_class_manage;
 CREATE TABLE party_class_manage
 CREATE TABLE party_class_manage
 (
 (
-    id                        bigint       not null comment '主键编号' primary key,
-    create_user_id            bigint       null comment '创建人',
-    create_date               datetime     null comment '创建时间',
-    modify_user_id            bigint       null comment '修改人',
-    modify_date               datetime     null comment '修改时间',
-    delete_mark               int          not null comment '删除标记',
-    enabled_mark              int          not null comment '有效标志',
-    sort_code                 int          null comment '序号',
+    id                        BIGINT       NOT NULL COMMENT '主键编号' PRIMARY KEY,
+    create_user_id            BIGINT       NULL COMMENT '创建人',
+    create_date               DATETIME     NULL COMMENT '创建时间',
+    modify_user_id            BIGINT       NULL COMMENT '修改人',
+    modify_date               DATETIME     NULL COMMENT '修改时间',
+    delete_mark               INT          NOT NULL COMMENT '删除标记',
+    enabled_mark              INT          NOT NULL COMMENT '有效标志',
+    sort_code                 INT          NULL COMMENT '序号',
 
 
-    party_tissue_name         varchar(256) not null comment '党组织名称',
-    party_tissue_code         varchar(256) not null comment '党组织编号',
-    party_tissue_id           bigint       not null comment '党组织主键id(party_tissue_manager)',
+    party_tissue_name         VARCHAR(256) NOT NULL COMMENT '党组织名称',
+    party_tissue_code         VARCHAR(256) NOT NULL COMMENT '党组织编号',
+    party_tissue_id           BIGINT       NOT NULL COMMENT '党组织主键id(party_tissue_manager)',
 
 
-    activity_type             varchar(256) not null comment '活动形式',
-    speaker_name              varchar(256) null comment '党课主讲人',
+    activity_type             VARCHAR(256) NOT NULL COMMENT '活动形式',
+    speaker_name              VARCHAR(256) NULL COMMENT '党课主讲人',
 
 
-    start_time                date         not null comment '活动开始时间',
-    end_time                  date         not null comment '活动结束时间',
+    start_time                DATE         NOT NULL COMMENT '活动开始时间',
+    end_time                  DATE         NOT NULL COMMENT '活动结束时间',
 
 
-    activities_content        text         NULL COMMENT '活动内容',
+    activities_content        TEXT         NULL COMMENT '活动内容',
 
 
-    participate_teacher_count int          null comment '参与教师数',
-    participate_student_count int          null comment '参与学生数'
+    participate_teacher_count INT          NULL COMMENT '参与教师数',
+    participate_student_count INT          NULL COMMENT '参与学生数'
 
 
-) ENGINE = InnoDB
+) ENGINE = INNODB
   DEFAULT CHARSET = utf8mb4
   DEFAULT CHARSET = utf8mb4
     COMMENT ='党课管理数据表';
     COMMENT ='党课管理数据表';
 
 
@@ -117,24 +117,24 @@ CREATE TABLE party_class_manage
 DROP TABLE IF EXISTS party_class_manage_participant;
 DROP TABLE IF EXISTS party_class_manage_participant;
 CREATE TABLE party_class_manage_participant
 CREATE TABLE party_class_manage_participant
 (
 (
-    id                    bigint       not null comment '主键编号' primary key,
-    create_user_id        bigint       null comment '创建人',
-    create_date           datetime     null comment '创建时间',
-    modify_user_id        bigint       null comment '修改人',
-    modify_date           datetime     null comment '修改时间',
-    delete_mark           int          not null comment '删除标记',
-    enabled_mark          int          not null comment '有效标志',
-    sort_code             int          null comment '序号',
-
-    party_class_manage_id bigint       not null comment '党课管理id',
-
-    participant_id        bigint       null comment '活动参与人id',
-    participant_remark    varchar(256) null comment '活动参与人类型',
-    participant_username  varchar(256) null comment '活动参与人oa',
-    participant_user_id   varchar(256) null comment '活动参与人学号,工号',
-    participant_name      varchar(256) null comment '活动参与人姓名'
-
-) ENGINE = InnoDB
+    id                    BIGINT       NOT NULL COMMENT '主键编号' PRIMARY KEY,
+    create_user_id        BIGINT       NULL COMMENT '创建人',
+    create_date           DATETIME     NULL COMMENT '创建时间',
+    modify_user_id        BIGINT       NULL COMMENT '修改人',
+    modify_date           DATETIME     NULL COMMENT '修改时间',
+    delete_mark           INT          NOT NULL COMMENT '删除标记',
+    enabled_mark          INT          NOT NULL COMMENT '有效标志',
+    sort_code             INT          NULL COMMENT '序号',
+
+    party_class_manage_id BIGINT       NOT NULL COMMENT '党课管理id',
+
+    participant_id        BIGINT       NULL COMMENT '活动参与人id',
+    participant_remark    VARCHAR(256) NULL COMMENT '活动参与人类型',
+    participant_username  VARCHAR(256) NULL COMMENT '活动参与人oa',
+    participant_user_id   VARCHAR(256) NULL COMMENT '活动参与人学号,工号',
+    participant_name      VARCHAR(256) NULL COMMENT '活动参与人姓名'
+
+) ENGINE = INNODB
   DEFAULT CHARSET = utf8mb4
   DEFAULT CHARSET = utf8mb4
     COMMENT ='党课活动参与人表';
     COMMENT ='党课活动参与人表';
 
 
@@ -142,27 +142,27 @@ CREATE TABLE party_class_manage_participant
 DROP TABLE IF EXISTS `party_build_event`;
 DROP TABLE IF EXISTS `party_build_event`;
 CREATE TABLE party_build_event
 CREATE TABLE party_build_event
 (
 (
-    id                 bigint       not null comment '主键编号'
-        primary key,
-    create_user_id     bigint       null comment '创建人',
-    create_date        datetime     null comment '创建时间',
-    modify_user_id     bigint       null comment '修改人',
-    modify_date        datetime     null comment '修改时间',
-    delete_mark        int          not null comment '删除标记',
-    enabled_mark       int          not null comment '有效标志',
-    sort_code          int          null comment '序号',
-
-    event_type         varchar(255) not null comment '活动类型',
-    party_tissue_id    bigint       not null comment '党组织主键id(party_tissue_manager)',
-    party_tissue_name  varchar(256) not null comment '党组织名称',
-    party_tissue_code  varchar(256) not null comment '党组织编号',
-    event_address      varchar(255) null comment '活动地点',
-    event_content      text         null comment '活动内容',
-    event_start_time   date         not null comment '活动开始时间',
-    event_end_time     date         not null comment '活动结束时间',
-    attend_teacher_num int          null comment '参于教师数',
-    attend_student_num int          null comment '参于学生数'
-) ENGINE = InnoDB
+    id                 BIGINT       NOT NULL COMMENT '主键编号'
+        PRIMARY KEY,
+    create_user_id     BIGINT       NULL COMMENT '创建人',
+    create_date        DATETIME     NULL COMMENT '创建时间',
+    modify_user_id     BIGINT       NULL COMMENT '修改人',
+    modify_date        DATETIME     NULL COMMENT '修改时间',
+    delete_mark        INT          NOT NULL COMMENT '删除标记',
+    enabled_mark       INT          NOT NULL COMMENT '有效标志',
+    sort_code          INT          NULL COMMENT '序号',
+
+    event_type         VARCHAR(255) NOT NULL COMMENT '活动类型',
+    party_tissue_id    BIGINT       NOT NULL COMMENT '党组织主键id(party_tissue_manager)',
+    party_tissue_name  VARCHAR(256) NOT NULL COMMENT '党组织名称',
+    party_tissue_code  VARCHAR(256) NOT NULL COMMENT '党组织编号',
+    event_address      VARCHAR(255) NULL COMMENT '活动地点',
+    event_content      TEXT         NULL COMMENT '活动内容',
+    event_start_time   DATE         NOT NULL COMMENT '活动开始时间',
+    event_end_time     DATE         NOT NULL COMMENT '活动结束时间',
+    attend_teacher_num INT          NULL COMMENT '参于教师数',
+    attend_student_num INT          NULL COMMENT '参于学生数'
+) ENGINE = INNODB
   DEFAULT CHARSET = utf8mb4
   DEFAULT CHARSET = utf8mb4
     COMMENT ='党建活动';
     COMMENT ='党建活动';
 
 
@@ -170,24 +170,114 @@ CREATE TABLE party_build_event
 DROP TABLE IF EXISTS `party_build_event_participant`;
 DROP TABLE IF EXISTS `party_build_event_participant`;
 CREATE TABLE `party_build_event_participant`
 CREATE TABLE `party_build_event_participant`
 (
 (
-    id                   bigint       not null comment '主键编号'
-        primary key,
-    create_user_id       bigint       null comment '创建人',
-    create_date          datetime     null comment '创建时间',
-    modify_user_id       bigint       null comment '修改人',
-    modify_date          datetime     null comment '修改时间',
-    delete_mark          int          not null comment '删除标记',
-    enabled_mark         int          not null comment '有效标志',
-    sort_code            int          null comment '序号',
-
-    party_build_event_id bigint       null comment '党建活动主键id(party_build_event)',
-    participant_id       bigint       null comment '参与活动人id',
-    participant_remark   varchar(256) null comment '活动参与人类型',
-    participant_username varchar(256) null comment '活动参与人oa',
-    participant_user_id  varchar(256) null comment '活动参与人学号,工号',
-    participant_name     varchar(256) null comment '活动参与人姓名'
-) ENGINE = InnoDB
+    id                   BIGINT       NOT NULL COMMENT '主键编号'
+        PRIMARY KEY,
+    create_user_id       BIGINT       NULL COMMENT '创建人',
+    create_date          DATETIME     NULL COMMENT '创建时间',
+    modify_user_id       BIGINT       NULL COMMENT '修改人',
+    modify_date          DATETIME     NULL COMMENT '修改时间',
+    delete_mark          INT          NOT NULL COMMENT '删除标记',
+    enabled_mark         INT          NOT NULL COMMENT '有效标志',
+    sort_code            INT          NULL COMMENT '序号',
+
+    party_build_event_id BIGINT       NULL COMMENT '党建活动主键id(party_build_event)',
+    participant_id       BIGINT       NULL COMMENT '参与活动人id',
+    participant_remark   VARCHAR(256) NULL COMMENT '活动参与人类型',
+    participant_username VARCHAR(256) NULL COMMENT '活动参与人oa',
+    participant_user_id  VARCHAR(256) NULL COMMENT '活动参与人学号,工号',
+    participant_name     VARCHAR(256) NULL COMMENT '活动参与人姓名'
+) ENGINE = INNODB
   DEFAULT CHARSET = utf8mb4
   DEFAULT CHARSET = utf8mb4
-    comment '党建活动参与人员';
+    COMMENT '党建活动参与人员';
+
+ALTER TABLE `whitelist_management`   
+  CHANGE `phone` `phone` VARCHAR(20) NOT NULL   COMMENT '手机号';
+
+DROP TABLE IF EXISTS patrol_offline_courses;   
+CREATE TABLE `patrol_offline_courses` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATE DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `semester_id` BIGINT DEFAULT NULL COMMENT '学期',
+  `now_date` DATETIME DEFAULT NULL COMMENT '当前日期',
+  `classroom_id` BIGINT DEFAULT NULL COMMENT '教室id',
+  `class_id` BIGINT DEFAULT NULL COMMENT '班级id',
+  `now_course` BIGINT DEFAULT NULL COMMENT '当前课程id',
+  `now_teacher_id` BIGINT DEFAULT NULL COMMENT '当前教师id',
+  `should_arrive_number` INT DEFAULT NULL COMMENT '应到人数',
+  `leave_number` INT DEFAULT NULL COMMENT '请假人数',
+  `actua_arrive_number` INT DEFAULT NULL COMMENT '实到人数',
+  `not_arrived_number` INT DEFAULT NULL COMMENT '未到人数',
+  `attendance_status` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '出勤情况',
+  `to_post_status` VARCHAR(255) DEFAULT NULL COMMENT '到岗情况',
+  `class_interaction` VARCHAR(255) DEFAULT NULL COMMENT '课堂互动情况',
+  `teach_condition` VARCHAR(255) DEFAULT NULL COMMENT '教学条件情况',
+  `class_discipline` VARCHAR(255) DEFAULT NULL COMMENT '上课纪律',
+  `remark` VARCHAR(500) DEFAULT NULL COMMENT '备注',
+  `status` INT DEFAULT NULL COMMENT '流程状态',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='线下巡课表';
+
+-- --------------------------------------------------------------------------------------------
+-- 考试科目成绩表
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS exam_subject_score;   
+CREATE TABLE `exam_subject_score` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATE DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `semester_id` BIGINT DEFAULT NULL COMMENT '学期',
+  `milexamname` VARCHAR(50) DEFAULT NULL COMMENT '考试计划',
+  `milexamid` BIGINT DEFAULT NULL COMMENT '考试计划id',
+  `course_subject_id` BIGINT DEFAULT NULL COMMENT '课程科目id(base_course_subject)',
+  `coursename` VARCHAR(50) DEFAULT NULL COMMENT '课程名称',
+  `score` INT DEFAULT NULL COMMENT '分数',
+  `class_ranking` INT DEFAULT NULL COMMENT '班级排名',
+  `grade_ranking` INT DEFAULT NULL COMMENT '年级排名',
+  `user_id` BIGINT DEFAULT NULL COMMENT '学生id(xjr_user)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='考试科目成绩表';
+
 
 
+-- --------------------------------------------------------------------------------------------
+-- 晓羊策学考试计划表
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS xycxedu_exam_list;   
+CREATE TABLE `xycxedu_exam_list` (
+  `id` BIGINT NOT NULL,
+  `create_date` DATE DEFAULT NULL COMMENT '创建时间',
+  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `milexamid` BIGINT DEFAULT NULL COMMENT '考试计划id',
+  `milexamname` VARCHAR(50) DEFAULT NULL COMMENT '考试计划名称',
+  regyear INT DEFAULT NULL COMMENT '学年',
+  grade VARCHAR(20) DEFAULT NULL COMMENT '年级名称',
+  sdate DATE DEFAULT NULL COMMENT '考试时间',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='晓羊策学考试计划表';
 
 
+-- --------------------------------------------------------------------------------------------
+-- 考试计划维护
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS exam_plan;   
+CREATE TABLE `exam_plan` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATE DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `semester_id` BIGINT DEFAULT NULL COMMENT '学期id',
+  `name` VARCHAR(50) DEFAULT NULL COMMENT '考试计划名称',
+  milexamids TEXT DEFAULT NULL COMMENT '晓羊策学考试计划id',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='考试计划维护';

+ 42 - 0
src/test/java/com/xjrsoft/module/job/ExamScoreDataTaskTest.java

@@ -0,0 +1,42 @@
+package com.xjrsoft.module.job;
+
+import cn.hutool.extra.spring.SpringUtil;
+import com.xjrsoft.module.base.service.IBaseCourseSubjectService;
+import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
+import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
+import com.xjrsoft.module.xycxedu.util.DataUtil;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.scheduling.annotation.Scheduled;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * @author dzx
+ * @date 2024/7/18
+ */
+@SpringBootTest
+class ExamScoreDataTaskTest {
+    @Autowired
+    private IXycxeduExamListService examListService;
+
+    @Autowired
+    private IExamSubjectScoreService scoreService;
+
+    @Autowired
+    private IBaseCourseSubjectService courseService;
+    @Test
+    public void RefreshConnectionPool() {
+        doExecute();
+    }
+
+    void doExecute(){
+        //同步考试计划数据
+        DataUtil dataUtil = new DataUtil();
+        dataUtil.examListData(examListService);
+
+        //同步成绩
+        dataUtil.studentScoreData(examListService, scoreService, courseService);
+    }
+}