From eb84e51b45c716e84db471918ddb1d1c41e7673e Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 29 Jul 2024 15:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=8E=A5=E5=8F=A3=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E6=89=93=E5=8D=B0=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.PrintApi/Service/OpenPrintService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs b/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs index 52548a10..ff094572 100644 --- a/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs +++ b/ds-wms-service/DS.WMS.PrintApi/Service/OpenPrintService.cs @@ -26,8 +26,11 @@ namespace DS.WMS.PrintApi.Service if (template.IsUseDataSource) { return await Task.FromResult(PrintDataResult.Failed("非Json打印接口!")); - } - + } + if (String.IsNullOrEmpty(template.PrintJsonContent)) + { + return await Task.FromResult(PrintDataResult.Failed("打印模板内容不能为空!")); + } try { var basePath = String.Empty; @@ -114,7 +117,10 @@ namespace DS.WMS.PrintApi.Service { return await Task.FromResult(PrintDataResult.Failed("非Json打印接口!")); } - + if (String.IsNullOrEmpty(template.PrintJsonContent)) + { + return await Task.FromResult(PrintDataResult.Failed("打印模板内容不能为空!")); + } try { var basePath = String.Empty;