diff --git a/src/main/java/com/docus/server/reportmanager/service/impl/SzyReportManagerServiceImpl.java b/src/main/java/com/docus/server/reportmanager/service/impl/SzyReportManagerServiceImpl.java index 1174b76..0c3c43f 100644 --- a/src/main/java/com/docus/server/reportmanager/service/impl/SzyReportManagerServiceImpl.java +++ b/src/main/java/com/docus/server/reportmanager/service/impl/SzyReportManagerServiceImpl.java @@ -64,7 +64,7 @@ public class SzyReportManagerServiceImpl implements ReportManagerService { task.setSysflag(sysFlag); List tasks = collectTaskMapper.getTasks(task); if (Func.isEmpty(tasks)) { - throw new BaseException("无纸化系统没有可作废的电生理报告:" + reportNo); + throw new BaseException("无纸化系统没有可作废的电生理报告任务:" + reportNo); } ArrayList taskIds = new ArrayList<>(); ArrayList scanAssortIds = new ArrayList<>(); @@ -80,8 +80,12 @@ public class SzyReportManagerServiceImpl implements ReportManagerService { @Transactional(rollbackFor = Exception.class) public void cancelReportTaskAndFile(List taskIds, List scanAssortIds) { - collectTaskMapper.cancel(taskIds); - scanAssortMapper.cancel(scanAssortIds); + if (Func.isNotEmpty(taskIds)) { + collectTaskMapper.cancel(taskIds); + } + if (Func.isNotEmpty(scanAssortIds)) { + scanAssortMapper.cancel(scanAssortIds); + } } private String error(String msg) {