From 8f4af99e5ea3939e56148dc969158b35c0cb8470 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期五, 17 一月 2025 10:12:45 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/CGGL/Cg_PayableBillController.cs | 193 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 193 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs index b853ee9..eb29396 100644 --- a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs @@ -1711,5 +1711,198 @@ } } #endregion + + #region 搴斾粯鍗曢渶瑕佹垜瀹℃壒娴佸鎵圭殑 + [Route("Cg_PayableBill/NeedChecklist")] + [HttpGet] + public object NeedChecklist(string user, string userid) + { + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + + //if (!DBUtility.ClsPub.Security_Log("Cg_PayableBillQuery", 1, false, user)) + //{ + // objJsonResult.code = CodeConstant.FAIL; + // objJsonResult.count = CountConstant.FAIL; + // objJsonResult.Message = "鏃犳潈闄愭煡鐪�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //鎼滅储闇�瑕佸鏍哥殑 + string sql = "select * from h_v_Cg_PayableBillQuery_NeedCheck where HCheckUserID = '" + userid + "' ORDER BY hmainid DESC,hsubid ASC"; + ds = oCN.RunProcReturn(sql, "h_v_Cg_PayableBillQuery_NeedCheck"); + 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 = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 搴斾粯鍗曞凡缁忓鎵规祦瀹℃壒鐨� + [Route("Cg_PayableBill/Checkedlist")] + [HttpGet] + public object Checkedlist(string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + + //if (!DBUtility.ClsPub.Security_Log("Cg_PayableBillQuery", 1, false, user)) + //{ + // objJsonResult.code = CodeConstant.FAIL; + // objJsonResult.count = CountConstant.FAIL; + // objJsonResult.Message = "鏃犳潈闄愭煡鐪�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //鎼滅储闇�瑕佸鏍哥殑 + string sql = "select TOP 1000 * from h_v_Cg_PayableBillQuery_Checked where 椤圭洰瀹℃牳浜� = '" + user + "'" + + " ORDER BY hmainid DESC,hsubid ASC"; + ds = oCN.RunProcReturn(sql, "h_v_Cg_PayableBillList_Query"); + 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 = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 搴斾粯鍗� 鎵归噺澶氱骇瀹℃牳 + [Route("Cg_PayableBill/CheckAllFlow")] + [HttpGet] + public object CheckAll(string HInterIDS, int IsAudit, string CurUserName, string CurUserID) + { + try + { + //澶勭悊瀛楃涓� + if (!string.IsNullOrEmpty(HInterIDS)) + { + int[] idArray = Array.ConvertAll(HInterIDS.Split(','), int.Parse); + // 澶勭悊idArray... + for (int i = 0; i < idArray.Length; i++) + { + objJsonResult = (json)AuditCg_PayableBill_Flow(idArray[i], IsAudit, CurUserName, CurUserID);//瀹℃牳鎵ц + if (objJsonResult.count == 0) + { + objJsonResult.Message += "绗�" + (i + 1) + "琛屽嚭鐜伴棶棰樻棤娉曠户缁畬鎴�"; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨姝g‘琛�"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "鎵ц鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳鎴栧弽瀹℃牳搴斾粯鍗曞け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 搴斾粯鍗� 鎵归噺椹冲洖 + [Route("Cg_PayableBill/RejectAllCheckFlow")] + [HttpGet] + public object RejectAllCheckFlow(string HInterIDS, string CurUserID) + { + try + { + //澶勭悊瀛楃涓� + if (!string.IsNullOrEmpty(HInterIDS)) + { + int[] idArray = Array.ConvertAll(HInterIDS.Split(','), int.Parse); + // 澶勭悊idArray... + for (int i = 0; i < idArray.Length; i++) + { + objJsonResult = (json)RejectCheckFlow_POOrderBill(idArray[i].ToString(), CurUserID);//瀹℃牳鎵ц + if (objJsonResult.count == 0) + { + objJsonResult.Message += "绗�" + (i + 1) + "琛屽嚭鐜伴棶棰樻棤娉曠户缁畬鎴�"; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "璇烽�夋嫨姝g‘琛�"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = CountConstant.SUCCEED; + objJsonResult.Message = "鎵ц鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "椹冲洖搴斾粯鍗曞け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } } \ No newline at end of file -- Gitblit v1.9.1