From 99decc0b29a367f10d83bf75b56490af1390d522 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期二, 07 九月 2021 16:47:00 +0800 Subject: [PATCH] 新增扫描源单条码调用方法(通用) --- CLOUDWEB/WebService1.asmx.cs | 196 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 196 insertions(+), 0 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index 6e45ce8..120320a 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -32700,6 +32700,198 @@ #endregion + + + + #region 婧愬崟澶勭悊鏂规硶 + + #region 鎵弿婧愬崟鏉$爜 + + [WebMethod] + public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HHMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); + Int64 HAccessFlag = 0; //鏄惁鐗╂枡鏉$爜甯﹀嚭婧愬崟淇℃伅鏍囧織锛�0涓虹洿鎺ユ壂婧愬崟鏉$爜锛�1涓虹墿鏂欐潯鐮佸甫鍑烘簮鍗曚俊鎭級 + + //鑾峰彇绯荤粺鍙傛暟 + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); + if (oSystemParameter.ShowBill(ref sErrMsg) == false) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曟椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; + return null; + } + oBar = getSourceBill_New(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HRedBlueflag, HHMaker, HPTQty, HPlanMode, HFIFOWhID, HOWNERID, HAccessFlag, oSystemParameter.omodel, ref sErrMsg); + if (oBar == null) + { + sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曞け璐ワ紒" + sErrMsg; + return null; + } + else + { + return oBar; + } + } + + #endregion + + #region 灏嗘簮鍗曚俊鎭瓨鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛� + + [WebMethod] + public Model.ClsKf_ICStockBill_WMS getSourceBill_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HHMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, Int64 HAccessFlag, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); + Int64 sMulSourceFlag = 0; //澶氭簮鍗曟爣蹇楋紙0涓洪潪澶氭簮鍗曟ā寮忥紝1涓哄婧愬崟妯″紡锛� + string sRedBlue = "钃濆瓧"; + if (HRedBlueflag) + { + sRedBlue = "绾㈠瓧"; + } + else + { + sRedBlue = "钃濆瓧"; + } + //澶氭簮鍗曟ā寮忔椂锛宻MulSourceFlag = 1 + if (HBillType == "1202" && oSystemParameterMain.Kf_ProductInBill_MulSourceBill == "Y") + { + //鐢熶骇鍏ュ簱鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1201" && oSystemParameterMain.Kf_POStockInBill_MulSourceBill == "Y") + { + //閲囪喘鍏ュ簱鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1210" && oSystemParameterMain.Kf_EntrustInBill_MulSourceBill == "Y") + { + //濮斿鍏ュ簱鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_MulSourceBill == "Y") + { + //鐢熶骇棰嗘枡鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1205" && oSystemParameterMain.Kf_SellOutBill_MulSourceBill == "Y") + { + //閿�鍞嚭搴撳崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1211" && oSystemParameterMain.Kf_EntrustOutBill_MulSourceBill == "Y") + { + //濮斿鍑哄簱鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "3711" && oSystemParameterMain.Sc_ICMOReportBill_MulSourceBill == "Y") + { + //鐢熶骇姹囨姤鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1254" && oSystemParameterMain.Kf_MateReplenishOutBill_MulSourceBill == "Y") + { + //鐢熶骇琛ユ枡鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1207" && oSystemParameterMain.Kf_MoveStockBill_MulSourceBill == "Y") + { + //鐩存帴璋冩嫧鍗� + sMulSourceFlag = 1; + } + else if (HBillType == "1250" && oSystemParameterMain.Kf_MoveStockStepOutBill_MulSourceBill == "Y") + { + //鍒嗘寮忚皟鍑哄崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1251" && oSystemParameterMain.Kf_MoveStockStepInBill_MulSourceBill == "Y") + { + //鍒嗘寮忚皟鍏ュ崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1245" && oSystemParameterMain.Kf_ProductInBackBill_MulSourceBill == "Y") + { + //鐢熶骇閫�搴撳崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1239" && oSystemParameterMain.Kf_POStockInBackBill_MulSourceBill == "Y") + { + //閲囪喘閫�鏂欏崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1246" && oSystemParameterMain.Kf_EntrustInBackBill_MulSourceBill == "Y") + { + //濮斿閫�搴撳崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1244" && oSystemParameterMain.Kf_MateOutBackBill_MulSourceBill == "Y") + { + //鐢熶骇閫�鏂欏崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1247" && oSystemParameterMain.Kf_SellOutBackBill_MulSourceBill == "Y") + { + //閿�鍞��璐у崟 + sMulSourceFlag = 1; + } + else if (HBillType == "1238" && oSystemParameterMain.Kf_EntrustOutBackBill_MulSourceBill == "Y") + { + //濮斿閫�鏂欏崟 + sMulSourceFlag = 1; + } + + //灏嗘簮鍗曚俊鎭瓨鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛� + DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + sRedBlue + "'," + sMulSourceFlag.ToString() + ",'" + HHMaker + "'," + HPTQty.ToString() + "," + HPlanMode.ToString() + "," + HFIFOWhID.ToString() + "," + HOWNERID.ToString() + "," + HAccessFlag.ToString(), "h_p_WMS_AddSourceBarCode_New"); + if (ds1 == null || ds1.Tables[0].Rows.Count == 0) + { + sErrMsg = "灏嗘簮鍗曚俊鎭瓨鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛ㄥけ璐ワ紒"; + return null; + } + else + { + if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0) + { + //鍏堣繘鍏堝嚭鎺у埗 + if ((HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_FIFOCtl == "Y") //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗 + || (HBillType == "1205" && oSystemParameterMain.Kf_SellOutBill_FIFOCtl == "Y") //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗 + || (HBillType == "1211" && oSystemParameterMain.Kf_EntrustOutBill_FIFOCtl == "Y")) //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗 + { + DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_Add " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_Add"); + if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) + { + sErrMsg = "瀛樺叆鍏堣繘鍏堝嚭涓存椂琛ㄥけ璐ワ紒"; + return null; + } + else + { + if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1) + { + sErrMsg = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]); + return null; + } + } + } + oBar.HBarType = "婧愬崟鏉$爜"; + oBar.HMulSourceFlag = sMulSourceFlag; + oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]); + oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]); + oBar.HSupID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSupID"]); + oBar.HSupName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSupName"]); + oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]); + oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]); + oBar.HCustom = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HCustom"]); + return oBar; + } + else + { + sErrMsg = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); + return null; + } + } + } + + #endregion + + #region 杩斿洖婧愬崟淇℃伅 //鏍规嵁鎵�杈撴簮鍗曞彿妯$硦鏌ヨ婧愬崟淇℃伅锛屽苟杩斿洖鏁版嵁锛堟寜婧愬崟閫夋嫨鎸夐挳鏃惰皟鐢級 @@ -32739,6 +32931,10 @@ #endregion + + #endregion + + #region 妗岄潰鏉$爜鐢熸垚澶栫綉鐗� [WebMethod] -- Gitblit v1.9.1