From 7ee2e58c300374a15c212f9145ba9d762d64e0e6 Mon Sep 17 00:00:00 2001
From: fcx <2246384483@qq.com>
Date: 星期六, 20 十二月 2025 15:58:11 +0800
Subject: [PATCH] 1.新增MES_PROJECT.cs
---
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