From 561be05b12a8bb531a18eb904ddb9ab34bced292 Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期二, 18 十月 2022 09:21:06 +0800 Subject: [PATCH] 新扫描物料条码方法修改、优化 --- CLOUDWEB/WebService1.asmx.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 45 insertions(+), 8 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index d64d193..67a6e35 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -32830,10 +32830,42 @@ public bool TempList_Modify(Int64 sHInterID, string sHBillNo, string sHBillType, ref string sErrMsg) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + string sFIFOCtl = "N"; //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級 + + //鑾峰彇绯荤粺鍙傛暟 + Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); + if (oSystemParameter.ShowBill(ref sErrMsg) == false) + { + sErrMsg = "鍗曟嵁鍙凤細" + sHBillNo + "锛屽崟鎹甀D锛�" + sHInterID + "锛涚偣鍑荤紪杈戞椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; + return false; + } + + //鍒ゆ柇鏄惁鍚敤鍏堣繘鍏堝嚭绠$悊(Y,N) + if (sHBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList == "Y")) //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗 + { + sFIFOCtl = "Y"; + } + else if (sHBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList == "Y")) //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗 + { + sFIFOCtl = "Y"; + } + else if (sHBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList == "Y")) //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗 + { + sFIFOCtl = "Y"; + } + else if (sHBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList == "Y")) //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗 + { + sFIFOCtl = "Y"; + } + else if (sHBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList == "Y")) //鍒嗘寮忚皟鍑哄崟-鍏堣繘鍏堝嚭鎺у埗 + { + sFIFOCtl = "Y"; + } + try { oCn.BeginTran(); - DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_TempList_Modify " + sHInterID + ",'" + sHBillNo + "','" + sHBillType + "'", "h_p_WMS_TempList_Modify"); + DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_TempList_Modify " + sHInterID + ",'" + sHBillNo + "','" + sHBillType + "','" + sFIFOCtl + "'", "h_p_WMS_TempList_Modify"); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { sErrMsg = "缂撳瓨鍒楄〃缂栬緫鍓嶅垽鏂け璐ワ紝鏁版嵁搴撹繛鎺ュけ璐ワ紒"; @@ -40298,7 +40330,7 @@ //鍏堣繘鍏堝嚭鎺у埗 if (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y") //绯荤粺鍙傛暟 鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗 { - DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_MateOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HPTQty.ToString() + "," + HFIFOWhID.ToString(), "h_p_WMS_AddSourceFIFO_MateOut"); + DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_MateOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HPTQty.ToString() + "," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFO_MateOut"); if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涘瓨鍏ュ厛杩涘厛鍑轰复鏃惰〃澶辫触锛�"; @@ -40316,7 +40348,7 @@ //鍏堣繘鍏堝嚭涓嬫灦娓呭崟 else if (oSystemParameter.omodel.Kf_MateOutBill_FIFOList == "Y") //绯荤粺鍙傛暟 鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭涓嬫灦娓呭崟 { - DataSet FIFOList = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFOList_MateOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HPTQty.ToString() + "," + HFIFOWhID.ToString(), "h_p_WMS_AddSourceFIFOList_MateOut"); + DataSet FIFOList = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFOList_MateOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HPTQty.ToString() + "," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFOList_MateOut"); if (FIFOList == null || FIFOList.Tables[0].Rows.Count == 0) { sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涘瓨鍏ュ厛杩涘厛鍑轰笅鏋舵竻鍗曞け璐ワ紒"; @@ -42163,7 +42195,7 @@ } //1銆侀娆℃壂鐮侀槻涓插崟鍒ゆ柇锛� 2銆佹簮鍗曠被鍨嬫槸鍚﹀湪婧愬崟鍒楄〃閲屽垽鏂紱 3銆佸敮涓�鏉$爜鏄惁瀛樺湪鐩稿悓鏉$爜鍒ゆ柇锛� 4銆佹湁婧愬崟锛岀墿鏂欐槸鍚﹀湪婧愬崟涓垽鏂� - DataSet dsSource = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_SourceInterID " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + omodel_View.HBarCode + "','" + HSourceBillType + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + "," + sSourceBillCtl + ",'" + sBatchNoCtl + "','" + sMultilineCtl + "','" + sMaterWHSPCtl + "','" + sSourceWHSPCtl + "'", "h_p_WMS_AddBarCode_SourceInterID"); + DataSet dsSource = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_SourceInterID " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + omodel_View.HBarCode + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + "," + DBUtility.ClsPub.BoolToString(SourceFlag) + "," + sSourceBillCtl + ",'" + sBatchNoCtl + "','" + sMultilineCtl + "','" + sMaterWHSPCtl + "','" + sSourceWHSPCtl + "'", "h_p_WMS_AddBarCode_SourceInterID"); if (dsSource == null || dsSource.Tables[0].Rows.Count == 0) { sErrMsg = "鍒ゆ柇鎵�鎵潯鐮佹槸鍚﹀湪鍗曟嵁涓彂鐢熼敊璇紒"; @@ -42265,8 +42297,8 @@ //搴撳瓨鎺у埗-WMS璐熷簱瀛樻帶鍒� 鍞竴鏉$爜銆佸惎鐢ㄦ潯鐮佸簱瀛橈紝浠撳簱浠撲綅鑾峰彇椤哄簭锛氱晫闈笂浠撳簱浠撲綅 > 鏉$爜搴撳瓨浠撳簱浠撲綅 if (omodel_View.HBarCodeType == "鍞竴鏉$爜" && oSystemParameterMain.WMS_WMSStockCtl == "Y") { - //鍒ゆ柇ERP搴撳瓨 杩斿洖ERP搴撳瓨鏁伴噺 - DataSet DsWMS = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetWMSICInventory " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_AddBarCode_GetWMSICInventory"); + //鍒ゆ柇鏉$爜搴撳瓨 杩斿洖鏉$爜搴撳瓨鏁伴噺 + DataSet DsWMS = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_GetWMSICInventory " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_GetWMSICInventory"); if (DsWMS == null || DsWMS.Tables[0].Rows.Count == 0) { sErrMsg = "鎵�鎵弿鐗╂枡鏉$爜锛� " + omodel_View.HBarCode + " 锛屾棤鏉$爜搴撳瓨锛�"; @@ -42389,7 +42421,7 @@ //鍏堣繘鍏堝嚭鎺у埗 if (sFIFOCtl == "Y") { - DataSet dsFIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HInterID.ToString() + ",'" + HBillType + "','" + oMain.HBatchNo + "','" + oMain.HBarCode + "'," + sRelQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); + DataSet dsFIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HInterID.ToString() + ",'" + HBillType + "','" + omodel_View.HBatchNo + "','" + omodel_View.HBarCode + "'," + sRelQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); if (dsFIFO == null || dsFIFO.Tables[0].Rows.Count == 0) { sErrMsg = "鍚敤鍏堣繘鍏堝嚭鎺у埗锛屾墍鎵潯鐮佷笉鍦ㄥ厛杩涘厛鍑哄垪琛ㄦ竻鍗曚腑锛�"; @@ -42550,6 +42582,11 @@ oMain.HSubBillType = "1270"; HCustom1 = ""; } + //鏉$爜绫诲瀷涓哄敮涓�鏉$爜锛屾壂鐮佸瓨鍏ユ椂 HRelationEntryID=1锛岀敤浜庡垽鏂埛鏂板垪琛ㄦ椂鍖哄垎鏄惁閲嶅鎵叆 + if (omodel_View.HBarCodeType == "鍞竴鏉$爜") + { + oMain.HRelationEntryID = 1; + } oMain.HInterID = HInterID; oMain.HBillNo = HBillNo; oMain.HBillType = HBillType; @@ -42567,7 +42604,7 @@ oMain.HSourceInterID = DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[i]["HSourceInterID"]); oMain.HSourceEntryID = DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[i]["HSourceEntryID"]); oMain.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillNo"]); - oMain.HSourceBillType = HSourceBillType; + oMain.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillType"]); oMain.HSTOCKORGID = HStockOrgID; oMain.HOWNERID = HStockOrgID; oMain.HCusBarCode = HCustom1; -- Gitblit v1.9.1