wtt
2024-11-28 957b51cfdeb4374d817086a2ca761c75545e206d
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Sc_WorkDemandPlanBillController.cs
@@ -27,6 +27,7 @@
        {
            try
            {
                List<object> A = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Sc_WorkDemandPlanBill_Query", 1, false, user))
                {
@@ -38,11 +39,18 @@
                }
                ds = oCN.RunProcReturn("select * from  h_v_JIT_Sc_WorkDemandPlanBillList where 1=1" + sWhere + "order by hmainid desc ", "h_v_JIT_Sc_WorkDemandPlanBillList");
                foreach (DataColumn col in ds.Tables[0].Columns)//遍历ds中第一个表(Tables[0])的所有列(Columns)每次循环中,col变量会持有当前列的引用
                {
                    Type dataType = col.DataType; //获取当前数据类型传入 è‡ªå®šä¹‰å˜é‡datadataType
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //字符串拼接         // å°†åˆ—名和数据类型信息拼接成一个JSON格式的字符串
                    A.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = A;
                return objJsonResult;
            }
            catch (Exception e)