deason 1 tahun lalu
induk
melakukan
de7ffa2e4f

+ 14 - 0
src/main/java/com/qmth/exam/reserve/bean/RichTextBean.java

@@ -0,0 +1,14 @@
+package com.qmth.exam.reserve.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class RichTextBean {
+
+    @ApiModelProperty(value = "HTML内容")
+    private String content;
+
+}

+ 19 - 0
src/main/java/com/qmth/exam/reserve/bean/apply/ApplyTimePeriodResult.java

@@ -0,0 +1,19 @@
+package com.qmth.exam.reserve.bean.apply;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Getter
+@Setter
+public class ApplyTimePeriodResult {
+
+    @ApiModelProperty(value = "剩余预约时段数量")
+    private Integer unApplyNumber;
+
+    @ApiModelProperty(value = "时段列表")
+    private List<TimePeriodInfo> periodList;
+
+}

+ 50 - 0
src/main/java/com/qmth/exam/reserve/bean/apply/TicketInfo.java

@@ -0,0 +1,50 @@
+package com.qmth.exam.reserve.bean.apply;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class TicketInfo {
+
+    @ApiModelProperty(value = "预约ID")
+    private Long applyId;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "考生学号")
+    private String studentCode;
+
+    @ApiModelProperty(value = "考生证件号")
+    private String identityNumber;
+
+    @ApiModelProperty(value = "考生头像相对路径")
+    private String photoPath;
+
+    @ApiModelProperty(value = "性别")
+    private String gender;
+
+    @ApiModelProperty(value = "考试开始时间")
+    private Long timePeriodStart;
+
+    @ApiModelProperty(value = "考试结束时间")
+    private Long timePeriodEnd;
+
+    @ApiModelProperty(value = "考场代码")
+    private String examRoomCode;
+
+    @ApiModelProperty(value = "考场地址")
+    private String examRoomAddress;
+
+    @ApiModelProperty(value = "座位号")
+    private String seatNumber;
+
+    @ApiModelProperty(value = "准考证号码")
+    private String ticketNumber;
+
+    @ApiModelProperty(value = "准考证标题")
+    private String ticketTitle;
+
+}

+ 26 - 0
src/main/java/com/qmth/exam/reserve/bean/apply/TimePeriodInfo.java

@@ -0,0 +1,26 @@
+package com.qmth.exam.reserve.bean.apply;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class TimePeriodInfo {
+
+    @ApiModelProperty(value = "预约时段ID")
+    private Long timePeriodId;
+
+    @ApiModelProperty(value = "预约时段开始")
+    private Long timePeriodStart;
+
+    @ApiModelProperty(value = "预约时段结束")
+    private Long timePeriodEnd;
+
+    @ApiModelProperty(value = "剩余可约数量")
+    private Integer availableCount;
+
+    @ApiModelProperty(value = "状态")
+    private String status;
+
+}

+ 28 - 0
src/main/java/com/qmth/exam/reserve/bean/category/CategoryInfo.java

@@ -0,0 +1,28 @@
+package com.qmth.exam.reserve.bean.category;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+@Getter
+@Setter
+public class CategoryInfo {
+
+    @ApiModelProperty(value = "父级ID")
+    private Long parentId;
+
+    @ApiModelProperty(value = "分类ID")
+    private Long id;
+
+    @ApiModelProperty(value = "分类名称")
+    private String name;
+
+    @ApiModelProperty(value = "分类层级")
+    private Integer level;
+
+    @ApiModelProperty(value = "子级列表")
+    private List<CategoryInfo> subNodes;
+
+}

+ 15 - 0
src/main/java/com/qmth/exam/reserve/controller/student/CategoryController.java

@@ -2,13 +2,21 @@ package com.qmth.exam.reserve.controller.student;
 
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.exam.reserve.bean.category.CategoryInfo;
 import com.qmth.exam.reserve.controller.BaseController;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.ArrayList;
+import java.util.List;
+
 @RestController
 @Api(tags = "数据分类相关接口")
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/student/category")
@@ -17,4 +25,11 @@ public class CategoryController extends BaseController {
 
     private static final Logger log = LoggerFactory.getLogger(CategoryController.class);
 
+    @ApiOperation(value = "获取数据分类列表(树结构)")
+    @PostMapping(value = "/list")
+    public List<CategoryInfo> list(@ApiParam("父级ID") @RequestParam Long parentId) {
+        //todo
+        return new ArrayList<>();
+    }
+
 }

+ 45 - 0
src/main/java/com/qmth/exam/reserve/controller/student/StudentApplyController.java

@@ -2,6 +2,9 @@ package com.qmth.exam.reserve.controller.student;
 
 import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.exam.reserve.bean.RichTextBean;
+import com.qmth.exam.reserve.bean.apply.ApplyTimePeriodResult;
+import com.qmth.exam.reserve.bean.apply.TicketInfo;
 import com.qmth.exam.reserve.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -13,6 +16,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.ArrayList;
+import java.util.List;
+
 @RestController
 @Api(tags = "考生预约相关接口")
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/student")
@@ -34,4 +40,43 @@ public class StudentApplyController extends BaseController {
         //todo
     }
 
+    @ApiOperation(value = "获取考生预约-电子准考证")
+    @PostMapping(value = "/apply/ticket")
+    public TicketInfo ticket(@ApiParam("预约ID") @RequestParam Long applyId) {
+        //todo
+        return new TicketInfo();
+    }
+
+    @ApiOperation(value = "获取考试须知")
+    @PostMapping(value = "/exam/notice")
+    public RichTextBean examNotice(@ApiParam("预约ID") @RequestParam Long applyId) {
+        //todo
+        return new RichTextBean();
+    }
+
+    @ApiOperation(value = "获取考场引导")
+    @PostMapping(value = "/exam/room/guide")
+    public RichTextBean examRoomGuide(@ApiParam("预约ID") @RequestParam Long applyId) {
+        //todo
+        return new RichTextBean();
+    }
+
+    @ApiOperation(value = "获取可预约的“日期”列表")
+    @PostMapping(value = "/apply/date/list")
+    public List<String> dateList() {
+        List<String> dateList = new ArrayList<>();
+        dateList.add("20240401");
+        //todo
+        return dateList;
+    }
+
+    @ApiOperation(value = "获取可预约的“时段”列表")
+    @PostMapping(value = "/apply/time/period/list")
+    public ApplyTimePeriodResult timePeriodList(@ApiParam("考点ID") @RequestParam Long examSiteId,
+                                                @ApiParam("预约日期:yyyyMMdd") @RequestParam String date) {
+        ApplyTimePeriodResult result = new ApplyTimePeriodResult();
+        //todo
+        return result;
+    }
+
 }