From a3a5db87cd11f10efd42eee49e7977c5360e1b55 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期三, 06 八月 2025 15:11:51 +0800 Subject: [PATCH] 首检巡检,入库检验 --- MES.Service/service/QC/XJService.cs | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/MES.Service/service/QC/XJService.cs b/MES.Service/service/QC/XJService.cs index 9ed2beb..52fe9bc 100644 --- a/MES.Service/service/QC/XJService.cs +++ b/MES.Service/service/QC/XJService.cs @@ -3,6 +3,7 @@ using MES.Service.Modes; using MES.Service.util; using SqlSugar; +using static Microsoft.EntityFrameworkCore.DbLoggerCategory; namespace MES.Service.service.QC; @@ -106,18 +107,20 @@ }).ToList(); } - public List<QsQaItemXj> getPage(XJPageResult queryObj) + public (List<QsQaItemXj> items, int totalCount) getPage(XJPageResult queryObj) { var db = SqlSugarHelper.GetInstance(); + + int totalCount = 0; var id = Convert.ToDecimal(queryObj.id); string[]? lineNo = null; - if (StringUtil.IsNotNullOrEmpty(queryObj.createUser)) - lineNo = _baseService.getUserLineNo(queryObj.createUser); + //if (StringUtil.IsNotNullOrEmpty(queryObj.createUser)) + // lineNo = _baseService.getUserLineNo(queryObj.createUser); - return db + var query= db .Queryable<QsQaItemXj, Womdaa, MesLine, MesItems>((s, a, c, b) => new JoinQueryInfos( @@ -126,8 +129,8 @@ JoinType.Left, s.ItemId == b.Id ) ) - .WhereIF(lineNo != null && lineNo.Length > 0, - (s, a, c, b) => lineNo.Contains(c.LineNo)) + //.WhereIF(lineNo != null && lineNo.Length > 0, + // (s, a, c, b) => lineNo.Contains(c.LineNo)) .WhereIF( StringUtil.IsNotNullOrEmpty(queryObj.result) && "鏈畬鎴�".Equals(queryObj.result), @@ -152,8 +155,10 @@ FcheckBy = s.FcheckBy, FcheckResu = s.FcheckResu, Remarks = s.Remarks - }).OrderBy(s => s.CreateDate, OrderByType.Desc) - .ToPageList(queryObj.PageIndex, queryObj.Limit); + }).OrderBy(s => s.CreateDate, OrderByType.Desc); + var items = query.ToPageList(queryObj.PageIndex, queryObj.Limit,ref totalCount); + + return (items, totalCount); } -- Gitblit v1.9.3