deason 6 lat temu
rodzic
commit
031368326e

+ 49 - 0
examcloud-core-print-dao/src/main/java/cn/com/qmth/examcloud/core/print/enums/ExamType.java

@@ -0,0 +1,49 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-10-31 14:40:11.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.print.enums;
+
+/**
+ * 考试类型
+ */
+public enum ExamType {
+    /**
+     * 传统
+     */
+    TRADITION,
+
+    /**
+     * 在线考试(网考)
+     */
+    ONLINE,
+
+    /**
+     * 练习
+     */
+    PRACTICE,
+
+    /**
+     * 离线
+     */
+    OFFLINE,
+
+    /**
+     * 分布式印刷考试
+     */
+    PRINT_EXAM;
+
+    /**
+     * 是否为传统考试
+     */
+    public static boolean isTradition(String name) {
+        if (TRADITION.name().equals(name)) {
+            return true;
+        }
+        return false;
+    }
+
+}

+ 7 - 1
examcloud-core-print-provider/src/main/java/cn/com/qmth/examcloud/core/print/api/provider/PrintingSyncCloudServiceProvider.java

@@ -11,7 +11,9 @@ import cn.com.qmth.examcloud.commons.api.HandleSyncCloudService;
 import cn.com.qmth.examcloud.commons.api.request.*;
 import cn.com.qmth.examcloud.commons.api.response.*;
 import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
+import cn.com.qmth.examcloud.core.print.enums.ExamType;
 import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
+import cn.com.qmth.examcloud.core.print.service.bean.OrgExamInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -43,7 +45,11 @@ public class PrintingSyncCloudServiceProvider extends ControllerSupport implemen
     @ApiOperation(value = "同步考试")
     @PostMapping("syncExam")
     public SyncExamResp syncExam(@RequestBody SyncExamReq req) {
-        //printingProjectService.syncPrintingProjectOrgName(req.getExamId(), req.getExamName());
+        //printingProjectService.syncPrintingProjectOrgName(req.getExamId(), req.getName());
+        if (ExamType.isTradition(req.getExamType())) {
+            //OrgExamInfo info = new OrgExamInfo(req.getRootOrgId(), req.getRootOrgName(), req.getExamId(), req.getName());
+            //printingProjectService.syncPrintingProject(info);
+        }
         return new SyncExamResp();
     }