From cc9e08b2e990aa0e065264337fb172918326a9de Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期一, 30 五月 2022 17:38:39 +0800 Subject: [PATCH] 修改了供应商根据组织过滤显示内容功能 --- WebAPI/Controllers/WebAPIController.cs | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 160 insertions(+), 4 deletions(-) diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 54b55ab..bdd2421 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -345,6 +345,159 @@ } + + //鏍规嵁鎷栨潯鐮佽繑鍥炴潯鐮佹。妗堣〃鍞竴鐮佷俊鎭� + [Route("GroupOrder/GetBillEntry_TmpListGroupOrder")] + [HttpGet] + public object GetBillEntry_TmpListGroupOrder(string HBarCode) + { + try + { + ds = webserver.GetBarCode(HBarCode); + 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; + } + } + + + + //鏍规嵁缃戞牸閫変腑璁板綍鍘讳慨鏀规潯鐮佹。妗堛�佺粍鎵樺崟瀛愯〃璁板綍骞堕噸鏂扮敓鎴愮粍鎵樺崟sum琛� + [Route("GroupOrderBill/Edit")] + [HttpGet] + public object Edit(string HBarCode1, Int64 HQty) + { + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + try + { + oCN.RunProc("update Gy_BarCodeBill set HQty = " + HQty.ToString() + " where HBarCode = '" + HBarCode1 + "'"); + oCN.RunProc("update Sc_PackUnionBillSub set HQty = " + HQty.ToString() + " where HBarCode = '" + HBarCode1 + "'"); + DataSet ds = oCN.RunProcReturn("exec h_p_DisPlayBarCode '" + HBarCode1 + "'", "h_p_DisPlayBarCode"); + + long HInterIDTTM = 0; + long HInterID = 0; + string HBarCode_Pack = ""; + string HBarCode = ""; + string HUser = ""; + HInterIDTTM = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID_TTM"]); + HBarCode_Pack = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBarCode_Pack"]); + HUser = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HMaker"]); + HInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]); + oCN.RunProc("exec h_p_WMS_PackUnionBill_SumSubBill " + HInterIDTTM.ToString() + ",'" + HBarCode_Pack + "','3783','" + HUser + "'," + HInterID.ToString()); //鏍规嵁绠辨潯鐮侊紝鍐欏叆 SUM琛紝SUM鏉$爜妗f + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇敼鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //DataSet DS1 = webserver.GetBarCode(HBarCode); //HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSPID"]); + + //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo); + + + //if (DS1 == null || DS1.Tables[0].Rows.Count <= 0) + // { + // objjson.code = "0"; + // objjson.count = 0; + // objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + // objjson.data = null; + // return objjson; + // } + // else + // { + // objjson.code = "0"; + // objjson.count = 1; + // objjson.Message = "鑾峰彇鎴愬姛!"; + // objjson.data = DS1.Tables[0]; + // return objjson; + // } + //} + catch (Exception ex) + { + + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + //鏍规嵁缃戞牸閫変腑璁板綍鐨勫敮涓�鐮� 鍘诲垹闄ゆ潯鐮佹。妗� 缁勬墭鍗曞瓙琛� 缁勬墭鍗晄um琛ㄧ殑鍞竴鐮佹暟鎹� + [Route("GroupOrderBill/Delete")] + [HttpGet] + public object Delete(string HBarCode1) + { + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + try + { + oCN.RunProc("delete from Gy_BarCodeBill where HBarCode = '" + HBarCode1 + "'"); + oCN.RunProc("delete from Sc_PackUnionBillSub where HBarCode = '" + HBarCode1 + "'"); + oCN.RunProc("delete from Sc_PackUnionBillSub_Sum where HBarCode = '" + HBarCode1 + "'"); //HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSPID"]); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo); + + + //if (DS1 == null || DS1.Tables[0].Rows.Count <= 0) + // { + // objjson.code = "0"; + // objjson.count = 0; + // objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + // objjson.data = null; + // return objjson; + // } + // else + // { + // objjson.code = "0"; + // objjson.count = 1; + // objjson.Message = "鑾峰彇鎴愬姛!"; + // objjson.data = DS1.Tables[0]; + // return objjson; + // } + //} + catch (Exception ex) + { + + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鍒犻櫎澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + //鏍规嵁榛戠偣/鐧界偣杩斿洖涓嶈壇浠g爜銆佷笉鑹唴鐮� [Route("Web/GetHWBDot")] [HttpGet] @@ -679,23 +832,26 @@ } } + /// <summary> /// 鑾峰彇渚涘簲鍟嗗垪琛� /// </summary> /// <returns></returns> [Route("Web/GetSupplierList_Json")] [HttpGet] - public object GetSupplierList_Json(string Supplier) + public object GetSupplierList_Json(string Supplier, Int64 HOrgID) { - sWhere = " Where HStopFlag=0 and HEndFlag=1"; + sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID =" + HOrgID + ""; //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); if (Supplier != "") { - sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' ) "; + sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' or HUSEORGID like '%" + Supplier + "%' ) "; } try { - ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); + WebS.WebService1 oWeb = new WebS.WebService1(); + ds = oWeb.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); + //ds = webserver.GetSupplierList(sWhere, ref DBUtility.ClsPub.sErrInfo); if (ds == null || ds.Tables[0].Rows.Count <= 0) { objjson.code = "0"; -- Gitblit v1.9.1