diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs index 8f26b8f7..447aec69 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs @@ -102,7 +102,7 @@ namespace DS.WMS.Core.Sys.Method { if (req.Id == 0) { - if (db.Queryable().Where(x => x.TemplateCode == req.TemplateCode).WhereIF(req.CarrierId != 0, x => x.CarrierId == req.CarrierId).Any()) + if (db.Queryable().Where(x => x.TemplateCode == req.TemplateCode && x.TemplateName == req.TemplateName).WhereIF(req.CarrierId != 0, x => x.CarrierId == req.CarrierId).Any()) { return await Task.FromResult(DataResult.Failed("打印模板唯一编码已存在!")); }