From 5c2991456d91a0fd236452bec2581ca50f9a48e2 Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期五, 21 二月 2025 14:53:01 +0800 Subject: [PATCH] Llj接口添加CreateUserName字段返回 --- StandardPda/MES.Service/service/QC/LljService.cs | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/StandardPda/MES.Service/service/QC/LljService.cs b/StandardPda/MES.Service/service/QC/LljService.cs index 5e571dc..e0dda16 100644 --- a/StandardPda/MES.Service/service/QC/LljService.cs +++ b/StandardPda/MES.Service/service/QC/LljService.cs @@ -27,20 +27,31 @@ var itemIds = GetQaItem(db, queryObj.createUser); - var pageList = db.Queryable<LtsLlj>() + var pageList = db.Queryable<LtsLlj, IqcBefore, SysUser, VMesQaItemsDetect01, SysUser>((a, b, c,d,e) => + new JoinQueryInfos(JoinType.Left, a.ItemId == b.ItemId, + JoinType.Left, b.Sid == c.Fid, + JoinType.Inner, a.Id == d.Id, + JoinType.Left, a.CreateBy == e.Fcode + )) .WhereIF( StringUtil.IsNotNullOrEmpty(queryObj.result) && "鏈畬鎴�".Equals(queryObj.result), - a => a.FcheckResu == null) + (a, b, c) => a.FcheckResu == null ) .WhereIF( StringUtil.IsNotNullOrEmpty(queryObj.result) && !"鏈畬鎴�".Equals(queryObj.result), - a => a.FcheckResu != null) + (a, b, c) => a.FcheckResu != null) .WhereIF( itemIds is { Length: > 0 }, - a => itemIds.Contains(a.ItemId)) - .WhereIF(id > 0, a => a.Id == id) - .OrderByDescending(a => a.Id) + (a, b, c) => itemIds.Contains(a.ItemId)) + .WhereIF(id > 0, (a, b, c) => a.Id == id) + .OrderByDescending((a, b, c) => a.Id) + .Select((a, b, c, d,e) => new LtsLlj + { + UserName = c.Fname, + FIRST=d.First, + CreateUserName=e.Fname + }, true) .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount); return (pageList, totalCount); -- Gitblit v1.9.3