From d599adc3a8b17c9d3b4af1018016e34ffb5b2ff5 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 17 Jul 2023 17:07:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E6=96=99=E8=B7=AF?= =?UTF-8?q?=E7=BA=BF=E4=B8=AD=EF=BC=8C=E7=89=A9=E6=96=99=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=97=B6=E9=80=BB=E8=BE=91=20=E5=B0=86?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=A7=86=E5=9B=BE=E4=B8=AD=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=8C=89=E7=85=A7=E7=89=A9=E6=96=99=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E5=AD=98=E5=9C=A8=E7=9A=84=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/MaterialTeamworkController.cs | 3 ++- FactorySystemApi/Web.config | 4 ++-- FactorySystemBll/MaterialTeamworkBll.cs | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) 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; + } + /// /// 获取视图 ///