deason 6 yıl önce
ebeveyn
işleme
70dacbff17

+ 11 - 4
examcloud-core-print-api-client/src/main/java/cn/com/qmth/examcloud/core/print/api/client/CoursePaperCloudServiceClient.java

@@ -8,17 +8,19 @@
 package cn.com.qmth.examcloud.core.print.api.client;
 
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
-import cn.com.qmth.examcloud.core.print.api.PrintingProjectCloudService;
+import cn.com.qmth.examcloud.core.print.api.CoursePaperCloudService;
+import cn.com.qmth.examcloud.core.print.api.request.SyncCoursePaperReq;
+import cn.com.qmth.examcloud.core.print.api.response.SyncCoursePaperResp;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
 /**
  * @author: fengdesheng
- * @since: 2018/10/22
+ * @since: 2018/11/15
  */
-@Service("printingProjectCloudServiceClient")
-public class PrintingProjectCloudServiceClient extends PrintCloudClientSupport implements PrintingProjectCloudService {
+@Service("coursePaperCloudServiceClient")
+public class CoursePaperCloudServiceClient extends PrintCloudClientSupport implements CoursePaperCloudService {
     private static final long serialVersionUID = 1L;
     @Autowired
     private RestTemplate restTemplate;
@@ -35,4 +37,9 @@ public class PrintingProjectCloudServiceClient extends PrintCloudClientSupport i
         return restTemplate;
     }
 
+    @Override
+    public SyncCoursePaperResp syncCoursePaper(SyncCoursePaperReq req) {
+        return post("course/paper/save", req, SyncCoursePaperResp.class);
+    }
+
 }

+ 8 - 1
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/CoursePaperCloudService.java

@@ -8,11 +8,18 @@
 package cn.com.qmth.examcloud.core.print.api;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
+import cn.com.qmth.examcloud.core.print.api.request.SyncCoursePaperReq;
+import cn.com.qmth.examcloud.core.print.api.response.SyncCoursePaperResp;
 
 /**
  * @author: fengdesheng
  * @since: 2018/10/22
  */
-public interface PrintingProjectCloudService extends CloudService {
+public interface CoursePaperCloudService extends CloudService {
+
+    /**
+     * 同步考试课程的试卷
+     */
+    SyncCoursePaperResp syncCoursePaper(SyncCoursePaperReq req);
 
 }

+ 92 - 20
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/bean/SyncCoursePaperBean.java

@@ -11,26 +11,50 @@ import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
 
 /**
  * @author: fengdesheng
- * @since: 2018/10/23
+ * @since: 2018/11/15
  */
-public class SyncPrintingProjectBean implements JsonSerializable {
+public class SyncCoursePaperBean implements JsonSerializable {
     private static final long serialVersionUID = 1L;
     /**
      * 学校机构ID
      */
     private Long orgId;
-    /**
-     * 学校机构名称
-     */
-    private String orgName;
     /**
      * 考试ID
      */
     private Long examId;
     /**
-     * 考试名称
+     * 课程ID
+     */
+    private Long courseId;
+    /**
+     * 课程code
+     */
+    private String courseCode;
+    /**
+     * 课程名称
+     */
+    private String courseName;
+    /**
+     * 试卷ID
+     */
+    private String paperId;
+    /**
+     * 试卷名称
+     */
+    private String paperName;
+    /**
+     * 试卷P数(1P为1面,1张纸为2P)
      */
-    private String examName;
+    private Integer paperP;
+    /**
+     * 试卷文件URL
+     */
+    private String paperFileUrl;
+    /**
+     * 答案文件URL
+     */
+    private String answerFileUrl;
 
     public Long getOrgId() {
         return orgId;
@@ -40,14 +64,6 @@ public class SyncPrintingProjectBean implements JsonSerializable {
         this.orgId = orgId;
     }
 
-    public String getOrgName() {
-        return orgName;
-    }
-
-    public void setOrgName(String orgName) {
-        this.orgName = orgName;
-    }
-
     public Long getExamId() {
         return examId;
     }
@@ -56,12 +72,68 @@ public class SyncPrintingProjectBean implements JsonSerializable {
         this.examId = examId;
     }
 
-    public String getExamName() {
-        return examName;
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public String getCourseCode() {
+        return courseCode;
+    }
+
+    public void setCourseCode(String courseCode) {
+        this.courseCode = courseCode;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getPaperId() {
+        return paperId;
+    }
+
+    public void setPaperId(String paperId) {
+        this.paperId = paperId;
+    }
+
+    public String getPaperName() {
+        return paperName;
+    }
+
+    public void setPaperName(String paperName) {
+        this.paperName = paperName;
+    }
+
+    public Integer getPaperP() {
+        return paperP;
+    }
+
+    public void setPaperP(Integer paperP) {
+        this.paperP = paperP;
+    }
+
+    public String getPaperFileUrl() {
+        return paperFileUrl;
+    }
+
+    public void setPaperFileUrl(String paperFileUrl) {
+        this.paperFileUrl = paperFileUrl;
+    }
+
+    public String getAnswerFileUrl() {
+        return answerFileUrl;
     }
 
-    public void setExamName(String examName) {
-        this.examName = examName;
+    public void setAnswerFileUrl(String answerFileUrl) {
+        this.answerFileUrl = answerFileUrl;
     }
 
 }

+ 6 - 6
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/request/SyncCoursePaperReq.java

@@ -8,22 +8,22 @@
 package cn.com.qmth.examcloud.core.print.api.request;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
-import cn.com.qmth.examcloud.core.print.api.bean.SyncPrintingProjectBean;
+import cn.com.qmth.examcloud.core.print.api.bean.SyncCoursePaperBean;
 
 /**
  * @author: fengdesheng
- * @since: 2018/10/23
+ * @since: 2018/11/15
  */
-public class SyncPrintingProjectReq extends BaseRequest {
+public class SyncCoursePaperReq extends BaseRequest {
     private static final long serialVersionUID = 1L;
 
-    private SyncPrintingProjectBean bean;
+    private SyncCoursePaperBean bean;
 
-    public SyncPrintingProjectBean getBean() {
+    public SyncCoursePaperBean getBean() {
         return bean;
     }
 
-    public void setBean(SyncPrintingProjectBean bean) {
+    public void setBean(SyncCoursePaperBean bean) {
         this.bean = bean;
     }
 

+ 2 - 2
examcloud-core-print-api/src/main/java/cn/com/qmth/examcloud/core/print/api/response/SyncCoursePaperResp.java

@@ -11,9 +11,9 @@ import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
 
 /**
  * @author: fengdesheng
- * @since: 2018/10/23
+ * @since: 2018/11/15
  */
-public class SyncPrintingProjectResp extends BaseResponse {
+public class SyncCoursePaperResp extends BaseResponse {
     private static final long serialVersionUID = 1L;
 
 }