|
@@ -165,7 +165,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
private void uploadPaperFile(ExtractConfig extractConfig, String paperId, ExportStructure exportStructure, User user, ExamPaper examPaper) throws Exception {
|
|
|
- ExportServiceManage esm = exportServiceManageRepo.findByOrgName(user.getRootOrgName());
|
|
|
+ ExportServiceManage esm = exportServiceManageRepo.findByOrgId(String.valueOf(user.getRootOrgId()));
|
|
|
if (esm == null) {
|
|
|
throw new StatusException("500", "尚未配置导出功能!");
|
|
|
}
|
|
@@ -188,7 +188,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void exportExamPaperInfo(ExportPaperInfoModel exportModel, HttpServletResponse response, String loginName, String orgName, String psw) throws Exception {
|
|
|
+ public void exportExamPaperInfo(ExportPaperInfoModel exportModel, HttpServletResponse response, String loginName, String orgId, String psw) throws Exception {
|
|
|
String tempDir = loginName + System.currentTimeMillis();
|
|
|
String downloadDir = sysProperty.getDownloadDirectory() + "/" + tempDir;
|
|
|
String downZipDir = sysProperty.getZipDirectory() + "/" + tempDir;
|
|
@@ -252,7 +252,7 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
|
String groupCode = examPaper.getGroupCode();
|
|
|
String paperId = examPaper.getPaper().getId();
|
|
|
if (groupCode.equals(examFile.getGroupCode())) {
|
|
|
- downloadAudio(paperId, examFile, downloadDir, orgName);
|
|
|
+ downloadAudio(paperId, examFile, downloadDir, orgId);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -287,11 +287,11 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
|
*
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- private void downloadAudio(String paperId, ExamFile examFile, String downloadDir, String orgName) throws Exception {
|
|
|
+ private void downloadAudio(String paperId, ExamFile examFile, String downloadDir, String orgId) throws Exception {
|
|
|
//Paper paper = paperRepo.findOne(paperId);
|
|
|
- ExportServiceManage esm = exportServiceManageRepo.findByOrgName(orgName);
|
|
|
+ ExportServiceManage esm = exportServiceManageRepo.findByOrgId(orgId);
|
|
|
if (esm == null) {
|
|
|
- esm = exportServiceManageRepo.findByOrgName("陕西师范大学");
|
|
|
+ throw new StatusException("500", "尚未配置导出功能!");
|
|
|
}
|
|
|
ExportPaperAbstractService exportPaperAbstractService = (ExportPaperAbstractService) SpringContextUtils.getBeanById(esm.getExportServiceName());
|
|
|
PaperExp paperExp = exportPaperAbstractService.initPaperExp(paperId);
|
|
@@ -504,9 +504,9 @@ public class ExtractConfigFileServiceImpl implements ExtractConfigFileService {
|
|
|
//主观题集合
|
|
|
List<SubjectiveQuestionStructure> subjectiveQuestionStructureList = new ArrayList<>();
|
|
|
|
|
|
- ExportServiceManage esm = exportServiceManageRepo.findByOrgName(exportStructure.getOrgName());
|
|
|
+ ExportServiceManage esm = exportServiceManageRepo.findByOrgId(exportStructure.getOrgId());
|
|
|
if (esm == null) {
|
|
|
- esm = exportServiceManageRepo.findByOrgName("陕西师范大学");
|
|
|
+ throw new StatusException("500", "尚未配置导出功能!");
|
|
|
}
|
|
|
ExportPaperAbstractService exportPaperAbstractService = (ExportPaperAbstractService) SpringContextUtils.getBeanById(esm.getExportServiceName());
|
|
|
Set<Entry<String, String>> entrySet = paperIds.entrySet();
|