zrg
2024-04-19 52c55f711937ba38c8bf2d45dc8333bb45ed796b
WebAPI/Controllers/BaseSet/Gy_ConkTypeController.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -19,7 +20,7 @@
        DataSet ds;
        /// <summary>
        /// 返回仓库列表
        /// 返回故障类别列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
@@ -29,6 +30,7 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //编辑权限
                //if (!DBUtility.ClsPub.Security_Log_second("Gy_ConkType", 1, false, user))
                //{
@@ -49,11 +51,19 @@
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_ConkTypeList");
                }
                //添加列名
                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)