From ef9a251d76d01e02965a4c14982008be6a78271d Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期四, 15 九月 2022 16:19:51 +0800 Subject: [PATCH] nothing --- WebAPI/Controllers/SellOutController.cs | 135 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 130 insertions(+), 5 deletions(-) diff --git a/WebAPI/Controllers/SellOutController.cs b/WebAPI/Controllers/SellOutController.cs index 2183a49..33e2be2 100644 --- a/WebAPI/Controllers/SellOutController.cs +++ b/WebAPI/Controllers/SellOutController.cs @@ -64,6 +64,127 @@ } + /// <summary> + /// 閿�鍞嚭搴撶紦瀛樺垪琛ㄧ紪杈戞寜閽� 鑾峰彇琛ㄤ綋淇℃伅 + /// </summary> + /// <param name="HSourceBillNo"></param> + /// <returns></returns> + [Route("SellOut/SellOutDetaiNew")] + [HttpGet] + public object SellOutDetaiNew(string HInterID) + { + + DataSet ds; + List<object> list = new List<object>(); + string Swhere = ""; + try + { + if (HInterID != "" || HInterID != null) + { + Swhere = " and hmainid='" + HInterID + "'"; + } + else + { + Swhere = HInterID; + } + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + //鑾峰彇閿�鍞嚭搴撶紪杈戞暟鎹� + string sql = "select 鏁伴噺 HQty,搴旀敹鏁伴噺 HQtyMust,鐗╂枡浠g爜 HMaterNumber,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterModel,婧愬崟涓诲唴鐮� HSourceInterID,婧愬崟瀛愬唴鐮� HSourceEntryID,婧愬崟鍗曞彿 HSourceBillNo,鎵规 HBatchNo,杈呭姪灞炴�� HAuxPropID,璁″垝璺熻釜鍙� HMTONo,ck HWHID from h_v_SelloutDetail where 1 = 1 " + Swhere + ""; + ds = oCN.RunProcReturn(sql, "h_v_SelloutDetail"); + + list.Add(ds.Tables[0]); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.list = list; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + } + return objJsonResult; + } + + + //宸蹭笂浼犲垪琛ㄥ埛鏂� + [Route("Web/DisBillUpdateLoad_Json")] + [HttpGet] + public object DisBillUpdateLoad_Json(string HBillType, string HMaker, Int64 HOrgID) + { + try + { + ds = webserver.GetDisBillUpdateLoad_Json(HBillType, HMaker, HOrgID); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + //宸蹭笂浼犳煡璇� + [Route("Web/QueryBillUpdateLoad_Json")] + [HttpGet] + public object QueryBillUpdateLoad_Json(string BillType, string HBillNo, string HSourceBillNo) + { + try + { + ds = webserver.GetQueryBillUpdateLoad_Json(BillType, HBillNo, HSourceBillNo); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + } + catch (Exception e) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + [Route("SellOut/GetMAXNum")] [HttpGet] public object GetMAXNum() @@ -185,8 +306,10 @@ { try { - // DataSet ds = new DataSet(); - // WebServer webserver = new WebServer(); + //鍚屾閿�鍞鍗� + new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_IFCLD_ERPSourceBillToLocal_SEOrder '" + HSourceBillNo + "'", "h_p_IFCLD_ERPSourceBillToLocal_SEOrder"); + // DataSet ds = new DataSet(); + // WebServer webserver = new WebServer(); string sWhere = " Where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "%'"; // if (HSourceBillType == "1402") @@ -254,11 +377,11 @@ //閿�鍞嚭搴�/鎵潯鐮�/鐩存帴璋僿ebservice [Route("SellOut/get_CheckTypeByBarCode_Json")] [HttpGet] - public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID) + public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID,string HBillType, string sBillNo, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID,string HScanStyle) { //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo); string sExpressNumber = ""; - WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); + WebSoBar = oWebs.get_CheckTypeByBarCode_New(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, HScanStyle, ref DBUtility.ClsPub.sErrInfo); if (WebSoBar == null) { objJsonResult.code = "0"; @@ -448,12 +571,14 @@ websLsmain.HEmpID = lsmain[0].HEmpID; websLsmain.HRemark = lsmain[0].HRemark; websLsmain.HMaker = lsmain[0].HMaker; + websLsmain.HKeeperID= lsmain[0].HKeeperID; + websLsmain.HBillType = "1205";//鍥哄畾鍊� if (webserver.set_SaveSellOutBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = "鐢熸垚閿�鍞嚭搴撳崟鎴愬姛锛佸崟鎹彿涓猴細"; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; objJsonResult.data = null; return objJsonResult; } -- Gitblit v1.9.1