From c5f74c8471358dbfb6977f4d9d392b656c31a16a Mon Sep 17 00:00:00 2001
From: hao <1836460075@qq.com>
Date: 星期四, 17 七月 2025 17:26:29 +0800
Subject: [PATCH] 购销销售订单,采购订单关联

---
 StandardInterface/MES.Service/service/QC/LljService.cs |   39 ++++++++++++++++++++++++++++-----------
 1 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/StandardInterface/MES.Service/service/QC/LljService.cs b/StandardInterface/MES.Service/service/QC/LljService.cs
index b7a7f6f..6a7e76f 100644
--- a/StandardInterface/MES.Service/service/QC/LljService.cs
+++ b/StandardInterface/MES.Service/service/QC/LljService.cs
@@ -65,17 +65,9 @@
                         .Contains(queryObj.SearchValue.ToLower())
                      || a.ItemModel.ToLower()
                         .Contains(queryObj.SearchValue.ToLower()))
-          //  .OrderByDescending((a, b,
-            .OrderBy ((a, b,
-                    e, f, g, i) => a.Id)
-            //.Select((a, b,
-            //        e, f, g, i) => new LtsLlj
-            //        {
-            //            //UserName = g.Fname,
-            //            //UserName = (i.Fname!=null ||i.Fname!="") ? i.Fname : g.Fname,
-            //            UserName = i.Fname != null || i.Fname != "" ? i.Fname : g.Fname,
-            //            CreateUserName = e.Fname
-            //        }, true)
+            //  .OrderByDescending((a, b,
+
+            .OrderBy("CASE WHEN a.STATUS = '宸叉彁浜�' THEN 0 ELSE 1 END, a.IQC_DATE desc, a.ID asc")
             .ToPageList(queryObj.PageIndex, queryObj.Limit, ref totalCount); 
 
         var emergencyValues = pageList.Select(item => item.EMERGENCY).ToList(); 
@@ -319,6 +311,31 @@
         return input.Substring(startIndex + 1, length);
     }
 
+    public List<QamftpDto> GetAttachments(string releaseNo)
+    {
+        var db = SqlSugarHelper.GetInstance();
+        return db.Queryable<MesQamftp>()
+            .Where(x => x.ReleaseNo == releaseNo)
+            .OrderBy(x => x.Fdate, OrderByType.Desc)
+            .Select(x => new QamftpDto
+            {
+                Id = x.Id,
+                ItemNo = x.ItemNo,
+                Ftype = x.Ftype,
+                Fattach = x.Fattach,
+                Fversion = x.Fversion,
+                Fdate = x.Fdate,
+                CreateBy = x.CreateBy,
+                CreateDate = x.CreateDate,
+                Company = x.Company,
+                Factory = x.Factory,
+                ReleaseNo = x.ReleaseNo,
+                F_type = x.F_type,
+                LastupdateBy = x.LastupdateBy,
+                LastupdateDate = x.LastupdateDate,
+                ItemId = x.ItemId
+            }).ToList();
+    }
     public int saveItem(LLJDto rkjDto)
     {
         var items = rkjDto.items;

--
Gitblit v1.9.3