From 0f65d8f4591d3873b1cc0716a5ed136801b1fa1b Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Tue, 27 Feb 2024 19:32:39 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E6=B5=81=E7=A8=8B=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1081086489100288]流程管理-流程导入异常 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1081086489100288 --- .../module/tenant/api/importexport/ImportApi.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/module/tenant/api/importexport/ImportApi.java b/src/main/java/neatlogic/module/tenant/api/importexport/ImportApi.java index da61c8ca..29c8314e 100644 --- a/src/main/java/neatlogic/module/tenant/api/importexport/ImportApi.java +++ b/src/main/java/neatlogic/module/tenant/api/importexport/ImportApi.java @@ -21,6 +21,7 @@ import neatlogic.framework.common.constvalue.ApiParamType; import neatlogic.framework.exception.file.FileNotUploadException; import neatlogic.framework.importexport.core.ImportExportHandlerFactory; import neatlogic.framework.importexport.dto.ImportDependencyTypeVo; +import neatlogic.framework.importexport.exception.DependencyNotFoundException; import neatlogic.framework.restful.annotation.*; import neatlogic.framework.restful.constvalue.OperationTypeEnum; import neatlogic.framework.restful.core.privateapi.PrivateBinaryStreamApiComponentBase; @@ -74,7 +75,13 @@ public class ImportApi extends PrivateBinaryStreamApiComponentBase { if (multipartFile != null) { String targetType = paramObj.getString("targetType"); String userSelection = paramObj.getString("userSelection"); - return ImportExportHandlerFactory.importData(multipartFile, targetType, userSelection); + try { + return ImportExportHandlerFactory.importData(multipartFile, targetType, userSelection); + } catch (DependencyNotFoundException e) { + JSONObject resultObj = new JSONObject(); + resultObj.put("messageList", e.getMessageList()); + return resultObj; + } } return null; } -- Gitee