From 5fe0467e751a5138536785212f25b1bd177a526d Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期日, 18 二月 2024 17:28:30 +0800 Subject: [PATCH] 月度阶段计划与工作周总结,编辑回显,审核反审核,关闭,反关闭,查询数据 --- WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 165 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 ce57fc1..5dd1c04 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" @@ -1610,5 +1610,170 @@ } #endregion + #region 鏈堝害闃舵璁″垝鍒楄〃 鏌ヨ + /// <summary> + /// 杩斿洖椤圭洰闃舵鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("PM_ProjectBill/getPM_WorkPlanMonthBillMainLists")] + [HttpGet] + public object getPM_WorkPlanMonthBillMainLists(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("PM_WorkPlanMonthBillMain_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_WorkPlanMonthBillMainList order by 鍗曟嵁鍙� desc", "h_v_PM_WorkPlanMonthBillMainList"); + } + else + { + string sql1 = "select * from h_v_PM_WorkPlanMonthBillMainList where 1 = 1 "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; + ds = oCN.RunProcReturn(sql, "h_v_PM_WorkPlanMonthBillMainList"); + } + + //娣诲姞鍒楀悕 + 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 = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + 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 + + #region 鏈堝害闃舵璁″垝鍒楄〃 鍒犻櫎 + /// <summary> + ///鍙傛暟锛歴tring HInterID銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("PM_ProjectBill/PM_WorkPlanMonthBillMainDelete")] + [HttpGet] + public object PM_WorkReportWeekBillMainDelete(string HInterID, string user) + { + try + { + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("PM_WorkPlanMonthBillMain_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (HInterID == null || HInterID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.BeginTran(); + + oCN.RunProc("delete from PM_WorkPlanMonthBillMain where HInterID = " + HInterID); + oCN.RunProc("delete from PM_WorkPlanMonthBillSub where HInterID='" + HInterID + "'"); + + oCN.Commit(); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + 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/PM_WorkPlanMonthBillMainEditList")] + [HttpGet] + public object PM_WorkPlanMonthBillMainEditList(string HInterID,string User) + { + try + { + List<DataTable> tableList = new List<DataTable>(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("PM_WorkPlanMonthBillMain_Edit", 1, false, User)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (HInterID == null || HInterID.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + ds = oCN.RunProcReturn("exec h_p_PM_WorkPlanMonthBillMain_EditInit " + HInterID, "h_p_PM_WorkPlanMonthBillMain_EditInit"); + tableList.Add(ds.Tables[0]); + tableList.Add(ds.Tables[1]); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = tableList; + 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