|
@@ -12,6 +12,9 @@ import cn.com.qmth.examcloud.commons.api.request.*;
|
|
import cn.com.qmth.examcloud.commons.api.response.*;
|
|
import cn.com.qmth.examcloud.commons.api.response.*;
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
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.enums.ExamType;
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.CoursePaperService;
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.CourseStatisticService;
|
|
|
|
+import cn.com.qmth.examcloud.core.print.service.ExamStructureService;
|
|
import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
import cn.com.qmth.examcloud.core.print.service.PrintingProjectService;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamInfo;
|
|
import cn.com.qmth.examcloud.core.print.service.bean.common.ExamInfo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -31,13 +34,20 @@ import org.springframework.web.bind.annotation.RestController;
|
|
public class PrintingSyncCloudServiceProvider extends ControllerSupport implements HandleSyncCloudService {
|
|
public class PrintingSyncCloudServiceProvider extends ControllerSupport implements HandleSyncCloudService {
|
|
@Autowired
|
|
@Autowired
|
|
private PrintingProjectService printingProjectService;
|
|
private PrintingProjectService printingProjectService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ExamStructureService examStructureService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private CoursePaperService coursePaperService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private CourseStatisticService courseStatisticService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 同步学校机构
|
|
* 同步学校机构
|
|
*/
|
|
*/
|
|
@PostMapping("/syncOrg")
|
|
@PostMapping("/syncOrg")
|
|
public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
|
|
public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
|
|
- printingProjectService.syncPrintingProjectOrgName(req.getRootId(), req.getName());
|
|
|
|
|
|
+ printingProjectService.syncOrgNameByOrgId(req.getRootId(), req.getName());
|
|
|
|
+ examStructureService.syncOrgNameByOrgId(req.getRootId(), req.getName());
|
|
return new SyncOrgResp();
|
|
return new SyncOrgResp();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -46,7 +56,9 @@ public class PrintingSyncCloudServiceProvider extends ControllerSupport implemen
|
|
*/
|
|
*/
|
|
@PostMapping("syncExam")
|
|
@PostMapping("syncExam")
|
|
public SyncExamResp syncExam(@RequestBody SyncExamReq req) {
|
|
public SyncExamResp syncExam(@RequestBody SyncExamReq req) {
|
|
- printingProjectService.syncPrintingProjectOrgName(req.getId(), req.getName());
|
|
|
|
|
|
+ printingProjectService.syncExamNameByExamId(req.getId(), req.getName());
|
|
|
|
+ examStructureService.syncExamNameByExamId(req.getId(), req.getName());
|
|
|
|
+
|
|
if (ExamType.isTradition(req.getExamType())) {
|
|
if (ExamType.isTradition(req.getExamType())) {
|
|
ExamInfo info = new ExamInfo(req.getRootOrgId(), req.getRootOrgName(), req.getId(), req.getName());
|
|
ExamInfo info = new ExamInfo(req.getRootOrgId(), req.getRootOrgName(), req.getId(), req.getName());
|
|
printingProjectService.syncPrintingProject(info);
|
|
printingProjectService.syncPrintingProject(info);
|
|
@@ -59,7 +71,7 @@ public class PrintingSyncCloudServiceProvider extends ControllerSupport implemen
|
|
*/
|
|
*/
|
|
@PostMapping("/syncExamStudent")
|
|
@PostMapping("/syncExamStudent")
|
|
public SyncExamStudentResp syncExamStudent(@RequestBody SyncExamStudentReq req) {
|
|
public SyncExamStudentResp syncExamStudent(@RequestBody SyncExamStudentReq req) {
|
|
- return null;
|
|
|
|
|
|
+ return new SyncExamStudentResp();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -67,7 +79,7 @@ public class PrintingSyncCloudServiceProvider extends ControllerSupport implemen
|
|
*/
|
|
*/
|
|
@PostMapping("/syncStudent")
|
|
@PostMapping("/syncStudent")
|
|
public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
|
|
public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
|
|
- return null;
|
|
|
|
|
|
+ return new SyncStudentResp();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -75,7 +87,9 @@ public class PrintingSyncCloudServiceProvider extends ControllerSupport implemen
|
|
*/
|
|
*/
|
|
@PostMapping("/syncCourse")
|
|
@PostMapping("/syncCourse")
|
|
public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
|
|
public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
|
|
- return null;
|
|
|
|
|
|
+ coursePaperService.syncCourseNameByCourseId(req.getId(), req.getName());
|
|
|
|
+ courseStatisticService.syncCourseNameByCourseId(req.getId(), req.getName());
|
|
|
|
+ return new SyncCourseResp();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -83,7 +97,7 @@ public class PrintingSyncCloudServiceProvider extends ControllerSupport implemen
|
|
*/
|
|
*/
|
|
@PostMapping("syncSpecialty")
|
|
@PostMapping("syncSpecialty")
|
|
public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
|
|
public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
|
|
- return null;
|
|
|
|
|
|
+ return new SyncSpecialtyResp();
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|