sjz
2 天以前 5de35354e8dfcb4933350d0d1b645d400bcf23ab
MES.Service/service/BasicData/MesDepotsManager.cs
@@ -53,10 +53,10 @@
    // 插入新仓库的方法
    private bool InsertDepot(SqlSugarScope db, MesDepots entity)
    {
        var exists = db.Queryable<MesDepots>().Any(e => e.DepotId == entity.DepotId);
        var exists = db.Queryable<MesDepots>().Any(e => e.DepotId == entity.DepotId && e.DepotCode == entity.DepotCode);
        if (exists)
        {
            var result = db.Updateable(entity).ExecuteCommand();
            var result = db.Updateable(entity).Where(e => e.DepotId == entity.DepotId && e.DepotCode == entity.DepotCode).ExecuteCommand();
            return true;
        }
        else
@@ -76,10 +76,10 @@
    // 插入或更新仓库的方法
    private bool InsertOrUpdate(SqlSugarScope db, MesDepots entity)
    {
        var exists = db.Queryable<MesDepots>().Any(e => e.DepotId == entity.DepotId);
        var exists = db.Queryable<MesDepots>().Any(e => e.DepotId == entity.DepotId && e.DepotCode == entity.DepotCode);
        if (exists)
        {
            var update = db.Updateable(entity).ExecuteCommand();
            var update = db.Updateable(entity).Where(e => e.DepotId == entity.DepotId && e.DepotCode == entity.DepotCode).ExecuteCommand();
            return true;
        }
        else