|
@@ -3,13 +3,11 @@ package com.qmth.distributed.print.business.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
|
|
+import com.qmth.distributed.print.business.entity.ExamPaperStructure;
|
|
import com.qmth.distributed.print.business.entity.GradeBatch;
|
|
import com.qmth.distributed.print.business.entity.GradeBatch;
|
|
import com.qmth.distributed.print.business.entity.GradeBatchPaper;
|
|
import com.qmth.distributed.print.business.entity.GradeBatchPaper;
|
|
import com.qmth.distributed.print.business.entity.TBSyncTask;
|
|
import com.qmth.distributed.print.business.entity.TBSyncTask;
|
|
-import com.qmth.distributed.print.business.service.DataSyncReportService;
|
|
|
|
-import com.qmth.distributed.print.business.service.GradeBatchPaperService;
|
|
|
|
-import com.qmth.distributed.print.business.service.GradeBatchService;
|
|
|
|
-import com.qmth.distributed.print.business.service.TBSyncTaskService;
|
|
|
|
|
|
+import com.qmth.distributed.print.business.service.*;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.entity.BasicSemester;
|
|
import com.qmth.teachcloud.common.entity.BasicSemester;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
@@ -53,6 +51,9 @@ public class DataSyncReportServiceImpl implements DataSyncReportService {
|
|
@Resource
|
|
@Resource
|
|
private TeachCloudReportTaskUtils teachCloudReportTaskUtils;
|
|
private TeachCloudReportTaskUtils teachCloudReportTaskUtils;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private ExamPaperStructureService examPaperStructureService;
|
|
|
|
+
|
|
@Async
|
|
@Async
|
|
@Override
|
|
@Override
|
|
public void syncGradeBatch(GradeBatch gradeBatch, TBSyncTask tbSyncTask) {
|
|
public void syncGradeBatch(GradeBatch gradeBatch, TBSyncTask tbSyncTask) {
|
|
@@ -174,6 +175,11 @@ public class DataSyncReportServiceImpl implements DataSyncReportService {
|
|
if (SystemConstant.PAPER_STRUCT_EXCEPTION_CODE.equals(apiException.getCode())){
|
|
if (SystemConstant.PAPER_STRUCT_EXCEPTION_CODE.equals(apiException.getCode())){
|
|
// 截取试卷编号当做remark
|
|
// 截取试卷编号当做remark
|
|
remark = errorMessage.substring(errorMessage.indexOf("【") + 1,errorMessage.indexOf("】"));
|
|
remark = errorMessage.substring(errorMessage.indexOf("【") + 1,errorMessage.indexOf("】"));
|
|
|
|
+
|
|
|
|
+ // 更新状态(structureChange)
|
|
|
|
+ UpdateWrapper<ExamPaperStructure> updateWrapper = new UpdateWrapper<>();
|
|
|
|
+ updateWrapper.lambda().set(ExamPaperStructure::getStructrueChange, true).eq(ExamPaperStructure::getSchoolId, schoolId).eq(ExamPaperStructure::getPaperNumber, remark);
|
|
|
|
+ examPaperStructureService.update(updateWrapper);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|