From 04c86459ab6b656ea7d121e924d8d28ca96ac117 Mon Sep 17 00:00:00 2001
From: zyf <1071160500@qq.com>
Date: 星期四, 20 三月 2025 18:34:54 +0800
Subject: [PATCH] 人员表bug修复

---
 MES.Service/service/QC/RKJService.cs |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/MES.Service/service/QC/RKJService.cs b/MES.Service/service/QC/RKJService.cs
index a72684a..a2749ff 100644
--- a/MES.Service/service/QC/RKJService.cs
+++ b/MES.Service/service/QC/RKJService.cs
@@ -57,11 +57,10 @@
     public List<RkDaa002> GetDaa001s(string lineNo)
     {
         var db = SqlSugarHelper.GetInstance();
-        // return db.Queryable<RKJDaa001>()
-        //     .Where(t => t.LineNo == lineNo)
-        //     .OrderBy(t => t.BillNo, OrderByType.Desc)
-        //     .ToList();
-        return null;
+        return db.Queryable<RkDaa002>()
+            .Where(t => lineNo.Contains(t.Daa020))
+            .OrderBy(t => t.BillNo, OrderByType.Desc)
+            .ToList();
     }
 
     //鏍规嵁妫�楠屾爣鍑嗘潵璁$畻妫�楠屼釜鏁�
@@ -600,8 +599,8 @@
 
         var qsItemOqcReqs = db
             .Queryable<QsItemOqcReq, MesItems, MesInvItemIns, MesInvTransaction,
-                RKJDaa001, Womdaa, VLineUser>(
-                (a, b, c, ca, m, da, z) => new JoinQueryInfos(
+                RKJDaa001, Womdaa, VLineUser,MesDeptUser>(
+                (a, b, c, ca, m, da, z,d) => new JoinQueryInfos(
                     JoinType.Left, a.ItemNo == b.ItemNo,
                     JoinType.Left, a.BillNo == c.BillNo,
                     JoinType.Left,
@@ -610,25 +609,32 @@
                     c.Factory == ca.Factory,
                     JoinType.Left, c.Id == m.ItemInId && a.ItemNo == m.ItemNo,
                     JoinType.Left, da.Daa001 == c.RbillNo,
-                    JoinType.Left, da.Daa015 == z.LineNo
+                    JoinType.Left, da.Daa015 == z.LineNo,
+                    JoinType.Left,c.Bgr == d.UserNo
                 ))
             // .WhereIF(lineNo != null && lineNo.Length > 0,
             //     (a, b, c, ca, m, da) => lineNo.Contains(da.Daa015))
             .WhereIF(!"PL017".Equals(queryObj.createUser),
-                (a, b, c, ca, m, da, z) => lineNo.Contains(da.Daa015))
+                (a, b, c, ca, m, da, z,d) => lineNo.Contains(da.Daa015))
             .WhereIF(!string.IsNullOrEmpty(queryObj.id),
-                (a, b, c, ca, m, da, z) => a.Id.ToString() == queryObj.id)
+                (a, b, c, ca, m, da, z,d) => a.Id.ToString() == queryObj.id)
             .WhereIF(
                 StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                 "鏈畬鎴�".Equals(queryObj.result),
-                (a, b, c, ca, m, da, z) => a.FcheckResu == null)
+                (a, b, c, ca, m, da, z,d) => a.FcheckResu == null)
             .WhereIF(
                 StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                 !"鏈畬鎴�".Equals(queryObj.result),
-                (a, b, c, ca, m, da, z) => a.FcheckResu != null)
-            .Select((a, b, c, ca, m, da, z) => new QsItemOqcReq
+                (a, b, c, ca, m, da, z,d) => a.FcheckResu != null)
+            //鍔犵瓫閫夋潯浠�,鏍规嵁渚涘簲鍟嗭紝鐗╂枡缂栫爜锛岀墿鏂欏悕绉版悳绱�
+            //.WhereIF(queryObj.SearchValue!=null && queryObj.SearchValue!="", (a) => a.SuppName == queryObj.SearchValue|| a.ItemName == queryObj.SearchValue || a.ItemNo == queryObj.SearchValue )
+            .WhereIF(queryObj.SearchValue != null && queryObj.SearchValue != "",
+            (a, b, c, ca, m, da, z, d) => b.ItemName.ToLower().Contains(queryObj.SearchValue.ToLower())
+            || a.ItemNo.ToLower().Contains(queryObj.SearchValue.ToLower()))
+            .Select((a, b, c, ca, m, da, z,d) => new QsItemOqcReq
             {
                 BillNo = a.BillNo,
+                Fsubmit = a.Fsubmit,
                 Remarks = a.Remarks,
                 Id = a.Id,
                 CreateDate = a.CreateDate,
@@ -645,7 +651,7 @@
                 Daa015 = da.Daa015,
                 LineNo = c.LineNo,
                 Quantity = m.Quantity,
-                Bgr = c.Bgr
+                Bgr = d.UserName
             })
             .OrderBy(a => a.CreateDate, OrderByType.Desc)
             .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount);

--
Gitblit v1.9.3