From d38136e8b743a3186dc873d0f18e5a58e84e86d9 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 24 十一月 2022 08:51:40 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/条码管理/WEBSController.cs | 327 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 324 insertions(+), 3 deletions(-) diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index 7f2c5f5..aa7007f 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -32,10 +32,197 @@ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); + #region 鍩虹璧勬枡 + + #region 浠撳簱璧勬枡 + + //鏍规嵁浠撳簱ID銆佺粍缁嘔D锛岃繑鍥炰粨搴撲俊鎭� + public Model.ClsGy_Warehouse_Model GetWhInfoByIDandOrg(long sHWhID, long HUSEORGID, ref string sErr) + { + DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View(); + if (dal.GetInfoByIDandOrgID(sHWhID, HUSEORGID)) + { + return dal.omodel; + } + else + { + return null; + } + } + + #endregion + + #region 浠撲綅璧勬枡 + + + #endregion + + #endregion + + + #region 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 + + /// <summary> + /// 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] + [HttpPost] + public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) + { + try + { + if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion #region 鎻愪氦鐢熷崟澶勭悊鏂规硶 + + #region 閿�鍞嚭搴� 涓婁紶鐢熷崟 + + #region 閿�鍞嚭搴� 鏍¢獙妯″紡 + + /// <summary> + /// 閿�鍞嚭搴撴牎楠屼笂浼� + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveSellOutBill_BillCheck_Json")] + [HttpPost] + public object set_SaveSellOutBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getSellOutBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1205"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveSellOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閿�鍞嚭搴撴牎楠屽け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #endregion + + + #region 鐢熶骇琛ユ枡 涓婁紶鐢熷崟 + + #region 鐢熶骇琛ユ枡 鏍¢獙妯″紡 + + /// <summary> + /// 鐢熶骇琛ユ枡鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json")] + [HttpPost] + public object set_SaveMateReplenishOutBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1254"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐢熶骇琛ユ枡鏍¢獙澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #endregion #endregion @@ -67,7 +254,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.Message = "鎴愬姛"; objJsonResult.data = WebSoBar; return objJsonResult; } @@ -114,7 +301,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.Message = "鎴愬姛"; objJsonResult.data = WebSoBar; return objJsonResult; } @@ -179,7 +366,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 1; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.Message = "鎴愬姛"; objJsonResult.data = WebSoBar; return objJsonResult; } @@ -301,13 +488,147 @@ #endregion + #region 鏍¢獙妯″紡 妯″潡璋冪敤鏂规硶 + + #region 浠庣紦瀛樺垪琛ㄧ紪杈戝姛鑳借烦杞嚦鍗曟嵁鎵爜妯″潡锛岃幏鍙栧崟鎹俊鎭� + + /// <summary> + /// 浠庣紦瀛樺垪琛ㄧ紪杈戝姛鑳借烦杞嚦鍗曟嵁鎵爜妯″潡锛岃幏鍙栧崟鎹俊鎭� 鏍¢獙妯″紡 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetSourceBillList_BillCheck_Json")] + [HttpGet] + public Object GetSourceBillList_BillCheck_Json(string HBillNo, string HBillType) + { + try + { + WebSoBar = oWebs.GetSourceBillList_BillCheck(HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo); + if (WebSoBar == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = WebSoBar; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "浠庣紦瀛樺垪琛ㄧ紪杈戝姛鑳借烦杞嚦鍗曟嵁鎵爜妯″潡锛岃幏鍙栧崟鎹俊鎭け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧� + + /// <summary> + /// 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧� 鏍¢獙妯″紡 + /// </summary> + /// <returns></returns> + [Route("WEBSController/get_BillBarCode_BillCheck_Json")] + [HttpGet] + public Object get_BillBarCode_BillCheck_Json(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID) + { + try + { + WebSoBar = oWebs.get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); + if (WebSoBar == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = WebSoBar; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 鎵弿鐗╂枡鏉$爜 鍑哄叆搴撴ā鍧� + + /// <summary> + /// 鐗╂枡鏉$爜鏂囨湰妗� 鏍¢獙鎵爜璋冪敤 鏍¢獙妯″紡 + /// </summary> + /// <returns></returns> + [Route("WEBSController/get_CheckTypeByBarCode_BillCheck_Json")] + [HttpGet] + public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID) + { + try + { + WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); + if (WebSoBar == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鎴愬姛"; + objJsonResult.data = WebSoBar; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏍¢獙妯″紡锛屾壂鎻忔潯鐮佸け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #region 澶勭悊鏂规硶 #endregion + #endregion + #region 澶勭悊鏂规硶 + + + #endregion + } } -- Gitblit v1.9.1