dzx 4 mēneši atpakaļ
vecāks
revīzija
9be9d89fc2

+ 14 - 4
src/main/java/com/xjrsoft/module/xycxedu/controller/ExamPlanController.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.xycxedu.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -19,10 +20,10 @@ import com.xjrsoft.module.xycxedu.entity.XycxeduExamList;
 import com.xjrsoft.module.xycxedu.service.IExamPlanService;
 import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
 import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
+import com.xjrsoft.module.xycxedu.vo.ExamPlanListVo;
 import com.xjrsoft.module.xycxedu.vo.ExamPlanPageVo;
 import com.xjrsoft.module.xycxedu.vo.ExamPlanVo;
 import com.xjrsoft.module.xycxedu.vo.ExamStatisticsPageVo;
-import com.xjrsoft.module.xycxedu.vo.ExamSubjectScorePageVo;
 import com.xjrsoft.module.xycxedu.vo.XycxeduExamListVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -64,8 +65,8 @@ public class ExamPlanController {
 
         LambdaQueryWrapper<ExamPlan> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.orderByDesc(ExamPlan::getId)
-                .eq(ExamPlan::getSemesterId, dto.getSemesterId())
-                .like(ExamPlan::getName, dto.getName())
+                .eq(dto.getSemesterId() != null, ExamPlan::getSemesterId, dto.getSemesterId())
+                .like(StrUtil.isNotEmpty(dto.getName()), ExamPlan::getName, dto.getName())
                 .select(ExamPlan.class,x -> VoToColumnUtil.fieldsToColumns(ExamPlanPageVo.class).contains(x.getProperty()));
         IPage<ExamPlan> page = examPlanService.page(ConventPage.getPage(dto), queryWrapper);
         PageOutput<ExamPlanPageVo> pageOutput = ConventPage.getPageOutput(page, ExamPlanPageVo.class);
@@ -118,7 +119,7 @@ public class ExamPlanController {
     }
 
     @GetMapping(value = "/exam-list")
-    @ApiOperation(value="查询所有考试")
+    @ApiOperation(value="查询所有考试记录")
     @SaCheckPermission("examplan:detail")
     public RT<List<XycxeduExamListVo>> allExam(){
         List<XycxeduExamList> list = examListService.list();
@@ -126,6 +127,15 @@ public class ExamPlanController {
         return RT.ok(listVos);
     }
 
+    @GetMapping(value = "/plan-list")
+    @ApiOperation(value="查询所有考试计划")
+    @SaCheckPermission("examplan:detail")
+    public RT<List<ExamPlanListVo>> allPlan(){
+        List<ExamPlan> list = examPlanService.list();
+        List<ExamPlanListVo> listVos = BeanUtil.copyToList(list, ExamPlanListVo.class);
+        return RT.ok(listVos);
+    }
+
     @GetMapping(value = "/exam-statistics")
     @ApiOperation(value="考试记录(分页)")
     @SaCheckPermission("examplan:detail")

+ 5 - 4
src/main/java/com/xjrsoft/module/xycxedu/dto/ExamStatisticsPageDto.java

@@ -1,12 +1,11 @@
 package com.xjrsoft.module.xycxedu.dto;
 
+import com.alibaba.excel.annotation.write.style.ContentStyle;
 import com.xjrsoft.common.page.PageInput;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import java.time.LocalDate;
-
 @Data
 @EqualsAndHashCode(callSuper = false)
 public class ExamStatisticsPageDto extends PageInput {
@@ -22,9 +21,11 @@ public class ExamStatisticsPageDto extends PageInput {
     @ApiModelProperty("学期id")
     private Long semesterId;
 
+    @ContentStyle(dataFormat = 49)
     @ApiModelProperty("开始时间")
-    private LocalDate startDate;
+    private String startDate;
 
+    @ContentStyle(dataFormat = 49)
     @ApiModelProperty("结束时间")
-    private LocalDate endDate;
+    private String endDate;
 }

+ 12 - 0
src/main/java/com/xjrsoft/module/xycxedu/entity/XycxeduExamList.java

@@ -3,6 +3,7 @@ package com.xjrsoft.module.xycxedu.entity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -40,6 +41,17 @@ public class XycxeduExamList implements Serializable {
     @ApiModelProperty("修改时间")
     @TableField(fill = FieldFill.UPDATE)
     private Date modifyDate;
+
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+     * 有效标志
+     */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
     /**
     * 表名
     */

+ 26 - 0
src/main/java/com/xjrsoft/module/xycxedu/vo/ExamPlanListVo.java

@@ -0,0 +1,26 @@
+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 ExamPlanListVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 学期id
+    */
+    @ApiModelProperty("考试计划名称")
+    private String name;
+
+}

+ 29 - 6
src/main/resources/sqlScript/20240718_sql.sql

@@ -229,9 +229,9 @@ 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 '创建时间',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
   `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
-  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
   `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
   `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
   `semester_id` BIGINT DEFAULT NULL COMMENT '学期',
@@ -253,8 +253,8 @@ CREATE TABLE `exam_subject_score` (
 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 '修改日期',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
   `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
   `milexamid` BIGINT DEFAULT NULL COMMENT '考试计划id',
   `milexamname` VARCHAR(50) DEFAULT NULL COMMENT '考试计划名称',
@@ -271,9 +271,9 @@ 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 '创建时间',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
   `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
-  `modify_date` DATE DEFAULT NULL COMMENT '修改日期',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
   `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
   `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
   `semester_id` BIGINT DEFAULT NULL COMMENT '学期id',
@@ -281,3 +281,26 @@ CREATE TABLE `exam_plan` (
   milexamids TEXT DEFAULT NULL COMMENT '晓羊策学考试计划id',
   PRIMARY KEY (`id`)
 ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='考试计划维护';
+
+
+-- --------------------------------------------------------------------------------------------
+-- 赛事活动
+-- --------------------------------------------------------------------------------------------
+DROP TABLE IF EXISTS match_activity;   
+CREATE TABLE `match_activity` (
+  `id` BIGINT NOT NULL,
+  `create_user_id` BIGINT DEFAULT NULL COMMENT '创建人',
+  `create_date` DATETIME DEFAULT NULL COMMENT '创建时间',
+  `modify_user_id` BIGINT DEFAULT NULL COMMENT '修改人',
+  `modify_date` DATETIME DEFAULT NULL COMMENT '修改日期',
+  `delete_mark` INT DEFAULT NULL COMMENT '删除标记',
+  `enabled_mark` INT DEFAULT NULL COMMENT '有效标记',
+  `name` VARCHAR(50) DEFAULT NULL COMMENT '赛事名称',
+  place VARCHAR(50) DEFAULT NULL COMMENT '活动地点',
+  start_date DATETIME DEFAULT NULL COMMENT '开始时间',
+  end_date DATETIME DEFAULT NULL COMMENT '结束时间',
+  TYPE VARCHAR(50) DEFAULT NULL COMMENT '活动类型',
+  org_id BIGINT DEFAULT NULL COMMENT '组织部门(xjr_department)',
+  STATUS INT DEFAULT 0 COMMENT '状态(0:未发布 1:已发布)',
+  PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='赛事活动';