From 2ddc844dd387220779ace973b7849c274c7e012a Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期四, 12 八月 2021 16:00:50 +0800 Subject: [PATCH] 新增流水线采集扫描物料条码调用方法,新增生产入库多源单缓存列表显示数据调用方法 --- CLOUDWEB/WebService1.asmx.cs | 199 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 199 insertions(+), 0 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index 9a68868..7969619 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -22214,6 +22214,22 @@ return dal.GetKf_PonderationBillMain_TempList(sHBillType, sWhere); } + //杩斿洖缂撳瓨鍒楄〃淇℃伅 鍚屾璧勬枡锛堢敓浜у叆搴撳婧愬崟绠卞彂涓撶敤锛� + [WebMethod] + public DataSet GetKf_PonderationBillMain_TempList_XF(string sHBillType,string HMaker,long HOWNERID,int sXFFlag) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_XFHanDian '" + sHBillType + "','" + HMaker + "'," + HOWNERID + "," + sXFFlag , "h_p_KF_GetPonderationBillMain_TempList_XFHanDian"); + if (Ds == null || Ds.Tables[0].Rows.Count == 0) + { + return null; + } + else + { + return Ds; + } + } + //杩斿洖缂撳瓨鍒楄〃淇℃伅 鍚屾璧勬枡锛堝�掔鍗曪級 [WebMethod] public DataSet GetKf_PonderationBillMain_TempList_ChangeBox(string sHBillType, string sWhere) @@ -27125,6 +27141,189 @@ #endregion + #region 鎵弿鐗╂枡鏉$爜 娴佹按绾块噰闆嗕笓鐢� + + [WebMethod] + public Model.ClsKf_ICStockBill_WMS get_CheckTypeByBarCode_Caiji(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, bool HRedBlueFlag, string HSourceBillType, Int64 HOWNERID, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); + + //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛� + if (set_SavePonderationBillMain_Temp_BarCode_Caiji(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HRedBlueFlag, HSourceBillType, HOWNERID, ref sErrMsg)) + { + //浠庢潯鐮佸嚭鍏ュ簱涓存椂琛� 涓幏鍙栬鍗曟嵁涓嬭鏉$爜鐨勪粨搴撲粨浣嶄俊鎭� + DataSet dsWS = oCn.RunProcReturn("exec h_p_Kf_GetOrgandWHSPByTemp_CLD " + HBillID.ToString() + ",'" + sBarCode + "'", "h_p_Kf_GetOrgandWHSPByTemp_CLD"); + if (dsWS == null || dsWS.Tables[0].Rows.Count == 0) + { + sErrMsg = "鑾峰彇鎵�鎵弿鏉$爜鍏ュ簱浠撳簱浠撲綅淇℃伅澶辫触锛�"; + return null; + } + else + { + oBar.HOWNERID = DBUtility.ClsPub.isLong(dsWS.Tables[0].Rows[0]["HOWNERID"]); + oBar.HOWNERNAME = DBUtility.ClsPub.isStrNull(dsWS.Tables[0].Rows[0]["HOWNERNAME"]); + oBar.HWhID = DBUtility.ClsPub.isLong(dsWS.Tables[0].Rows[0]["HWhID"]); + oBar.HWhName = DBUtility.ClsPub.isStrNull(dsWS.Tables[0].Rows[0]["HWhName"]); + oBar.HSPID = DBUtility.ClsPub.isLong(dsWS.Tables[0].Rows[0]["HSPID"]); + oBar.HSPName = DBUtility.ClsPub.isStrNull(dsWS.Tables[0].Rows[0]["HSPName"]); + } + } + else + { + sErrMsg = "鎵弿澶辫触锛�" + sErrMsg; + return null; + } + return oBar; + } + + #endregion + + #region 鎵弿鐗╂枡鏉$爜 娴佹按绾块噰闆嗕笓鐢� + + //鎵弿鐗╂枡鏉$爜 淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛�(鐗╂枡) 娴佹按绾块噰闆嗘ā鍧� + [WebMethod] + public bool set_SavePonderationBillMain_Temp_BarCode_Caiji(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, bool HRedBlueFlag, string HSourceBillType, Int64 HOWNERID, ref string sErrMsg) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + DAL.ClsKF_PonderationBillMain_Temp_Ctl tem = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); + Model.ClsKF_PonderationBillMain_Temp model = new Model.ClsKF_PonderationBillMain_Temp(); + double sRelQty = 0; + + //鍒ゆ柇鏉$爜鏄惁鍚壒娈婄鍙� # 锛屽鏋滃惈鏈夊垯 鎷嗗垎 + string[] NewBarCode; + if (sBarCode.CompareTo("#") > 0) + { + NewBarCode = sBarCode.Split(Convert.ToChar("#")); + sBarCode = NewBarCode[0]; + } + //鏍规嵁鏉$爜鑾峰彇鏉$爜淇℃伅 + DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View(); + if (dal.GetInfoByNumber_View(sBarCode)) + { + //浠庢潯鐮佽〃涓幏鍙栨潯鐮佹簮鍗曠被鍨嬩俊鎭� + DataSet ds2 = oCn.RunProcReturn(" select HSourceBillType from Gy_BarCodeBill where HBarCodeType='鍞竴鏉$爜' and HBarCode='" + sBarCode + "'", "Gy_BarCodeBill"); + if (ds2 == null || ds2.Tables[0].Rows.Count == 0) + { + sErrMsg = "鏉$爜绫诲瀷涓嶆纭紒"; + return false; + } + else + { + if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0][0]) != "3710") + { + sErrMsg = "鏉$爜婧愬崟淇℃伅閿欒锛屾墍鎵潯鐮佹簮鍗曠被鍨嬪繀椤讳负鐢熶骇璁㈠崟锛�"; + return false; + } + } + } + else + { + sErrMsg = "鏃犳晥鏉$爜"; + return false; + } + + //鍒ゆ柇骞惰幏鍙� 浠撳簱 浠撲綅淇℃伅 + DataSet ds3 = oCn.RunProcReturn("exec h_p_WMS_GetBillWHID " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_GetBillWHID"); + if (ds3 == null || ds3.Tables[0].Rows.Count == 0) + { + sErrMsg = "鍒ゆ柇骞惰幏鍙栦粨搴撲粨浣嶄俊鎭紝鏈煡閿欒锛�"; + return false; + } + else + { + if (DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0][0]) == 0) + { + HWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HWHID"]); + HSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSPID"]); + } + else + { + sErrMsg = DBUtility.ClsPub.isStrNull(ds3.Tables[0].Rows[0]["HRemark"]); + return false; + } + } + + //鑾峰彇鏉$爜鏁伴噺 + if (dal.omodel_View.HBarCodeType != "鎵樼洏鏉$爜") + { + sRelQty = dal.omodel_View.HQty; + + if (HRedBlueFlag) + { + //鍒ゆ柇鏉$爜搴撳瓨 杩斿洖搴撳瓨鏁伴噺 浠撳簱 浠撲綅 + DAL.ClsKF_PonderationBillMain_Temp_View Tempdal = new DAL.ClsKF_PonderationBillMain_Temp_View(); + if (Tempdal.CheckQtyByBarCode(HBillID, HBillType, sBarCode, ref HWhID, ref HSPID, sRelQty, ref sRelQty)) + { + + } + else + { + if (sRelQty == 0) + { + sErrMsg = "鏃犲簱瀛橈紒"; + return false; + } + else + { + sErrMsg = "搴撳瓨涓嶈冻锛屽凡鑾峰彇瀹為檯搴撳瓨鏁伴噺锛�"; + } + } + } + else + { + //鍒ゆ柇鏉$爜鎵弿鏁伴噺 杩斿洖鍓╀綑鏈壂鎻忔暟閲� + if (tem.IsBarCode(sBarCode, HBillType, HRedBlueFlag, ref sRelQty, ref sErrMsg)) + { + + } + else + { + sErrMsg = sErrMsg; + return false; + } + } + } + + model.HInterID = HBillID; + model.HBillNo = HBillNo; + model.HBillType = HBillType; + model.HMaker = HMaker; + // + model.HMaterID = dal.omodel_View.HMaterID; + model.HAuxPropID = dal.omodel_View.HAuxPropID; + model.HErpClsID = dal.omodel_View.HErpClsID; + model.HQty = sRelQty; + model.HQtyMust = 0; + model.HBarCode = dal.omodel_View.HBarCode; + model.HBatchNo = dal.omodel_View.HBatchNo; + model.HMTONo = dal.omodel_View.HMTONo; + + model.HWhID = HWhID; + model.HStockPlaceID = HSPID; + model.HSourceInterID = dal.omodel_View.HSourceInterID; + model.HSourceEntryID = dal.omodel_View.HSourceEntryID; + model.HSourceBillNo = dal.omodel_View.HSourceBillNo; + model.HSourceBillType = HSourceBillType; + model.HRedBlueFlag = HRedBlueFlag; + model.HPieceQty = 1; + model.HSTOCKORGID = dal.omodel_View.HSTOCKORGID; + model.HOWNERID = dal.omodel_View.HOWNERID; + + //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛� + if (set_SavePonderationBillMain_Temp_Select_Qty(model, 0, ref sErrMsg)) + { + + } + else + { + sErrMsg = "鎵弿澶辫触锛�" + sErrMsg; + return false; + } + return true; + } + + #endregion #endregion -- Gitblit v1.9.1