|
@@ -1,7 +1,6 @@
|
|
package cn.com.qmth.print.manage.service.impl;
|
|
package cn.com.qmth.print.manage.service.impl;
|
|
|
|
|
|
import cn.com.qmth.print.manage.config.PmConstants;
|
|
import cn.com.qmth.print.manage.config.PmConstants;
|
|
-import cn.com.qmth.print.manage.config.SysProperty;
|
|
|
|
import cn.com.qmth.print.manage.dao.ExamDao;
|
|
import cn.com.qmth.print.manage.dao.ExamDao;
|
|
import cn.com.qmth.print.manage.dao.ExamStudentDao;
|
|
import cn.com.qmth.print.manage.dao.ExamStudentDao;
|
|
import cn.com.qmth.print.manage.dto.ExamStudentExportDTO;
|
|
import cn.com.qmth.print.manage.dto.ExamStudentExportDTO;
|
|
@@ -31,6 +30,7 @@ import com.qmth.boot.tools.crypto.AES;
|
|
import com.qmth.boot.tools.models.ByteArray;
|
|
import com.qmth.boot.tools.models.ByteArray;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
@@ -55,8 +55,8 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentDao, ExamStud
|
|
@Resource
|
|
@Resource
|
|
private ExamDao examDao;
|
|
private ExamDao examDao;
|
|
|
|
|
|
- @Resource
|
|
|
|
- private SysProperty sysProperty;
|
|
|
|
|
|
+ @Value("${temp-data-dir}")
|
|
|
|
+ String tempDir;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ExamStudentEntity findByExamIdAndExamNumber(Long examId, String examNumber) {
|
|
public ExamStudentEntity findByExamIdAndExamNumber(Long examId, String examNumber) {
|
|
@@ -202,7 +202,7 @@ public class ExamStudentServiceImpl extends ServiceImpl<ExamStudentDao, ExamStud
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
public Object analyzeZipAndImportStudents(Long examId, MultipartFile file) {
|
|
public Object analyzeZipAndImportStudents(Long examId, MultipartFile file) {
|
|
- String tempPath = sysProperty.getTempDir() + "/importExamStudent";
|
|
|
|
|
|
+ String tempPath = tempDir + "/importExamStudent";
|
|
try {
|
|
try {
|
|
byte[] bytes = file.getBytes();
|
|
byte[] bytes = file.getBytes();
|
|
byte[] keyArr = Arrays.copyOfRange(bytes, 0, 16);
|
|
byte[] keyArr = Arrays.copyOfRange(bytes, 0, 16);
|