|
@@ -39,6 +39,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.data.redis.support.atomic.RedisAtomicLong;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.FileCopyUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -148,15 +149,10 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
|
|
|
//所有考场都撤回,印刷任务状态改为就绪
|
|
|
QueryWrapper<ExamDetail> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.lambda().eq(ExamDetail::getPrintPlanId, tbTask.getPrintPlanId());
|
|
|
- if (Objects.nonNull(examDetailId)) {
|
|
|
- queryWrapper.lambda().eq(ExamDetail::getId, examDetailId);
|
|
|
- } else if (Objects.nonNull(examDetailIds)) {
|
|
|
- queryWrapper.lambda().in(ExamDetail::getId, examDetailIds);
|
|
|
- }
|
|
|
- queryWrapper.lambda().notIn(ExamDetail::getStatus, ExamDetailStatusEnum.NEW, ExamDetailStatusEnum.READY);
|
|
|
+ queryWrapper.lambda().eq(ExamDetail::getPrintPlanId, tbTask.getPrintPlanId())
|
|
|
+ .notIn(ExamDetail::getStatus, ExamDetailStatusEnum.NEW, ExamDetailStatusEnum.READY);
|
|
|
List<ExamDetail> examDetails = detailService.list(queryWrapper);
|
|
|
- if (examDetails.isEmpty()) {
|
|
|
+ if (CollectionUtils.isEmpty(examDetails)) {
|
|
|
UpdateWrapper<ExamPrintPlan> printPlanUpdateWrapper = new UpdateWrapper<>();
|
|
|
printPlanUpdateWrapper.lambda().set(ExamPrintPlan::getStatus, PrintPlanStatusEnum.READY).eq(ExamPrintPlan::getId, tbTask.getPrintPlanId());
|
|
|
examPrintPlanService.update(printPlanUpdateWrapper);
|