|
@@ -28,6 +28,7 @@ import com.qmth.teachcloud.common.annotation.ExcelDBFieldDesc;
|
|
import com.qmth.teachcloud.common.base.BaseEntity;
|
|
import com.qmth.teachcloud.common.base.BaseEntity;
|
|
import com.qmth.teachcloud.common.bean.dto.excel.*;
|
|
import com.qmth.teachcloud.common.bean.dto.excel.*;
|
|
import com.qmth.teachcloud.common.bean.params.ArraysParams;
|
|
import com.qmth.teachcloud.common.bean.params.ArraysParams;
|
|
|
|
+import com.qmth.teachcloud.common.config.DictionaryConfig;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.entity.*;
|
|
import com.qmth.teachcloud.common.entity.*;
|
|
import com.qmth.teachcloud.common.enums.*;
|
|
import com.qmth.teachcloud.common.enums.*;
|
|
@@ -177,6 +178,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
@Resource
|
|
@Resource
|
|
private TeachClazzService teachClazzService;
|
|
private TeachClazzService teachClazzService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ DictionaryConfig dictionaryConfig;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 创建pdf前置条件
|
|
* 创建pdf前置条件
|
|
*
|
|
*
|
|
@@ -399,7 +403,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
int mod = seq % examTaskDetail.getDrawCount();
|
|
int mod = seq % examTaskDetail.getDrawCount();
|
|
String tempPaperType = paperTypes.get(mod);
|
|
String tempPaperType = paperTypes.get(mod);
|
|
BasicAttachment basicAttachment = createPdfUtil.examStudentHtml(cardContent, null, tempPaperType, examDetail, examDetailCourse, sysUser.getId(), studentCardPdfList, basicCardRule);
|
|
BasicAttachment basicAttachment = createPdfUtil.examStudentHtml(cardContent, null, tempPaperType, examDetail, examDetailCourse, sysUser.getId(), studentCardPdfList, basicCardRule);
|
|
- ;
|
|
|
|
|
|
+
|
|
if (!stringBasicAttachmentMap.containsKey(tempPaperType)) {
|
|
if (!stringBasicAttachmentMap.containsKey(tempPaperType)) {
|
|
stringBasicAttachmentMap.put(tempPaperType, basicAttachment);
|
|
stringBasicAttachmentMap.put(tempPaperType, basicAttachment);
|
|
JSONObject object = new JSONObject();
|
|
JSONObject object = new JSONObject();
|
|
@@ -597,7 +601,9 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
// createPdfUtil.deleteAttachment(attachmentIds, ftlList);
|
|
// createPdfUtil.deleteAttachment(attachmentIds, ftlList);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error(SystemConstant.LOG_ERROR, e);
|
|
log.error(SystemConstant.LOG_ERROR, e);
|
|
- basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
|
|
|
|
|
|
+ if (dictionaryConfig.sysDomain().isOss()) {
|
|
|
|
+ basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
|
|
|
|
+ }
|
|
if (e instanceof ApiException) {
|
|
if (e instanceof ApiException) {
|
|
ResultUtil.error((ApiException) e, e.getMessage());
|
|
ResultUtil.error((ApiException) e, e.getMessage());
|
|
} else {
|
|
} else {
|