|
@@ -69,7 +69,7 @@ public class CloudMarkingTaskUtils {
|
|
* @return 考试ID
|
|
* @return 考试ID
|
|
*/
|
|
*/
|
|
public Long syncExam(Long schoolId, String code, String name, String examTime) {
|
|
public Long syncExam(Long schoolId, String code, String name, String examTime) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String examSaveUrl = SystemConstant.CLOUD_MARK_EXAM_SAVE_API;
|
|
String examSaveUrl = SystemConstant.CLOUD_MARK_EXAM_SAVE_API;
|
|
@@ -103,7 +103,7 @@ public class CloudMarkingTaskUtils {
|
|
Boolean enable = userPushParam.getEnable();
|
|
Boolean enable = userPushParam.getEnable();
|
|
Long schoolId = userPushParam.getSchoolId();
|
|
Long schoolId = userPushParam.getSchoolId();
|
|
|
|
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String userSaveUrl = SystemConstant.CLOUD_MARK_USER_EXTERNAL_SAVE_API;
|
|
String userSaveUrl = SystemConstant.CLOUD_MARK_USER_EXTERNAL_SAVE_API;
|
|
@@ -155,7 +155,7 @@ public class CloudMarkingTaskUtils {
|
|
public boolean syncStudent(Long schoolId, String examId, String examNumber, String studentCode, String name, String college,
|
|
public boolean syncStudent(Long schoolId, String examId, String examNumber, String studentCode, String name, String college,
|
|
String className, String teacher, String subjectCode, String subjectName,
|
|
String className, String teacher, String subjectCode, String subjectName,
|
|
String packageCode, String paperType, String examSite, String examRoom) {
|
|
String packageCode, String paperType, String examSite, String examRoom) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String studentSaveUrl = SystemConstant.CLOUD_MARK_EXAM_STUDENT_SAVE_API;
|
|
String studentSaveUrl = SystemConstant.CLOUD_MARK_EXAM_STUDENT_SAVE_API;
|
|
@@ -200,7 +200,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param file 文件
|
|
* @param file 文件
|
|
*/
|
|
*/
|
|
public String syncFile(Long schoolId, String examId, String subjectCode, SyncFileTypeEnum type, File file) {
|
|
public String syncFile(Long schoolId, String examId, String subjectCode, SyncFileTypeEnum type, File file) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String fileUploadUrl = SystemConstant.CLOUD_MARK_FILE_UPLOAD_API;
|
|
String fileUploadUrl = SystemConstant.CLOUD_MARK_FILE_UPLOAD_API;
|
|
@@ -268,7 +268,7 @@ public class CloudMarkingTaskUtils {
|
|
*/
|
|
*/
|
|
public boolean syncPaperStructure(Long schoolId, String examId, String subjectCode, Boolean objective,
|
|
public boolean syncPaperStructure(Long schoolId, String examId, String subjectCode, Boolean objective,
|
|
String paperType, List<QuestionDTO> questions) {
|
|
String paperType, List<QuestionDTO> questions) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String structureUrl = SystemConstant.CLOUD_MARK_EXAM_PAPER_SAVE_API;
|
|
String structureUrl = SystemConstant.CLOUD_MARK_EXAM_PAPER_SAVE_API;
|
|
@@ -302,7 +302,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param paperType 试卷编号
|
|
* @param paperType 试卷编号
|
|
*/
|
|
*/
|
|
public String queryPaperStructure(Long schoolId, String examId, String subjectCode, String paperType) {
|
|
public String queryPaperStructure(Long schoolId, String examId, String subjectCode, String paperType) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String queryPaperStructure = SystemConstant.CLOUD_MARK_EXAM_PAPER_QUERY_API;
|
|
String queryPaperStructure = SystemConstant.CLOUD_MARK_EXAM_PAPER_QUERY_API;
|
|
@@ -330,7 +330,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param groups 试卷结构JSON
|
|
* @param groups 试卷结构JSON
|
|
*/
|
|
*/
|
|
public boolean saveMarkerGroup(Long schoolId, String examId, String subjectCode, Integer trialCount, List<GroupDetailDTO> groups) {
|
|
public boolean saveMarkerGroup(Long schoolId, String examId, String subjectCode, Integer trialCount, List<GroupDetailDTO> groups) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String groupSaveUrl = SystemConstant.CLOUD_MARK_EXAM_MARK_GROUP_SAVE_API;
|
|
String groupSaveUrl = SystemConstant.CLOUD_MARK_EXAM_MARK_GROUP_SAVE_API;
|
|
@@ -362,7 +362,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param subjectCode 科目代码
|
|
* @param subjectCode 科目代码
|
|
*/
|
|
*/
|
|
public int countGroup(Long schoolId, String examId, String subjectCode) {
|
|
public int countGroup(Long schoolId, String examId, String subjectCode) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String groupCountUrl = SystemConstant.CLOUD_MARK_EXAM_MARK_GROUP_COUNT_API;
|
|
String groupCountUrl = SystemConstant.CLOUD_MARK_EXAM_MARK_GROUP_COUNT_API;
|
|
@@ -393,7 +393,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param subjectCode 科目代码
|
|
* @param subjectCode 科目代码
|
|
*/
|
|
*/
|
|
public boolean deleteGroup(Long schoolId, String examId, String subjectCode) {
|
|
public boolean deleteGroup(Long schoolId, String examId, String subjectCode) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String groupDeleteUrl = SystemConstant.CLOUD_MARK_EXAM_MARK_GROUP_DELETE_API;
|
|
String groupDeleteUrl = SystemConstant.CLOUD_MARK_EXAM_MARK_GROUP_DELETE_API;
|
|
@@ -423,7 +423,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param loginName 用户名
|
|
* @param loginName 用户名
|
|
*/
|
|
*/
|
|
public boolean saveMarker(Long schoolId, String examId, String subjectCode, Integer groupNumber, String loginName) {
|
|
public boolean saveMarker(Long schoolId, String examId, String subjectCode, Integer groupNumber, String loginName) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String markerSaveUrl = SystemConstant.CLOUD_MARK_EXAM_MARKER_SAVE_API;
|
|
String markerSaveUrl = SystemConstant.CLOUD_MARK_EXAM_MARKER_SAVE_API;
|
|
@@ -453,7 +453,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param loginName 用户名
|
|
* @param loginName 用户名
|
|
*/
|
|
*/
|
|
public boolean saveMarkLeader(Long schoolId, String subjectCode, String loginName) {
|
|
public boolean saveMarkLeader(Long schoolId, String subjectCode, String loginName) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String markLeaderSaveUrl = SystemConstant.CLOUD_MARK_EXAM_SUBJECT_HEADER_SAVE_API;
|
|
String markLeaderSaveUrl = SystemConstant.CLOUD_MARK_EXAM_SUBJECT_HEADER_SAVE_API;
|
|
@@ -506,7 +506,7 @@ public class CloudMarkingTaskUtils {
|
|
* @param prefix 账号前缀
|
|
* @param prefix 账号前缀
|
|
*/
|
|
*/
|
|
private Map<String, Object> openLogin(SysUser sysUser, String loginUrl, String prefix) {
|
|
private Map<String, Object> openLogin(SysUser sysUser, String loginUrl, String prefix) {
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(sysUser.getSchoolId(), SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
validUrl(hostUrl, loginUrl);
|
|
validUrl(hostUrl, loginUrl);
|
|
@@ -664,7 +664,7 @@ public class CloudMarkingTaskUtils {
|
|
map.put("examId", validParam(String.valueOf(examId), null, true, "考试ID"));
|
|
map.put("examId", validParam(String.valueOf(examId), null, true, "考试ID"));
|
|
map.put("withMarkTrack", validParam(withMarkTrack, true, false, "评分标记"));
|
|
map.put("withMarkTrack", validParam(withMarkTrack, true, false, "评分标记"));
|
|
|
|
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String studentCountUrl = SystemConstant.CLOUD_MARK_EXAM_STUDENT_COUNT_API;
|
|
String studentCountUrl = SystemConstant.CLOUD_MARK_EXAM_STUDENT_COUNT_API;
|
|
@@ -711,7 +711,7 @@ public class CloudMarkingTaskUtils {
|
|
map.put("pageNumber", validParam(String.valueOf(pageNo), null, true, "页码"));
|
|
map.put("pageNumber", validParam(String.valueOf(pageNo), null, true, "页码"));
|
|
map.put("pageSize", validParam(String.valueOf(pageSize), null, true, "数量"));
|
|
map.put("pageSize", validParam(String.valueOf(pageSize), null, true, "数量"));
|
|
|
|
|
|
- SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.CLOUDMARK_HOST_URL);
|
|
|
|
|
|
+ SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.CLOUDMARK_HOST_URL);
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置云阅卷地址"));
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String hostUrl = sysConfig.getConfigValue();
|
|
String studentScoreUrl = SystemConstant.CLOUD_MARK_EXAM_STUDENT_SCORE_API;
|
|
String studentScoreUrl = SystemConstant.CLOUD_MARK_EXAM_STUDENT_SCORE_API;
|