From 0346b6bea106b9f9176725d34df7db1838b6a2f3 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期四, 13 四月 2023 15:29:16 +0800 Subject: [PATCH] 新增生产组托单扫码模块所需方法 --- CLOUDWEB/WebService1.asmx.cs | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 152 insertions(+), 1 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index 7f76f26..f1a94c9 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -49012,7 +49012,158 @@ } catch (Exception e) { - sErrMsg = "鍒犻櫎妯℃不鍏峰嚭鍏ュ簱涓存椂琛ㄨ褰曞け璐ワ紒" + e.Message; + sErrMsg = "鍒犻櫎涓存椂琛ㄨ褰曞け璐ワ紒" + e.Message; + return false; + } + } + + #endregion + + #endregion + + + #region 鐢熶骇缁勬墭鍗曟ā鍧楄皟鐢ㄦ柟娉� 20230406鏂板 + + #region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮� + + [WebMethod] + public Model.ClsGy_BarCodeBill_WMS_Model get_PackBarCode_PackUnionBill(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HHMaker, Int64 HStockOrgID, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + Model.ClsGy_BarCodeBill_WMS_Model oBar = new Model.ClsGy_BarCodeBill_WMS_Model(); + + DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HHMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_PackUnionBill"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔墭鏉$爜鍒ゆ柇澶辫触锛�"; + return null; + } + else + { + if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0) + { + oBar.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBarCode_Pack"]); + return oBar; + } + else + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔墭鏉$爜澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + return null; + } + } + } + + #endregion + + #region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴斿崟涓潯鐮� + + [WebMethod] + public bool get_BarCode_PackUnionBill(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg) + { + //鑾峰彇绯荤粺鍙傛暟 + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); + if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == false) + { + sErrMsg = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; + return false; + } + + string sSourceBillTypeCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟绫诲瀷鎺у埗锛圷涓烘帶鍒讹級 + string sSourceBillNoCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟鎺у埗锛圷涓烘帶鍒讹級 + sSourceBillTypeCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillTypeCtl; + sSourceBillNoCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillNoCtl; + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionBill '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔潯鐮佸垽鏂け璐ワ紒"; + return false; + } + else + { + if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0) + { + return true; + } + else + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + return false; + } + } + } + + #endregion + + #region 杩斿洖缁勬墭鍒楄〃淇℃伅 + + [WebMethod] + public DataSet GetBillEntry_Tmp_Pack(Int64 HInterID, string HBillNo, string HBillType, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmp_Pack " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmp_Pack"); + return DS; + } + + #endregion + + #region 鍒犻櫎鏄庣粏琛ㄤ綋閫変腑琛岃褰� + + [WebMethod] + public bool set_DelPackUnionBill_Temp_Pack(Int64 HInterID, string HBarCode, string HBillType, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + try + { + oCn.RunProc("Delete from Sc_PackUnionBill_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "' and HPieceQty=1", ref DBUtility.ClsPub.sExeReturnInfo); + return true; + } + catch (Exception e) + { + sErrMsg = "鍒犻櫎缁勬墭璁板綍澶辫触锛�" + e.Message; + return false; + } + } + + #endregion + + #region 涓婁紶鐢熸垚鐢熶骇缁勬墭鍗� + + [WebMethod] + public bool set_SavePackUnionBill_Add(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + try + { + oCn.BeginTran(); + DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Insert_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_PackUnionBill_Insert_New"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涗笂浼犲け璐ワ紒"; + oCn.RollBack(); + return false; + } + else + { + if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1) + { + sErrMsg = "涓婁紶澶辫触锛屽崟鎹彿锛�" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + oCn.RollBack(); + return false; + } + else + { + sErrMsg = "鐢熸垚鐢熶骇缁勬墭鍗曟垚鍔燂紒鍗曟嵁鍙蜂负锛�" + HBillNo; + oCn.Commit(); + return true; + } + } + } + catch (Exception e) + { + sErrMsg = "鐢熸垚鐢熶骇缁勬墭鍗曞け璐ワ紒" + e.Message; + oCn.RollBack(); return false; } } -- Gitblit v1.9.1