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;