From 50f766bdd428af1214c4b35b369695880e902137 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 14 六月 2023 13:30:59 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/条码管理/WEBSController.cs | 372 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 365 insertions(+), 7 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 a62a3b9..c107b38 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" @@ -265,6 +265,38 @@ #endregion + #region 鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄦā鍧� 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁 + + /// <summary> + /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_DelPonderationBillMain_Temp_Json")] + [HttpGet] + public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType) + { + try + { + oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛"; + 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 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 /// <summary> @@ -629,6 +661,52 @@ #endregion + #region 鐩存帴璋冩嫧 涓婁紶鐢熷崟 + + #region 鎹㈡墭璋冩嫧鍗� + + /// <summary> + /// 涓婁紶鐢熸垚鎹㈡墭璋冩嫧鍗� + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveMoveStockBill_HuanTuo_Json")] + [HttpGet] + public object set_SaveMoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID) + { + try + { + if (oWebs.set_SaveMoveStockBill_HuanTuo(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, 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 鐢熶骇缁勬墭鍗� 涓婁紶鐢熷崟 @@ -718,21 +796,19 @@ #endregion - - - #region 鐢熶骇鍏ュ簱 鎵弿婧愬崟鏉$爜 + #region 閲囪喘鍏ュ簱 鎵弿婧愬崟鏉$爜 /// <summary> - /// 鐢熶骇鍏ュ簱 鎵弿婧愬崟鏉$爜 + /// 閲囪喘鍏ュ簱 鎵弿婧愬崟鏉$爜 /// </summary> /// <returns></returns> - [Route("WEBSController/Get_SourceBarCode_PoStockIn_Json")] + [Route("WEBSController/Get_SourceBarCode_POStockIn_Json")] [HttpGet] - public object Get_SourceBarCode_PoStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID,Int64 HAccessFlag, WebS.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + public object get_SourceBarCode_POStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID) { try { - WebSoBar = oWebs.get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo); + WebSoBar = oWebs.get_SourceBarCode_POStockIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); if (WebSoBar == null) { objJsonResult.code = "0"; @@ -1739,6 +1815,288 @@ #endregion + #region 鎹㈡墭璋冩嫧鍗曟ā鍧楄皟鐢ㄦ柟娉� + + #region 鎹㈡墭璋冩嫧鍗曟ā鍧� 鎵弿璋冨叆鎵樻潯鐮� + + /// <summary> + /// 鎹㈡墭璋冩嫧鍗曟ā鍧� 鎵弿璋冨叆鎵樻潯鐮� + /// </summary> + /// <returns></returns> + [Route("WEBSController/Get_BarCodePack_In_MoveStockBill_HuanTuo_Json")] + [HttpGet] + public object get_BarCodePack_In_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBarCode_Pack, Int64 HStockOrgID) + { + try + { + WebSoBar = oWebs.get_BarCodePack_In_MoveStockBill_HuanTuo(HInterID, HBillNo, HBarCode_Pack, 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_BarCode_MoveStockBill_HuanTuo_Json")] + [HttpGet] + public object get_BarCode_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HBarCode_Pack, Int64 HPackUnionInterID_In, Int64 HWhID, Int64 HSPID, string HMaker, Int64 HStockOrgID) + { + try + { + if (oWebs.get_BarCode_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HBarCode, HBarCode_Pack, HPackUnionInterID_In, HWhID, HSPID, HMaker, HStockOrgID, 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 鎹㈡墭璋冩嫧鍗曟ā鍧� 杩斿洖鍒楄〃淇℃伅 + + /// <summary> + /// 鎹㈡墭璋冩嫧鍗曟ā鍧� 杩斿洖鍒楄〃淇℃伅 + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetBillEntry_Temp_MoveStockBill_HuanTuo_Json")] + [HttpGet] + public object GetBillEntry_Temp_MoveStockBill_HuanTuo_Json(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID) + { + try + { + ds = oWebs.GetBillEntry_Temp_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HStockOrgID, ref DBUtility.ClsPub.sErrInfo); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + objJsonResult.data = null; + return objJsonResult; + } + 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 = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + 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/set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json")] + [HttpGet] + public object set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBarCode, string HBillType) + { + try + { + if (oWebs.set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo(HInterID, HBarCode, 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 鎹㈡墭璋冩嫧鍗曟ā鍧� 浠庣紦瀛樺垪琛ㄩ〉闈㈣繑鍥炰俊鎭� + + /// <summary> + /// 浠庣紦瀛樺垪琛ㄩ〉闈㈣繑鍥炰俊鎭� + /// </summary> + /// <returns></returns> + [Route("WEBSController/GetKF_MoveStockBill_TempList_HuanTuo_Json")] + [HttpGet] + public object GetKF_MoveStockBill_TempList_HuanTuo_Json(Int64 HInterID, string HBillType) + { + try + { + ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo"); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "浠庣紦瀛樺垪琛ㄨ繑鍥炴椂锛屾病鏈夎繑鍥炰换浣曡褰曪紒"; + objJsonResult.data = null; + return objJsonResult; + } + 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 = "鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + 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/GetPonderationBillMain_TempList_HuanTuo_Json")] + [HttpGet] + public object GetPonderationBillMain_TempList_HuanTuo_Json(string HBillType, string HMaker, long HStockOrgID) + { + try + { + ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo"); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏃犵紦瀛樿褰曪紒"; + objJsonResult.data = null; + return objJsonResult; + } + 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 = "鑾峰彇缂撳瓨淇℃伅鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + 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