yukang.wu 1 anno fa
parent
commit
2c6c80ad1e
1 ha cambiato i file con 1 aggiunte e 16 eliminazioni
  1. 1 16
      Ys.Scada.Backend/Controllers/DataSourceController.cs

+ 1 - 16
Ys.Scada.Backend/Controllers/DataSourceController.cs

@@ -79,7 +79,7 @@ namespace Ys.Scada.Backend.Controllers
                 _fsql.Delete<DataSource>()
                    .Where(o => o.Id == id && o.DocId == docId)
                    .ExecuteAffrows();
-                _fsql.Delete<Variable>().Where(o => o.SourceId == id && o.DocId == docId);
+                _fsql.Delete<Variable>().Where(o => o.SourceId == id && o.DocId == docId).ExecuteAffrows();
             });
             return OK();
         }
@@ -145,21 +145,6 @@ namespace Ys.Scada.Backend.Controllers
         {
             return OK(_manager.GetTagsData());
         }
-        //[HttpPost("save")]
-        //public async Task<JsonResult> AddOrUpdate(DataSourceModel dataSourceModel)
-        //{
-        //    Check.NotNull(dataSourceModel);
-        //    var entity = _mapper.Map<DataSource>(dataSourceModel);
-        //    if (entity.Id > 0)
-        //    {
-        //        await _fsql.Update<DataSource>().SetSource(entity)
-        //            .IgnoreColumns(o => new { o.Id })
-        //            .ExecuteAffrowsAsync();
-        //        return OK(dataSourceModel);
-        //    }
-        //    dataSourceModel.Id = (int)(await _fsql.Insert(entity).ExecuteIdentityAsync());
-        //    return OK(dataSourceModel);
-        //}
         /// <summary>
         /// 测试数据源是否能联通(不拉取实时数据),返回非200表示连接错误
         /// 这里有个逻辑问题,是先保存才能测试还是先测试再保存