From a5019b475f8620dba3b495da983f4db9e32f7ca8 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期四, 10 七月 2025 08:18:36 +0800
Subject: [PATCH] AOI

---
 MES.Service/service/QC/XJService.cs |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/MES.Service/service/QC/XJService.cs b/MES.Service/service/QC/XJService.cs
index cc2ff82..5bac98e 100644
--- a/MES.Service/service/QC/XJService.cs
+++ b/MES.Service/service/QC/XJService.cs
@@ -61,7 +61,8 @@
                              a.Daa018 != "瀹屽伐")
             .GroupBy((a, b) => new
             {
-                b.LineNo, b.LineName
+                b.LineNo,
+                b.LineName
             })
             .Select((a, b) => new MesLine
             {
@@ -137,6 +138,7 @@
                 !"鏈畬鎴�".Equals(queryObj.result),
                 (s, a, c, b) => s.FcheckResu != null)
             .WhereIF(id > 0, (s, a, c, b) => s.Id == id)
+            //.WhereIF(queryObj.Comments != null, (s, a, c, b) => s.Comments == queryObj.Comments)
             .Select((s, a, c, b) => new QsQaItemXj
             {
                 Daa020 = c.LineNo,
@@ -151,25 +153,24 @@
                 ItemModel = b.ItemModel,
                 FcheckBy = s.FcheckBy,
                 FcheckResu = s.FcheckResu,
-                Remarks = s.Remarks
+                Remarks = s.Remarks,
+                Comments = s.Comments
             }).OrderBy(s => s.CreateDate, OrderByType.Desc)
             .ToPageList(queryObj.PageIndex, queryObj.Limit);
     }
 
 
-    public List<QsQaItemXj01> setJYItem(decimal itemId)
+    public List<QsQaItemXj01> setJYItem(string itemNo)
     {
         var db = SqlSugarHelper.GetInstance();
 
-        var count = db.Queryable<MesQa>().Where(s => s.QsType == "2"
-            && s.ItemId == itemId && s.Fsubmit == 1).Count();
+        var count = db.Queryable<MesQa>().Where(s => s.QsType == "2" && s.ItemNo == itemNo && s.Fsubmit == 1).Count();
 
         if (count <= 0) return new List<QsQaItemXj01>();
 
         return db
             .Queryable<MesQualityStandard>()
-            .Where(b => b.QsType == "2"
-                        && b.ItemId == itemId).Select(
+            .Where(b => b.QsType == "2" && b.ItemNo == itemNo).Select(
                 b => new QsQaItemXj01
                 {
                     ProjName = b.ProjName,
@@ -503,6 +504,19 @@
         });
     }
 
+
+    public int saveCommentGid(XJDto dto)
+    {
+        return SqlSugarHelper.UseTransactionWithOracle(db =>
+        {
+            return db.Updateable<QsQaItemXj>()
+                .SetColumns(it =>
+                    it.Comments == dto.Comments) //SetColumns鏄彲浠ュ彔鍔犵殑 鍐�2涓氨2涓瓧娈佃祴鍊�
+                .Where(it => it.Id == dto.gid)
+                .ExecuteCommand();
+        });
+    }
+
     //瀛愯〃淇敼澶囨敞瀛楁
     public int saveRemarksPid(XJDto dto)
     {

--
Gitblit v1.9.3