From ca3b27fbcac4b932afa49675e99e79e70e4d5524 Mon Sep 17 00:00:00 2001 From: cjy Date: Thu, 26 Sep 2024 18:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs | 4 ++++ .../DS.WMS.MainApi/Controllers/PrintTemplateController.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 447aec69..6d337931 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/SysPrintTemplateService.cs @@ -40,6 +40,10 @@ namespace DS.WMS.Core.Sys.Method var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); var data = db.Queryable() .Select() + .Mapper(it => + { + it.TemplateCount = db.Queryable().Where(x => x.ModuleId == it.Id && x.Disable == false).Count(); + }) .Where(whereList).ToQueryPage(request.PageCondition); return data; } diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/PrintTemplateController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/PrintTemplateController.cs index 38d2c907..917f7fff 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/PrintTemplateController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/PrintTemplateController.cs @@ -31,7 +31,7 @@ public class PrintTemplateController : ApiController /// [HttpPost] [Route("GetPrintModuleList")] - public DataResult> GetPrintTemplateList([FromBody] PageRequest request) + public DataResult> GetPrintModuleList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res;