Procházet zdrojové kódy

Merge branch 'master' of http://git.qmth.com.cn/ExamCloud-2/examcloud-rmi

chenken před 6 roky
rodič
revize
4f264d5397

+ 14 - 0
examcloud-core-basic-api-client/src/main/java/cn/com/qmth/examcloud/core/basic/api/client/OrgCloudServiceClient.java

@@ -6,9 +6,13 @@ import org.springframework.web.client.RestTemplate;
 
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
 import cn.com.qmth.examcloud.core.basic.api.OrgCloudService;
+import cn.com.qmth.examcloud.core.basic.api.request.GetAllOrgPropertiesReq;
+import cn.com.qmth.examcloud.core.basic.api.request.GetOrgPropertyReq;
 import cn.com.qmth.examcloud.core.basic.api.request.GetOrgReq;
 import cn.com.qmth.examcloud.core.basic.api.request.GetOrgsReq;
 import cn.com.qmth.examcloud.core.basic.api.request.SaveOrgReq;
+import cn.com.qmth.examcloud.core.basic.api.response.GetAllOrgPropertiesResp;
+import cn.com.qmth.examcloud.core.basic.api.response.GetOrgPropertyResp;
 import cn.com.qmth.examcloud.core.basic.api.response.GetOrgResp;
 import cn.com.qmth.examcloud.core.basic.api.response.GetOrgsResp;
 import cn.com.qmth.examcloud.core.basic.api.response.SaveOrgResp;
@@ -57,4 +61,14 @@ public class OrgCloudServiceClient extends BasicCloudClientSupport implements Or
 		return post("org/getOrgs", req, GetOrgsResp.class);
 	}
 
+	@Override
+	public GetAllOrgPropertiesResp getAllOrgProperties(GetAllOrgPropertiesReq req) {
+		return post("org/getAllOrgProperties", req, GetAllOrgPropertiesResp.class);
+	}
+
+	@Override
+	public GetOrgPropertyResp getOrgProperty(GetOrgPropertyReq req) {
+		return post("org/getOrgProperty", req, GetOrgPropertyResp.class);
+	}
+
 }

+ 8 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/OrgCloudService.java

@@ -1,9 +1,13 @@
 package cn.com.qmth.examcloud.core.basic.api;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
+import cn.com.qmth.examcloud.core.basic.api.request.GetAllOrgPropertiesReq;
+import cn.com.qmth.examcloud.core.basic.api.request.GetOrgPropertyReq;
 import cn.com.qmth.examcloud.core.basic.api.request.GetOrgReq;
 import cn.com.qmth.examcloud.core.basic.api.request.GetOrgsReq;
 import cn.com.qmth.examcloud.core.basic.api.request.SaveOrgReq;
+import cn.com.qmth.examcloud.core.basic.api.response.GetAllOrgPropertiesResp;
+import cn.com.qmth.examcloud.core.basic.api.response.GetOrgPropertyResp;
 import cn.com.qmth.examcloud.core.basic.api.response.GetOrgResp;
 import cn.com.qmth.examcloud.core.basic.api.response.GetOrgsResp;
 import cn.com.qmth.examcloud.core.basic.api.response.SaveOrgResp;
@@ -24,4 +28,8 @@ public interface OrgCloudService extends CloudService {
 
 	GetOrgsResp getOrgs(GetOrgsReq req);
 
+	GetAllOrgPropertiesResp getAllOrgProperties(GetAllOrgPropertiesReq req);
+
+	GetOrgPropertyResp getOrgProperty(GetOrgPropertyReq req);
+
 }

+ 19 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/request/GetAllOrgPropertiesReq.java

@@ -0,0 +1,19 @@
+package cn.com.qmth.examcloud.core.basic.api.request;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+public class GetAllOrgPropertiesReq extends BaseRequest {
+
+	private static final long serialVersionUID = -2480857346739167675L;
+
+	private Long orgId;
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+}

+ 31 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/request/GetOrgPropertyReq.java

@@ -0,0 +1,31 @@
+package cn.com.qmth.examcloud.core.basic.api.request;
+
+import org.springframework.web.bind.annotation.PathVariable;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+public class GetOrgPropertyReq extends BaseRequest {
+
+	private static final long serialVersionUID = 8445489864946182160L;
+
+	private Long orgId;
+
+	private String key;
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+}

+ 21 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/response/GetAllOrgPropertiesResp.java

@@ -0,0 +1,21 @@
+package cn.com.qmth.examcloud.core.basic.api.response;
+
+import java.util.Map;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
+
+public class GetAllOrgPropertiesResp extends BaseResponse {
+
+	private static final long serialVersionUID = -3389812285108955277L;
+
+	private Map<String, String> props;
+
+	public Map<String, String> getProps() {
+		return props;
+	}
+
+	public void setProps(Map<String, String> props) {
+		this.props = props;
+	}
+
+}

+ 19 - 0
examcloud-core-basic-api/src/main/java/cn/com/qmth/examcloud/core/basic/api/response/GetOrgPropertyResp.java

@@ -0,0 +1,19 @@
+package cn.com.qmth.examcloud.core.basic.api.response;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
+
+public class GetOrgPropertyResp extends BaseResponse {
+
+	private static final long serialVersionUID = -2283981755144391579L;
+
+	private String value;
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+}

+ 8 - 1
examcloud-core-questions-api-client/src/main/java/cn/com/qmth/examcloud/core/questions/api/client/PaperCloudServiceClient.java

@@ -6,7 +6,9 @@ import org.springframework.web.client.RestTemplate;
 
 import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
 import cn.com.qmth.examcloud.core.questions.api.PaperCloudService;
+import cn.com.qmth.examcloud.core.questions.api.request.GetExtractConfigReq;
 import cn.com.qmth.examcloud.core.questions.api.request.GetQuestionListReq;
+import cn.com.qmth.examcloud.core.questions.api.response.GetCommonResp;
 import cn.com.qmth.examcloud.core.questions.api.response.GetPaperResp;
 
 /**
@@ -28,9 +30,14 @@ public class PaperCloudServiceClient extends BasicCloudClientSupport implements
 	
 	@Override
 	public GetPaperResp genPaper(GetQuestionListReq req) {
-		return post("default_paper/save", req, GetPaperResp.class);
+		return post("default_paper/genPaper", req, GetPaperResp.class);
 	}
 
+	@Override
+	public GetCommonResp examPaper(GetExtractConfigReq req) {
+		return post("default_paper/examPaper", req, GetCommonResp.class);
+	}
+	
 	@Override
 	protected RestTemplate getRestTemplate() {
 		return restTemplate;

+ 9 - 0
examcloud-core-questions-api/src/main/java/cn/com/qmth/examcloud/core/questions/api/PaperCloudService.java

@@ -1,7 +1,9 @@
 package cn.com.qmth.examcloud.core.questions.api;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
+import cn.com.qmth.examcloud.core.questions.api.request.GetExtractConfigReq;
 import cn.com.qmth.examcloud.core.questions.api.request.GetQuestionListReq;
+import cn.com.qmth.examcloud.core.questions.api.response.GetCommonResp;
 import cn.com.qmth.examcloud.core.questions.api.response.GetPaperResp;
 
 /**
@@ -19,4 +21,11 @@ public interface PaperCloudService extends CloudService{
 	 */
 	GetPaperResp genPaper(GetQuestionListReq req);
 	
+	/**
+	 * 制定考试试卷
+	 * @param req
+	 * @return
+	 */
+	GetCommonResp examPaper(GetExtractConfigReq req);
+	
 }

+ 67 - 0
examcloud-core-questions-api/src/main/java/cn/com/qmth/examcloud/core/questions/api/request/GetExtractConfigReq.java

@@ -0,0 +1,67 @@
+package cn.com.qmth.examcloud.core.questions.api.request;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+/**
+ * @author 		weiwenhai
+ * @date 		2018.10.11
+ * @company		qmth
+ * @description	试卷制定调卷规则请求对象
+ */
+public class GetExtractConfigReq extends BaseRequest{
+
+	private static final long serialVersionUID = 2745038307789837441L;
+
+	/**
+	 * 用户机构id
+	 */
+	private String rootOrgId;
+	
+	/**
+	 * 考试id
+	 */
+	private Long examId;
+	
+	/**
+	 * 试卷id
+	 */
+	private String paperId;
+	
+	/**
+	 * 考卷对象id
+	 */
+	private String extractConfigId;
+
+	public String getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(String rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public String getPaperId() {
+		return paperId;
+	}
+
+	public void setPaperId(String paperId) {
+		this.paperId = paperId;
+	}
+
+	public String getExtractConfigId() {
+		return extractConfigId;
+	}
+
+	public void setExtractConfigId(String extractConfigId) {
+		this.extractConfigId = extractConfigId;
+	}
+	
+}

+ 20 - 0
examcloud-core-questions-api/src/main/java/cn/com/qmth/examcloud/core/questions/api/request/GetQuestionListReq.java

@@ -30,6 +30,10 @@ public class GetQuestionListReq extends BaseRequest{
 	 * 试卷名称
 	 */
 	private String name;
+	
+	private String orgId;
+	
+	private String userName;
 
 	public Set<String> getQuestionIds() {
 		return questionIds;
@@ -54,5 +58,21 @@ public class GetQuestionListReq extends BaseRequest{
 	public void setName(String name) {
 		this.name = name;
 	}
+
+	public String getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(String orgId) {
+		this.orgId = orgId;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
 	
 }

+ 0 - 2
examcloud-core-questions-api/src/main/java/cn/com/qmth/examcloud/core/questions/api/response/GetDefaultQuestionsResp.java

@@ -1,7 +1,5 @@
 package cn.com.qmth.examcloud.core.questions.api.response;
 
-import java.util.List;
-
 import org.springframework.data.domain.Page;
 
 import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;