啊鑫
2024-10-23 77a6ef8c94bd440919e4b925485215ae92190d81
MES.Service/service/BasicData/MesCustomerManager.cs
@@ -139,7 +139,8 @@
            LastupdateDate = DateTime.Now,
            Company = "1000",
            Factory = "1000",
            DataType = customer.FDocumentStatus
            DataType = customer.FDocumentStatus,
            Type = customer.Type
        };
    }
@@ -186,19 +187,12 @@
        var insert = db.Insertable(entity).ExecuteCommand();
        if (insert > 0)
            return true;
        return false;
        return insert > 0;
    }
    private bool InsertOrUpdateBatch(SqlSugarScope db,
        List<MesCustomer> customerList)
    {
        foreach (var entity in customerList)
            if (!InsertOrUpdate(db, entity))
                return false;
        return true;
        return customerList.All(entity => InsertOrUpdate(db, entity));
    }
}