From c423a61ae9ee84f71a75ac793dac083fbd590eb1 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 05 六月 2024 20:48:53 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/CGGL/YF_PayMentBillController.cs | 306 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 305 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs b/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs index afdbebb..9089659 100644 --- a/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs +++ b/WebAPI/Controllers/CGGL/YF_PayMentBillController.cs @@ -238,7 +238,15 @@ } - + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } //淇濆瓨 //淇濆瓨瀹屾瘯鍚庡鐞� @@ -426,6 +434,17 @@ objJsonResult.data = 1; return objJsonResult; } + + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + string sReturn = ""; oCN.BeginTran(); @@ -635,6 +654,17 @@ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� if (IsAudit == 0) //瀹℃牳鎻愪氦 { + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + //瀹℃牳鎻愪氦 if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { @@ -655,6 +685,17 @@ } if (IsAudit == 1) //鍙嶅鏍告彁浜� { + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + //鍙嶅鏍告彁浜bandonCheck if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { @@ -962,5 +1003,268 @@ } #endregion + + #region 閲囪喘璁㈠崟鍒拌揣鍙婃椂鐜囨姤琛� 鏌ヨ + /// <summary>s + /// 杩斿洖椤圭洰闃舵鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("YF_PayMentBill/POOrderReceiveSumReport")] + [HttpGet] + public object POOrderReceiveSumReport(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + ds = oCN.RunProcReturn("exec h_p_Cg_POOrderReceiveSumReport '" + sWhere + "'", "h_p_Cg_POOrderReceiveSumReport");// h_p_Cg_POMaterialPriceReport 閲囪喘鍒嗘瀽鎶ヨ〃 + + //娣诲姞鍒楀悕 + 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 sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("YF_PayMentBill/GetCg_POInStockBillSumReport")] + [HttpGet] + public object GetCg_POInStockBillSumReport(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + ////鏌ョ湅鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillSumReport_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + + //鏌ヨ + if (sWhere == null || sWhere.Equals("")) + { + string sql = "exec h_p_Cg_POInStockBillSumReport ''"; + ds = oCN.RunProcReturn(sql, "h_p_Cg_POInStockBillSumReport"); + } + else + { + string sql = "exec h_p_Cg_POInStockBillSumReport '" + sWhere + "'"; + ds = oCN.RunProcReturn(sql, "h_p_Cg_POInStockBillSumReport"); + } + + //娣诲姞鍒楀悕 + 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 閲囪喘涓氬姟/璁㈠崟鎶ョ粺璁¤〃 鏌ヨ + [Route("YF_PayMentBill/Cg_POOrderBillSumReport")] + [HttpGet] + public object Cg_POOrderBillSumReport(string sWhere, string user) + { + try + { + DataSet ds; + List<object> columnNameList = new List<object>(); + + ds = oCN.RunProcReturn("exec [h_p_Cg_POOrderBillSumReport] '" + sWhere + "'", "[h_p_Cg_POMaterialPriceReport]"); + + //娣诲姞鍒楀悕 + 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 閲囪喘浠锋牸鍒嗘瀽琛� 鏌ヨ + [Route("YF_PayMentBill/POMaterialPriceReport")] + [HttpGet] + public object POMaterialPriceReport(string sWhere, string user) + { + try + { + DataSet ds; + List<object> columnNameList = new List<object>(); + + ds = oCN.RunProcReturn("exec [h_p_Cg_POMaterialPriceReport] '" + sWhere + "'", "[h_p_Cg_POMaterialPriceReport]"); + + //娣诲姞鍒楀悕 + 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 sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("YF_PayMentBill/Cg_POOrderBillProcessSumReport")] + [HttpGet] + public object Cg_POOrderBillProcessSumReport(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + ds = oCN.RunProcReturn("exec h_p_Cg_POOrderBillProcessSumReport '" + sWhere + "'", "h_p_Cg_POOrderBillProcessSumReport"); + + //娣诲姞鍒楀悕 + 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 sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("YF_PayMentBill/Cg_POOrderReceiveDaySumReport")] + [HttpGet] + public object Cg_POOrderReceiveDaySumReport(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + + ds = oCN.RunProcReturn("exec h_p_Cg_POOrderReceiveDaySumReport '" + sWhere + "'", "h_p_Cg_POOrderReceiveDaySumReport"); + + //娣诲姞鍒楀悕 + 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 } } \ No newline at end of file -- Gitblit v1.9.1