From 7f5fd4b07afcf2f41371829d3f9774b2618d5916 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期五, 26 十一月 2021 16:16:22 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs | 85 +++++++++++++++++++++++++++++++++--------- 1 files changed, 66 insertions(+), 19 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs index 9eae8a3..a6b778b 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs @@ -18,6 +18,7 @@ public DataSet ds = new DataSet(); public WebServer webserver = new WebServer(); public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� @@ -829,7 +830,36 @@ return objJsonResult; } } - + /// <summary> + ///閿�鍞嚭搴撳崟鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("Kf_SellOutBill/DeltetSellOutBill")] + [HttpGet] + public object DeltetSeOutStockBackBill(string HInterID) + { + try + { + oCN.BeginTran(); + oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); + oCN.Commit(); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } #region sql璇彞 @@ -1026,7 +1056,36 @@ return objJsonResult; } } - + /// <summary> + ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳� + /// </summary> + /// <returns></returns> + [Route("Kf_ProductInBill/DeltetProductInBill")] + [HttpGet] + public object DeltetProductInBill(string HInterID) + { + try + { + oCN.BeginTran(); + oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); + oCN.Commit(); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } #region sql璇彞 @@ -1096,24 +1155,12 @@ { try { - ds = Sc_GetEntrustInBill(sWhere); - 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 = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception ex) { -- Gitblit v1.9.1