From a1e95405c9cb6d5d30d097d161ea54686ddbbcbf Mon Sep 17 00:00:00 2001 From: yxj <1qaz@123> Date: 星期二, 20 七月 2021 13:21:27 +0800 Subject: [PATCH] 扫物料条码存入条码临时表方法中增加批次码、品种码扫码时判断金蝶云库存;外购入库、委外入库(源单:收料通知单)上传方法中主表递入字段FSupplierId位置调整 --- CLOUDWEB/WebService1.asmx.cs | 93 +++++++++++++++++++++++++++++++++++++--------- 1 files changed, 74 insertions(+), 19 deletions(-) diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs index f72c542..315815a 100644 --- a/CLOUDWEB/WebService1.asmx.cs +++ b/CLOUDWEB/WebService1.asmx.cs @@ -19692,7 +19692,7 @@ "\"FPurchaseDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPurchaseDeptId"]) + "\"}," + "\"FPurchaserGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPurchaserGroupId"]) + "\"}," + "\"FPurchaserId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPurchaserId"]) + "\"}," + - "\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplierId"]) + "\"}," + + //"\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplierId"]) + "\"}," + //绉绘渶涓嬫柟 "\"FSupplyId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplyId"]) + "\"}," + "\"FSupplyAddress\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplyAddress"]) + "\"," + "\"FSettleId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSettleId"]) + "\"}," + @@ -19709,6 +19709,7 @@ "\"FDeliveryBill\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeliveryBill"]) + "\"," + "\"FTakeDeliveryBill\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FTakeDeliveryBill"]) + "\"," + "\"FBusinessType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBusinessType"]) + "\"," + + "\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplierId"]) + "\"}," + "\"FInStockFin\":{" + //\"FEntryId\":\"0\", @@ -23714,7 +23715,7 @@ "\"FPurchaseDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPurchaseDeptId"]) + "\"}," + "\"FPurchaserGroupId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPurchaserGroupId"]) + "\"}," + "\"FPurchaserId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPurchaserId"]) + "\"}," + - "\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplierId"]) + "\"}," + + //"\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplierId"]) + "\"}," + //绉绘渶涓嬫柟 "\"FSupplyId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplyId"]) + "\"}," + "\"FSupplyAddress\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplyAddress"]) + "\"," + "\"FSettleId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSettleId"]) + "\"}," + @@ -23730,6 +23731,7 @@ "\"FDeliveryBill\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeliveryBill"]) + "\"," + "\"FTakeDeliveryBill\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FTakeDeliveryBill"]) + "\"," + "\"FBusinessType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBusinessType"]) + "\"," + + "\"FSupplierId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSupplierId"]) + "\"}," + "\"FInStockFin\":{" + //\"FEntryId\":\"0\", @@ -29988,18 +29990,45 @@ //鑾峰彇鏉$爜鏁伴噺 if (dal.omodel_View.HBarCodeType != "鎵樼洏鏉$爜") { - if (dal.omodel_View.HBarCodeType == "鍞竴鏉$爜" && HQty > 0 && dal.omodel_View.HQty < HQty) + if (dal.omodel_View.HBarCodeType == "鍞竴鏉$爜") { - sRelQty = dal.omodel_View.HQty; - } - else if (HQty > 0) - { - sRelQty = HQty; + if (HQty > 0 && dal.omodel_View.HQty > HQty) + { + sRelQty = HQty; + } + else + { + sRelQty = dal.omodel_View.HQty; + } } else { - sRelQty = dal.omodel_View.HQty; + if (HQty > 0) + { + sRelQty = HQty; + } + else if(dal.omodel_View.HinitQty>0) + { + sRelQty = dal.omodel_View.HinitQty; + } + else + { + sRelQty = dal.omodel_View.HQty; + } } + + //if (dal.omodel_View.HBarCodeType == "鍞竴鏉$爜" && HQty > 0 && dal.omodel_View.HQty < HQty) + //{ + // sRelQty = dal.omodel_View.HQty; + //} + //else if (HQty > 0) + //{ + // sRelQty = HQty; + //} + //else + //{ + // sRelQty = dal.omodel_View.HQty; + //} //閲囪喘鍏ュ簱锛�1201锛夈�佷骇鍝佸叆搴擄紙1202锛夈�佸叾浠栧叆搴撹摑瀛楋紙1203锛夈�佸澶栧叆搴擄紙1210锛� //鐢熶骇閫�鏂欙紙1244锛夈�侀攢鍞��搴擄紙1247锛夈�佸叾浠栧嚭搴撶孩瀛楋紙1249锛夈�佸澶栭��鏂欙紙1238锛� //鐢熶骇棰嗘枡锛�1204锛夈�侀攢鍞嚭搴擄紙1205锛夈�佸叾浠栧嚭搴撹摑瀛楋紙1206锛夈�佸澶栧嚭搴擄紙1211锛� @@ -30012,24 +30041,50 @@ //闈炲敮涓�鏉$爜鎵弿鏃跺垽鏂粨搴撲粨浣嶆槸鍚﹀凡閫夋嫨 if (dal.omodel_View.HBarCodeType != "鍞竴鏉$爜") { - if (HWhID == 0) + if (oSystemParameter.omodel.WMS_ERPStockCtl == "N") { - sErrMsg = "浠撳簱娌℃湁閫夋嫨锛�"; - return false; + if (HWhID == 0) + { + sErrMsg = "浠撳簱娌℃湁閫夋嫨锛�"; + return false; + } + else + { + //鏍规嵁浠撳簱ID锛屽垽鏂槸鍚﹀惎鐢ㄤ粨浣� + DataSet ds3 = oCn.RunProcReturn(" select HSPFlag from Gy_Warehouse with(nolock) where HItemID= " + HWhID.ToString(), "Gy_Warehouse"); + if (ds3 == null || ds3.Tables[0].Rows.Count == 0) + { + sErrMsg = "浠撳簱鍐呯爜閿欒锛�"; + return false; + } + else if (HSPID == 0 && DBUtility.ClsPub.isBool(ds3.Tables[0].Rows[0]["HSPFlag"]) == true) + { + sErrMsg = "浠撲綅娌℃湁閫夋嫨锛�"; + return false; + } + } } else { - //鏍规嵁浠撳簱ID锛屽垽鏂槸鍚﹀惎鐢ㄤ粨浣� - DataSet ds3 = oCn.RunProcReturn(" select HSPFlag from Gy_Warehouse with(nolock) where HItemID= " + HWhID.ToString(), "Gy_Warehouse"); - if (ds3 == null || ds3.Tables[0].Rows.Count == 0) + //鍒ゆ柇ERP搴撳瓨 杩斿洖ERP搴撳瓨鏁伴噺 + DataSet ds6 = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + dal.omodel_View.HMaterID.ToString() + "," + dal.omodel_View.HAuxPropID.ToString() + ",'" + dal.omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory"); + if (ds6 == null || ds6.Tables[0].Rows.Count == 0) { - sErrMsg = "浠撳簱鍐呯爜閿欒锛�"; + sErrMsg = "鍒ゆ柇ERP搴撳瓨锛屾湭鐭ラ敊璇紒"; return false; } - else if (HSPID == 0 && DBUtility.ClsPub.isBool(ds3.Tables[0].Rows[0]["HSPFlag"]) == true) + else { - sErrMsg = "浠撲綅娌℃湁閫夋嫨锛�"; - return false; + if (DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0][0]) == 0) + { + dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0]["HMaterID"]); + HQty = DBUtility.ClsPub.isDoule(ds6.Tables[0].Rows[0]["HQty"]); + } + else + { + sErrMsg = DBUtility.ClsPub.isStrNull(ds6.Tables[0].Rows[0]["HRemark"]); + return false; + } } } } -- Gitblit v1.9.1