From 878317b952c8404a9159f471917590ad85e0a2d7 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期三, 24 一月 2024 09:51:21 +0800 Subject: [PATCH] 我的项目回显 --- WebAPI/Controllers/项目管理/报表分析/PM_ReportController.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/PM_ReportController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/PM_ReportController.cs" index 9ce5acf..4748a1d 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/PM_ReportController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/PM_ReportController.cs" @@ -180,6 +180,66 @@ #endregion + #region 鎴戠殑椤圭洰 鏌ヨ + /// <summary> + /// 鎴戠殑椤圭洰鏌ヨ + /// </summary> + /// <param name="sWhere"></param> + /// <param name="user"></param> + /// <returns></returns> + [Route("PM_ReportController/PM_ProjectBillMYList")] + [HttpGet] + public object PM_ProjectBillMYList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("PM_ProjectBillMainMy_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (sWhere == null || sWhere.Equals("")) + { + ds = oCn.RunProcReturn("select * from h_v_PM_ProjectBillMYList order by 鍗曟嵁鍙� desc", "h_v_PM_ProjectBillMYList"); + } + else + { + string sql1 = "select * from h_v_PM_ProjectBillMYList where 1 = 1 "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; + ds = oCn.RunProcReturn(sql, "h_v_PM_ProjectBillMYList"); + } + + //娣诲姞鍒楀悕 + 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #endregion -- Gitblit v1.9.1