From 848705d4d4ccbf1d694524719fc02a827ab13406 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 25 四月 2025 15:40:26 +0800
Subject: [PATCH] 1.携客云helper优化 2.更新不合格描述字段调整

---
 service/QC/IpqcService.cs |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/service/QC/IpqcService.cs b/service/QC/IpqcService.cs
index d238f10..15b90d9 100644
--- a/service/QC/IpqcService.cs
+++ b/service/QC/IpqcService.cs
@@ -110,4 +110,36 @@
             }).OrderBy(a => a.Order)
             .ToList();
     }
+
+
+    public (List<VIpqcXj> item, int TotalCount) getPageXj(XJPageResult queryObj)
+    {
+        var parsedGuid = Guid.Empty;
+        if (!queryObj.id.IsNullOrEmpty())
+        {
+            var isValid = Guid.TryParse(queryObj.id, out parsedGuid);
+            if (!isValid)
+                throw new ApplicationException("GUID杞崲閿欒");
+        }
+
+
+        var totalCount = 0;
+
+        var pageList = Db.Queryable<VIpqcXj>()
+            .WhereIF(!string.IsNullOrWhiteSpace(queryObj.keyword), a =>
+                a.ItemNo.Contains(queryObj.keyword) ||
+                a.ItemName.Contains(queryObj.keyword) ||
+                a.Daa001.Contains(queryObj.keyword) ||
+                a.ReleaseNo.Contains(queryObj.keyword) ||
+                a.DepartmentName.Contains(queryObj.keyword) ||
+                a.xtName.Contains(queryObj.keyword)
+            )
+            .WhereIF(UtilityHelper.CheckGuid(parsedGuid),
+                a => a.Guid == parsedGuid.ToString())
+            .Where(a => (a.FSubmit ?? 0) == 0)
+            .OrderByDescending(a => a.CreateDate)
+            .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount);
+
+        return (pageList, totalCount);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3