From 148e3eea1fea2d45ab135c6e66e69d163a4dd811 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期五, 28 二月 2025 16:19:53 +0800
Subject: [PATCH] 代码提交

---
 StandardPda/MES.Service/service/BasicData/MesProjectManager.cs |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/StandardPda/MES.Service/service/BasicData/MesProjectManager.cs b/StandardPda/MES.Service/service/BasicData/MesProjectManager.cs
index 58bc851..865a836 100644
--- a/StandardPda/MES.Service/service/BasicData/MesProjectManager.cs
+++ b/StandardPda/MES.Service/service/BasicData/MesProjectManager.cs
@@ -1,6 +1,7 @@
 锘縰sing MES.Service.DB;
 using MES.Service.Dto.webApi;
 using MES.Service.Modes;
+using MES.Service.util;
 using SqlSugar;
 
 namespace MES.Service.service.BasicData;
@@ -115,6 +116,8 @@
             }
             else
             {
+                mesId = GetSeqUtil.GetSeq("SEQ_ID");
+
                 var entity = new MesLinkU9
                 {
                     CreateDate = DateTime.Now,
@@ -123,7 +126,8 @@
                     OrgId = se.FUseOrgId,
                     TableType = "MES_PROJECT"
                 };
-                mesId = Db.Insertable(entity).ExecuteReturnIdentity();
+                Db.Insertable(entity).ExecuteCommand();
+                // Db.Insertable(entity).ExecuteReturnIdentity();
             }
 
             var mesSupplier = new MesProject
@@ -136,7 +140,7 @@
                 OperatorsId = supplier.OperatorsID,
                 DocumentStatus = supplier.FDocumentStatus,
                 ForbidStatus = supplier.FForbidStatus,
-                UseOrgId = se.FUseOrgId,
+                UseOrgId = se.FUseOrgId
             };
 
             list.Add(mesSupplier);
@@ -148,8 +152,9 @@
     private bool InsertOrUpdate(SqlSugarScope db, List<MesProject> entity)
     {
         DeleteSupplier(entity);
-        
-        var insert = db.Insertable(entity).ExecuteCommand();
+
+        var insert = db.Insertable(entity).PageSize(1).IgnoreColumnsNull()
+            .ExecuteCommand();
         return insert > 0;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3