|
@@ -12,6 +12,8 @@ import cn.com.qmth.examcloud.service.examwork.dao.ExamOrgTimeRepo;
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgTime;
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgTime;
|
|
import cn.com.qmth.examcloud.service.examwork.enums.ExamType;
|
|
import cn.com.qmth.examcloud.service.examwork.enums.ExamType;
|
|
import cn.com.qmth.examcloud.service.examwork.service.rpc.OrgService;
|
|
import cn.com.qmth.examcloud.service.examwork.service.rpc.OrgService;
|
|
|
|
+import cn.com.qmth.examcloud.service.examwork.service.sync.DataSendService;
|
|
|
|
+
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.domain.Example;
|
|
import org.springframework.data.domain.Example;
|
|
import org.springframework.data.domain.ExampleMatcher;
|
|
import org.springframework.data.domain.ExampleMatcher;
|
|
@@ -23,6 +25,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamRepo;
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamRepo;
|
|
import cn.com.qmth.examcloud.service.examwork.entity.Exam;
|
|
import cn.com.qmth.examcloud.service.examwork.entity.Exam;
|
|
|
|
+
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -42,6 +45,9 @@ public class ExamService {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
OrgService orgService;
|
|
OrgService orgService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ DataSendService dataSendService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取所有考试批次(分页)
|
|
* 获取所有考试批次(分页)
|
|
@@ -84,6 +90,9 @@ public class ExamService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public Exam saveExam(Exam exam){
|
|
public Exam saveExam(Exam exam){
|
|
|
|
+ if(exam.getId() != null){
|
|
|
|
+ dataSendService.sendExam(exam);
|
|
|
|
+ }
|
|
return examRepo.save(exam);
|
|
return examRepo.save(exam);
|
|
}
|
|
}
|
|
|
|
|