xiaof преди 2 години
родител
ревизия
f4c0a64e41

+ 4 - 1
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PaperArchivesServiceImpl.java

@@ -146,12 +146,15 @@ public class PaperArchivesServiceImpl extends ServiceImpl<PaperArchivesMapper, P
     @Override
     @Override
     public List<PaperArchivesDetailResult> listDetail(DownLoadPaperParams downLoadPaperParams) {
     public List<PaperArchivesDetailResult> listDetail(DownLoadPaperParams downLoadPaperParams) {
         String ids = downLoadPaperParams.getIds();
         String ids = downLoadPaperParams.getIds();
-        List<PaperArchivesDetailResult> paperArchivesDetailResults = new ArrayList<>();
+        List<PaperArchivesDetailResult> paperArchivesDetailResults;
         if (StringUtils.isNotBlank(ids) && ids.split(",").length > 0) {
         if (StringUtils.isNotBlank(ids) && ids.split(",").length > 0) {
             String[] idsArray = ids.split(",");
             String[] idsArray = ids.split(",");
             paperArchivesDetailResults = this.baseMapper.listDetail(Arrays.asList(idsArray));
             paperArchivesDetailResults = this.baseMapper.listDetail(Arrays.asList(idsArray));
         } else {
         } else {
             Long paperArchivesId = downLoadPaperParams.getPaperArchivesId();
             Long paperArchivesId = downLoadPaperParams.getPaperArchivesId();
+            if (paperArchivesId == null) {
+                throw ExceptionResultEnum.ERROR.exception("档案ID必传");
+            }
             Long belongOrgId = downLoadPaperParams.getBelongOrgId();
             Long belongOrgId = downLoadPaperParams.getBelongOrgId();
             String majorName = downLoadPaperParams.getMajorName();
             String majorName = downLoadPaperParams.getMajorName();
             String clazzName = downLoadPaperParams.getClazzName();
             String clazzName = downLoadPaperParams.getClazzName();

+ 0 - 6
paper-library-business/src/main/java/com/qmth/paper/library/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -374,12 +374,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         try {
         try {
             TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
             TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
             DownLoadPaperParams downLoadPaperParams = JSON.parseObject(tbTask.getRemark(), DownLoadPaperParams.class);
             DownLoadPaperParams downLoadPaperParams = JSON.parseObject(tbTask.getRemark(), DownLoadPaperParams.class);
-            if (Objects.isNull(downLoadPaperParams)) {
-                throw ExceptionResultEnum.ERROR.exception("未传参数");
-            }
-            if (downLoadPaperParams.getPaperArchivesId() == null) {
-                throw ExceptionResultEnum.ERROR.exception("档案ID必传");
-            }
 
 
             List<PaperArchivesDetailResult> archivesDetailResults = paperArchivesService.listDetail(downLoadPaperParams);
             List<PaperArchivesDetailResult> archivesDetailResults = paperArchivesService.listDetail(downLoadPaperParams);
             StringJoiner stringJoiner = new StringJoiner("");
             StringJoiner stringJoiner = new StringJoiner("");