diff --git a/FactorySystemApi/Controllers/MaterialTeamworkController.cs b/FactorySystemApi/Controllers/MaterialTeamworkController.cs index 6f428fe..4fcb56d 100644 --- a/FactorySystemApi/Controllers/MaterialTeamworkController.cs +++ b/FactorySystemApi/Controllers/MaterialTeamworkController.cs @@ -246,7 +246,8 @@ namespace FactorySystemApi.Controllers columns = MaterialTeamworkBll.GetColumns(), rows = MaterialTeamworkBll.GetMaterialViewsByTeamId(teamId, teamWorkType, teamType, user.FID, true, out List materialId), infos = MaterialTeamworkBll.GetMaterialInfoList(materialId, user.FID), - types = MaterialTeamworkBll.GetMaterialTypeList() + types = MaterialTeamworkBll.GetMaterialTypeList(), + viewCols = MaterialTeamworkBll.GetViewColumns() }; } diff --git a/FactorySystemApi/Web.config b/FactorySystemApi/Web.config index 817139d..118d3cc 100644 --- a/FactorySystemApi/Web.config +++ b/FactorySystemApi/Web.config @@ -12,8 +12,8 @@ - - + + diff --git a/FactorySystemBll/MaterialTeamworkBll.cs b/FactorySystemBll/MaterialTeamworkBll.cs index 79655c6..e462150 100644 --- a/FactorySystemBll/MaterialTeamworkBll.cs +++ b/FactorySystemBll/MaterialTeamworkBll.cs @@ -76,6 +76,22 @@ namespace FactorySystemBll return dicList; } + public string GetViewColumns() + { + string cols = ""; + string sql = "SELECT COLUMN_NAME FROM information_schema.columns where table_name = 'TFS_ViewMaterial'"; + var db = AppSettingsHelper.GetSqlSugar(); + + DataTable table = db.Ado.GetDataTable(sql); + + foreach (DataRow row in table.Rows) + { + cols = cols + row[0].ToString() + ","; + } + + return cols; + } + /// /// 获取视图 ///