11
啊鑫
2025-03-01 03c89cb192a63a5d6b4725e68c90a7e4c92e074e
StandardPda/MES.Service/service/BasicData/MesProjectManager.cs
@@ -1,6 +1,7 @@
using 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;
    }
}