From baca1376c502e0de5bf3962ebeb533372febd43f Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期二, 27 十二月 2022 09:45:59 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/条码管理/WEBSController.cs | 229 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 196 insertions(+), 33 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 8246b14..c51bad8 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" @@ -338,6 +338,66 @@ #endregion + #region 濮斿棰嗘枡 涓婁紶鐢熷崟 + + #region 濮斿棰嗘枡 鏍¢獙妯″紡 + + /// <summary> + /// 濮斿棰嗘枡鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveEntrustOutBill_BillCheck_Json")] + [HttpPost] + public object set_SaveEntrustOutBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_EntrustOutBillMain> lsmain = new List<Model.ClsKf_EntrustOutBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getEntrustOutBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_EntrustOutBillMain websLsmain = new WebS.ClsKf_EntrustOutBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1211"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveEntrustOutBill_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 鐢熶骇琛ユ枡 鏍¢獙妯″紡 @@ -396,6 +456,67 @@ #endregion #endregion + + + #region 濮斿琛ユ枡 涓婁紶鐢熷崟 + + #region 濮斿琛ユ枡 鏍¢獙妯″紡 + + /// <summary> + /// 濮斿琛ユ枡鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveEntrustReplenishOutBill_BillCheck_Json")] + [HttpPost] + public object set_SaveEntrustReplenishOutBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_EntrustReplenishOutBillMain> lsmain = new List<Model.ClsKf_EntrustReplenishOutBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getEntrustReplenishOutBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_EntrustReplenishOutBillMain websLsmain = new WebS.ClsKf_EntrustReplenishOutBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1255"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveEntrustReplenishOutBill_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 @@ -603,37 +724,58 @@ [HttpGet] public Object get_BarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, string HScanStyle, string HCustom1, string HCustom2) { - try + //鑾峰彇绯荤粺鍙傛暟 + string sErrMsg = ""; + string sJXCode = ""; + if (oSystemParameter.ShowBill(ref sErrMsg) == true) { - var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo,HMaker); - SourceFlag = true; - WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo); - if (WebSoBar == null) + if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤 { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; - objJsonResult.data = null; - return objJsonResult; + sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker); + SourceFlag = true; } else { + sJXCode = sBarCode; + } + try + { + WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, 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 = 1; - objJsonResult.Message = "鎴愬姛"; - objJsonResult.data = WebSoBar; + objJsonResult.count = 0; + objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString(); + objJsonResult.data = null; return objJsonResult; } } - catch (Exception e) + else { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString(); + objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; objJsonResult.data = null; return objJsonResult; } - } + } #endregion @@ -839,32 +981,53 @@ [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 + //鑾峰彇绯荤粺鍙傛暟 + string sErrMsg = ""; + string sJXCode = ""; + if (oSystemParameter.ShowBill(ref sErrMsg) == true) { - var sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker); - WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); - if (WebSoBar == null) + if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤 { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; - objJsonResult.data = null; - return objJsonResult; + sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker); } else { - objJsonResult.code = "0"; - objJsonResult.count = 1; - objJsonResult.Message = "鎴愬姛"; - objJsonResult.data = WebSoBar; - return objJsonResult; + sJXCode = sBarCode; } - } - catch (Exception e) + try + { + WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, 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; + } + } + else { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "鏍¢獙妯″紡锛屾壂鎻忔潯鐮佸け璐ワ紒" + e.ToString(); + objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; objJsonResult.data = null; return objJsonResult; } -- Gitblit v1.9.1