From 09302ffd04018e5b6958f2a44871980b1bbc454b Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 17 七月 2023 09:59:47 +0800 Subject: [PATCH] 项目管理:数据关联、 项目工程:下推(阶段汇报)、下推(任务汇报) --- WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" index a32cf79..2aadcfc 100644 --- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" +++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" @@ -938,5 +938,113 @@ } } #endregion + + #region 宸ョ▼椤圭洰 涓嬫帹(闃舵姹囨姤)-椤甸潰鏄剧ず + [Route("PM_ProjectBill/set_ProjectReport")] + [HttpGet] + public object ProjectBill_ProjectReport(string HInterID, string HProjectStageID, string user) + { + try + { + List<object> columnNameList = new List<object>(); + List<DataTable> tables = new List<DataTable>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //鑾峰彇琛ㄥご淇℃伅 + string sql = "exec h_p_PM_ProjectBill_setProjectReport " + HInterID + "," + HProjectStageID; + ds = oCN.RunProcReturn(sql, "h_p_PM_ProjectBill_setProjectReport"); + tables.Add(ds.Tables[0]); + tables.Add(ds.Tables[1]); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀵瑰簲椤圭洰闃舵涓嶅瓨鍦紒"; + objJsonResult.data = null; + return objJsonResult; + } + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[1].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = tables; + 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 + + #region 宸ョ▼椤圭洰 涓嬫帹(浠诲姟姹囨姤)-椤甸潰鏄剧ず + [Route("PM_ProjectBill/set_WorkTaskReport")] + [HttpGet] + public object ProjectBill_WorkTaskReport(string HInterID, string HProjectStageID, string user) + { + try + { + List<object> columnNameList = new List<object>(); + List<DataTable> tables = new List<DataTable>(); + //鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //鑾峰彇琛ㄥご淇℃伅 + string sql = "exec h_p_PM_ProjectBill_setWorkTaskReport " + HInterID + "," + HProjectStageID; + ds = oCN.RunProcReturn(sql, "h_p_PM_ProjectBill_setWorkTaskReport"); + tables.Add(ds.Tables[0]); + tables.Add(ds.Tables[1]); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[1].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = tables; + 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 } } \ No newline at end of file -- Gitblit v1.9.1