From d7b5be548fa11bb06aa98c5c9fb43c9702646298 Mon Sep 17 00:00:00 2001 From: 沈泽 <211959439@qq.com> Date: 星期二, 16 十一月 2021 16:57:59 +0800 Subject: [PATCH] 新增采购入库单,销售订单 --- WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs index fda1b9d..266338f 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs @@ -19,7 +19,45 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + /// <summary> + /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Xs_SeOrderBill/cx")] + [HttpGet] + public object cx(long HInterID) + { + try + { + ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where HitemID=" + HInterID, "h_v_IF_SeOrderBillList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + 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; + } + } /// <summary> /// 杩斿洖閿�鍞鍗曞垪琛� ///鍙傛暟锛歴tring sql銆� @@ -68,6 +106,36 @@ } } + /// <summary> + ///鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("Xs_SeOrderBill/DeltetSeOrderBill")] + [HttpGet] + public object DeltetSeOrderBill(string HInterID) + { + try + { + oCN.BeginTran(); + oCN.RunProc("Delete From Xs_SeOrderBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete From Xs_SeOrderBillSub 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; + } + } // -- Gitblit v1.9.1