yusijie
2022-12-07 54c10168f9082762cb3ff02cde879a6c2d73f9b5
WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs
@@ -79,6 +79,7 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Gy_WorkCenter", 1, false, user))
                {
@@ -91,10 +92,19 @@
                ds = oCN.RunProcReturn("select * from h_v_WorkCenterList where 1 = 1 " + sWhere + " order by 工作中心代码 ", "h_v_WorkCenterList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)