From e76b1ea33c510c75064f4f9a993ffd2564fca115 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期一, 26 十二月 2022 08:56:39 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/条码管理/WEBSController.cs | 344 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 274 insertions(+), 70 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 d7cd3f7..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" @@ -73,16 +73,7 @@ try { ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo); - List<object> columnNameList = new List<object>(); - //娣诲姞鍒楀悕 - foreach (DataColumn col in ds.Tables[0].Columns) - { - Type dataType = col.DataType; - string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; - columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 - } - - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (ds == null) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -92,6 +83,14 @@ } else { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇鍗曟嵁淇℃伅鎴愬姛锛�"; @@ -339,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 鐢熶骇琛ユ枡 鏍¢獙妯″紡 @@ -397,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 @@ -497,6 +617,48 @@ #endregion + #region 鍏朵粬鍑哄簱 鎵弿婧愬崟鏉$爜 + + /// <summary> + /// 鍏朵粬鍑哄簱 鎵弿婧愬崟鏉$爜 + /// </summary> + /// <returns></returns> + [Route("WEBSController/get_SourceBarCode_OtherOut_Json")] + [HttpGet] + public object get_SourceBarCode_OtherOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID) + { + try + { + WebSoBar = oWebs.get_SourceBarCode_OtherOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, 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> @@ -562,35 +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) { - WebSoBar = oWebs.get_BarCode(sBarCode, 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 @@ -652,16 +837,7 @@ string sMouldManagerCtl = "N"; //鏄惁鍚敤鍣ㄥ叿绠$悊 string sFIFOCtl = "N"; //鏄惁鍚敤鍏堣繘鍏堝嚭绠$悊 ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo); - List<object> columnNameList = new List<object>(); - //娣诲姞鍒楀悕 - foreach (DataColumn col in ds.Tables[0].Columns) - { - Type dataType = col.DataType; - string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; - columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 - } - - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (ds == null) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -671,6 +847,14 @@ } else { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; @@ -797,31 +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) { - WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sBarCode, 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; } @@ -842,16 +1048,7 @@ try { ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere); - List<object> columnNameList = new List<object>(); - //娣诲姞鍒楀悕 - foreach (DataColumn col in ds.Tables[0].Columns) - { - Type dataType = col.DataType; - string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; - columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 - } - - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (ds == null) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -861,6 +1058,14 @@ } else { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; @@ -894,16 +1099,7 @@ try { ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID); - List<object> columnNameList = new List<object>(); - //娣诲姞鍒楀悕 - foreach (DataColumn col in ds.Tables[0].Columns) - { - Type dataType = col.DataType; - string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; - columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 - } - - if (ds == null || ds.Tables[0].Rows.Count <= 0) + if (ds == null) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -913,6 +1109,14 @@ } else { + List<object> columnNameList = new List<object>(); + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇缂撳瓨淇℃伅鎴愬姛锛�"; -- Gitblit v1.9.1