|
@@ -52,10 +52,7 @@ public class TeachCloudReportTaskUtils {
|
|
public Long syncSemester(Long schoolId, Long thirdSemesterId, String semesterName, Long startTime, Long endTime, Boolean enable) {
|
|
public Long syncSemester(Long schoolId, Long thirdSemesterId, String semesterName, Long startTime, Long endTime, Boolean enable) {
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
- BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
|
- if (hostUrl.contains("*")) {
|
|
|
|
- hostUrl = hostUrl.replace("*", basicSchool.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+ hostUrl = SystemConstant.getLocalFileHost(hostUrl);
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getSemesterApi();
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getSemesterApi();
|
|
validUrl(hostUrl, saveUrl);
|
|
validUrl(hostUrl, saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
@@ -102,10 +99,7 @@ public class TeachCloudReportTaskUtils {
|
|
public Long syncExam(Long schoolId, Long id, String examName, Long examTime, String semesterId, Boolean enable) {
|
|
public Long syncExam(Long schoolId, Long id, String examName, Long examTime, String semesterId, Boolean enable) {
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
- BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
|
- if (hostUrl.contains("*")) {
|
|
|
|
- hostUrl = hostUrl.replace("*", basicSchool.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+ hostUrl = SystemConstant.getLocalFileHost(hostUrl);
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getExamApi();
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getExamApi();
|
|
validUrl(hostUrl, saveUrl);
|
|
validUrl(hostUrl, saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
@@ -150,10 +144,7 @@ public class TeachCloudReportTaskUtils {
|
|
String paperType, String teachCollegeName, Boolean enable) {
|
|
String paperType, String teachCollegeName, Boolean enable) {
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
- BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
|
- if (hostUrl.contains("*")) {
|
|
|
|
- hostUrl = hostUrl.replace("*", basicSchool.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+ hostUrl = SystemConstant.getLocalFileHost(hostUrl);
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getCourseEditApi();
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getCourseEditApi();
|
|
validUrl(hostUrl, saveUrl);
|
|
validUrl(hostUrl, saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
@@ -195,10 +186,7 @@ public class TeachCloudReportTaskUtils {
|
|
public boolean startCalc(Long schoolId, Long examId, List<String> courseCodes) {
|
|
public boolean startCalc(Long schoolId, Long examId, List<String> courseCodes) {
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
- BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
|
- if (hostUrl.contains("*")) {
|
|
|
|
- hostUrl = hostUrl.replace("*", basicSchool.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+ hostUrl = SystemConstant.getLocalFileHost(hostUrl);
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getCalculateApi();
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getCalculateApi();
|
|
validUrl(hostUrl, saveUrl);
|
|
validUrl(hostUrl, saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
@@ -240,10 +228,7 @@ public class TeachCloudReportTaskUtils {
|
|
public boolean publish(Long schoolId, Long thirdExamId, String gradeCourseCode, boolean publishStatus) {
|
|
public boolean publish(Long schoolId, Long thirdExamId, String gradeCourseCode, boolean publishStatus) {
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
String hostUrl = dictionaryConfig.reportOpenDomain().getHostUrl();
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
Optional.ofNullable(hostUrl).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置教研分析host"));
|
|
- BasicSchool basicSchool = commonCacheService.schoolCache(schoolId);
|
|
|
|
- if (hostUrl.contains("*")) {
|
|
|
|
- hostUrl = hostUrl.replace("*", basicSchool.getCode());
|
|
|
|
- }
|
|
|
|
|
|
+ hostUrl = SystemConstant.getLocalFileHost(hostUrl);
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getPublishApi();
|
|
String saveUrl = dictionaryConfig.reportOpenDomain().getPublishApi();
|
|
validUrl(hostUrl, saveUrl);
|
|
validUrl(hostUrl, saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|
|
String postUrl = hostUrl.concat(saveUrl);
|