From 58b8a83a4f30d44d1c17ef9b67b594b90f90281f Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期五, 19 一月 2024 17:27:58 +0800 Subject: [PATCH] 获取收料通知单,采购入库单的源单类型 --- WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 49 insertions(+), 10 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs b/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs index cc84359..819685a 100644 --- a/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_CusRatingChangeBillController.cs @@ -37,23 +37,23 @@ { List<object> columnNameList = new List<object>(); //鏌ョ湅鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Xs_CusRatingChangeBill_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_Xs_CusRatingChangeBillList_Query order by 鍗曟嵁鍙� ", "h_v_Xs_CusRatingChangeBillList_Query"); + ds = oCN.RunProcReturn("select * from h_v_Xs_CusRatingChangeBillList_Query order by 鍗曟嵁鍙� desc", "h_v_Xs_CusRatingChangeBillList_Query"); } else { string sql1 = "select * from h_v_Xs_CusRatingChangeBillList_Query where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; ds = oCN.RunProcReturn(sql, "h_v_Xs_CusRatingChangeBillList_Query"); } @@ -809,5 +809,44 @@ } } #endregion + + #region 鏍规嵁瀹㈡埛鍐呯爜鑾峰彇瀹㈡埛浣欓涓庡鎴蜂俊鐢ㄩ搴� + /// <summary> + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Xs_CusRatingChangeBill/getCustomerBalance")] + [HttpGet] + public object getCustomerBalance(Int64 HCusID) + { + try + { + string sql = "exec h_p_Gy_Customer_CrediControl " + HCusID; + ds = oCN.RunProcReturn(sql, "h_p_Gy_Customer_CrediControl"); + if(ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛佹湭鑾峰彇鍒板搴斿鎴风殑淇℃伅锛侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + 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