From 1d521ea0a9dbb49ed018cb0c13455ebdf5c73206 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期三, 08 一月 2025 17:48:42 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/条码管理/WEBSController.cs | 270 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 231 insertions(+), 39 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 4ebb21c..956cceb 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" @@ -2133,6 +2133,61 @@ #endregion + #region 鐢熶骇鍏ュ簱 鏍¢獙妯″紡 + + /// <summary> + /// 鐢熶骇鍏ュ簱鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveProductInBill_BillCheck_Json")] + [HttpPost] + public object set_SaveProductInBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getProductInBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1202"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveProductInBill_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 閲囪喘鍏ュ簱 涓婁紶鐢熷崟 @@ -2219,6 +2274,60 @@ #endregion + #region 閲囪喘鍏ュ簱 鏍¢獙妯″紡 + + /// <summary> + /// 閲囪喘鍏ュ簱鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SavePOStockInBill_BillCheck_Json")] + [HttpPost] + public object set_SavePOStockInBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_POStockInBillMain> lsmain = new List<Model.ClsKf_POStockInBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getPOStockInBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_POStockInBillMain websLsmain = new WebS.ClsKf_POStockInBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1201"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SavePOStockInBill_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 @@ -2402,15 +2511,12 @@ { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); - string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); - string sMainStr = sArray[0].ToString(); //鍗曟嵁鏁版嵁 - string HSourceBarCodeCtl = sArray[1].ToString(); //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級 try { List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>(); ListModels oListModels = new ListModels(); - lsmain = oListModels.getOtherInBillMainByJson(sMainStr); + lsmain = oListModels.getOtherInBillMainByJson(msg1); WebAPI.WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain(); @@ -2419,45 +2525,21 @@ websLsmain.HBillType = "1203"; websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; - //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿 - if (HSourceBarCodeCtl == "Y") + if (oWebs.set_SaveOtherInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo)) { - if (oWebs.set_SaveOtherInBill_CLD_BillCheck_Verify(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; - } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; } - //鍘熷崟鎹潪鎵爜鐢熸垚 else { - if (oWebs.set_SaveOtherInBill_CLD_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; - } + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; } } catch (Exception e) @@ -2564,6 +2646,61 @@ objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "棰嗘枡鍑哄簱鍗曚笂浼犲け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region 棰嗘枡鍑哄簱 鏍¢獙妯″紡 + + /// <summary> + /// 棰嗘枡鍑哄簱鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveMateOutBill_BillCheck_Json")] + [HttpPost] + public object set_SaveMateOutBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_MateOutBillMain> lsmain = new List<Model.ClsKf_MateOutBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getMateOutBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_MateOutBillMain websLsmain = new WebS.ClsKf_MateOutBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1204"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveMateOutBill_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; } @@ -2932,6 +3069,61 @@ #endregion + #region 鍏朵粬鍑哄簱 鏍¢獙妯″紡 + + /// <summary> + /// 鍏朵粬鍑哄簱鏍¢獙涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveOtherOutBill_BillCheck_Json")] + [HttpPost] + public object set_SaveOtherOutBill_BillCheck_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + + try + { + List<Model.ClsKf_OtherOutBillMain> lsmain = new List<Model.ClsKf_OtherOutBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getOtherOutBillMainByJson(msg1); + + WebAPI.WebS.ClsKf_OtherOutBillMain websLsmain = new WebS.ClsKf_OtherOutBillMain(); + + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = "1206"; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveOtherOutBill_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 鐢熶骇琛ユ枡 涓婁紶鐢熷崟 -- Gitblit v1.9.1