From 5e6c88f93f2e12cf968640d25a9611ac057b7cbd Mon Sep 17 00:00:00 2001 From: 沈泽 <211959439@qq.com> Date: 星期三, 20 十月 2021 08:54:45 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | 76 +++++++++++++++++++++++++++++-------- 1 files changed, 59 insertions(+), 17 deletions(-) diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs index 964cfac..f28c737 100644 --- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs @@ -41,22 +41,11 @@ string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); } - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception e) { @@ -68,8 +57,61 @@ } } + /// <summary> + /// 閲囪喘璁㈠崟 鍒嗛厤 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cg_POOrderBill/distribut")] + [HttpGet] + public object distribut(string Hmainid, string HSupplierId) + { + try + { + string sql = $"update銆�Cg_POOrderBillMain銆� set HBusinessStatus = 2 ,HEmpID ={HSupplierId} where HInterID in ({Hmainid})"; + oCN.RunProc(sql); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鎿嶄綔鎴愬姛锛�"; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } - + /// <summary> + /// 閲囪喘璁㈠崟 鍙戝竷 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cg_POOrderBill/release")] + [HttpGet] + public object release(string Hmainid) + { + try + { + string sql = $"update銆�Cg_POOrderBillMain銆� set HBusinessStatus = 3 where HInterID in ({Hmainid})"; + oCN.RunProc(sql); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鎿嶄綔鎴愬姛锛�"; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } // } } \ No newline at end of file -- Gitblit v1.9.1