From 26bccee691f9144e40a32c8a036d779a2d7bf01b Mon Sep 17 00:00:00 2001
From: zyf <1071160500@qq.com>
Date: 星期一, 25 八月 2025 20:00:08 +0800
Subject: [PATCH] 平板入库检、巡检、首检新增销售订单号字段

---
 MESApplication/bin/Debug/net8.0/MESApplication.pdb |    0 
 MESApplication/bin/Debug/net8.0/MESApplication.exe |    0 
 MES.Service/service/QC/XJService.cs                |   12 +++++++-----
 MESApplication/bin/Debug/net8.0/MES.Service.pdb    |    0 
 MESApplication/bin/Debug/net8.0/MESApplication.dll |    0 
 MES.Service/bin/Debug/net8.0/MES.Service.dll       |    0 
 MES.Service/service/QC/SJService.cs                |   35 ++++++++++++++++++++++++++++++++++-
 MES.Service/Modes/QsQaItemXj.cs                    |    1 +
 MESApplication/bin/Debug/net8.0/MES.Service.dll    |    0 
 MES.Service/Dto/service/SJPageResult.cs            |    3 +++
 MES.Service/bin/Debug/net8.0/MES.Service.pdb       |    0 
 11 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/MES.Service/Dto/service/SJPageResult.cs b/MES.Service/Dto/service/SJPageResult.cs
index f48f3af..a8f8e48 100644
--- a/MES.Service/Dto/service/SJPageResult.cs
+++ b/MES.Service/Dto/service/SJPageResult.cs
@@ -106,4 +106,7 @@
     /// </summary>
     [SugarColumn(ColumnName = "LINE_NAME")]
     public string? LineName { get; set; }
+
+    //閿�鍞鍗曞彿
+    [SugarColumn(IsIgnore = true)] public string? SaleOrder { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/Modes/QsQaItemXj.cs b/MES.Service/Modes/QsQaItemXj.cs
index ac83f3c..0b9a227 100644
--- a/MES.Service/Modes/QsQaItemXj.cs
+++ b/MES.Service/Modes/QsQaItemXj.cs
@@ -136,4 +136,5 @@
     [SugarColumn(IsIgnore = true)] public string? ItemModel { get; set; }
     [SugarColumn(IsIgnore = true)] public string? LineName { get; set; }
     [SugarColumn(IsIgnore = true)] public string? CreateUser { get; set; }
+    [SugarColumn(IsIgnore = true)] public string? SaleOrder { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll
index 2b2aec1..dd9d856 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.pdb b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
index 99c10ba..8c187e9 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/service/QC/SJService.cs b/MES.Service/service/QC/SJService.cs
index c139b94..6703a62 100644
--- a/MES.Service/service/QC/SJService.cs
+++ b/MES.Service/service/QC/SJService.cs
@@ -48,7 +48,12 @@
         //if (StringUtil.IsNotNullOrEmpty(queryObj.StatusUser))
         //    lineNo = _baseService.getUserLineNo(queryObj.StatusUser);
 
-        var data = db.Queryable<SJPageResult>()
+        var data = db.Queryable<SJPageResult, Womdaa, Womcaa> ((a,
+                    da,ca) =>
+                new JoinQueryInfos(
+                    JoinType.Left, Convert.ToDecimal(a.Pbaid) == da.Id, // 鍏宠仈宸ュ崟淇℃伅
+                    JoinType.Left, da.Daa021 == ca.Caa020//浠诲姟鍗曪紝鐢ㄤ簬鏌ヨ閿�鍞鍗曞彿
+                ))
             //.WhereIF(lineNo != null && lineNo.Length > 0,
             //    a => lineNo.Contains(a.line))
             .WhereIF(queryObj.Id != null, a => a.Id == queryObj.Id)
@@ -62,6 +67,34 @@
                 StringUtil.IsNotNullOrEmpty(queryObj.Result) &&
                 !"鏈畬鎴�".Equals(queryObj.Result),
                 a => a.FSubmit == "1")
+            .Select((a, da, ca) => new SJPageResult
+            {
+                Id = a.Id,
+                BillNo = a.BillNo,
+                StatusDate = a.StatusDate,
+                FName = a.FName,
+                Result = a.Result,
+                FSubmit = a.FSubmit,
+                FSubmitBy = a.FSubmitBy,
+                FSubmitDate = a.FSubmitDate,
+                MoidNum = a.MoidNum,
+                StatusUser = a.StatusUser,
+                Pbaid = a.Pbaid,
+                CreateTime = a.CreateTime,
+                Comments = a.Comments,
+                ItemMod = a.ItemMod,
+                ItemNo = a.ItemNo,
+                daa001 = a.daa001,
+                line = a.line,
+                Remarks = a.Remarks,
+                Daa003 = a.Daa003,
+                Daa004 = a.Daa004,
+                Daa008 = a.Daa008,
+                LineName = a.LineName,
+
+                // 鏄犲皠棰濆鐨勫瓧娈碉紙閿�鍞鍗曞彿锛�
+                SaleOrder = ca.Caa015
+            })
             .OrderBy(a => a.CreateTime, OrderByType.Desc);
         var items = data.ToPageList(queryObj.PageIndex, queryObj.Limit,ref totalCount);
 
diff --git a/MES.Service/service/QC/XJService.cs b/MES.Service/service/QC/XJService.cs
index 54a24cd..0ae4b41 100644
--- a/MES.Service/service/QC/XJService.cs
+++ b/MES.Service/service/QC/XJService.cs
@@ -123,12 +123,13 @@
 
         var query = db
             .Queryable<QsQaItemXj, Womdaa, MesLine,
-                MesItems, SysUser>((s, a, c, b, us) =>
+                MesItems, SysUser,Womcaa>((s, a, c, b, us,ca) =>
                 new JoinQueryInfos(
                     JoinType.Inner, s.BillNo == a.Daa001,
                     JoinType.Left, a.Daa015 == c.LineNo,
                     JoinType.Left, s.ItemId == b.Id,
-                    JoinType.Left, us.Fcode == s.CreateBy
+                    JoinType.Left, us.Fcode == s.CreateBy,
+                    JoinType.Left, ca.Caa020 == a.Daa021
                 )
             )
             //.WhereIF(lineNo != null && lineNo.Length > 0,
@@ -142,8 +143,8 @@
                 StringUtil.IsNotNullOrEmpty(queryObj.result) &&
                 !"鏈畬鎴�".Equals(queryObj.result),
                 (s, a, c, b, us) => s.SubmitStatus == 1)
-            .WhereIF(id > 0, (s, a, c, b, us) => s.Id == id)
-            .Select((s, a, c, b, us) => new QsQaItemXj
+            .WhereIF(id > 0, (s, a, c, b, us,ca) => s.Id == id)
+            .Select((s, a, c, b, us,ca) => new QsQaItemXj
             {
                 Daa020 = c.LineNo,
                 Id = s.Id,
@@ -159,7 +160,8 @@
                 ItemModel = b.ItemModel,
                 CheckBy = s.CheckBy,
                 CheckResult = s.CheckResult,
-                Remarks = s.Remarks
+                Remarks = s.Remarks,
+                SaleOrder = ca.Caa015 
             }).OrderBy(s => s.CreateDate, OrderByType.Desc);
         var items = query.ToPageList(queryObj.PageIndex, queryObj.Limit,
             ref totalCount);
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll
index 2b2aec1..dd9d856 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.pdb b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
index 99c10ba..8c187e9 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.dll b/MESApplication/bin/Debug/net8.0/MESApplication.dll
index 7c68080..40507c3 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.exe b/MESApplication/bin/Debug/net8.0/MESApplication.exe
index e14b878..3490f9a 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.pdb b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
index e2b0d71..6c77632 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
Binary files differ

--
Gitblit v1.9.3