|
@@ -26,12 +26,15 @@ import cn.com.qmth.examcloud.service.core.dto.SpecialtyDTO;
|
|
|
import cn.com.qmth.examcloud.service.core.entity.CourseSpeciatly;
|
|
|
import cn.com.qmth.examcloud.service.core.entity.Specialty;
|
|
|
import cn.com.qmth.examcloud.service.core.repo.SpecialtyRepo;
|
|
|
+import cn.com.qmth.examcloud.service.core.service.sync.DataSendService;
|
|
|
|
|
|
@Service
|
|
|
public class SpecialtyService {
|
|
|
|
|
|
@Autowired
|
|
|
SpecialtyRepo specialtyRepo;
|
|
|
+ @Autowired
|
|
|
+ DataSendService dataSendService;
|
|
|
|
|
|
|
|
|
@Transactional
|
|
@@ -54,6 +57,9 @@ public class SpecialtyService {
|
|
|
}
|
|
|
});
|
|
|
specialtyRepo.save(list);
|
|
|
+ for (Specialty specialty : list) {
|
|
|
+ dataSendService.sendSpecialty(specialty);
|
|
|
+ }
|
|
|
return excelErrors;
|
|
|
}
|
|
|
|
|
@@ -132,6 +138,7 @@ public class SpecialtyService {
|
|
|
specialty.setCreateTime(new Date());
|
|
|
specialty.setEnable(true);
|
|
|
specialtyRepo.save(specialty);
|
|
|
+ dataSendService.sendSpecialty(specialty);
|
|
|
}
|
|
|
|
|
|
//验证专业代码是否存在
|
|
@@ -153,6 +160,7 @@ public class SpecialtyService {
|
|
|
}
|
|
|
specialty.setUpdateTime(new Date());
|
|
|
specialtyRepo.save(specialty);
|
|
|
+ dataSendService.sendSpecialty(specialty);
|
|
|
}
|
|
|
|
|
|
/**
|