From ac5c6781bbd39b8b1ee1c7670286f19d04f3ed10 Mon Sep 17 00:00:00 2001 From: lilili Date: Tue, 5 Sep 2023 13:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=95=B4=E5=8D=95=E6=8B=A3?= =?UTF-8?q?=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NFine.Application/WMS/PickMaterialApp.cs | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index d92cdb0..ec8f6e7 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -1924,18 +1924,22 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo { throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量大于单据需求数量,请尝试重新拣料。"); } - if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //{ + // chksql = @" select B.F_Define2 from ICSInventoryDetail A + // INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint + // where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; + // chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); + // var chkds = Repository().FindDataSetBySql(chksql); + // DataTable chkdt = chkds.Tables[0]; + // if (chkdt.Rows.Count != 0) + // { + // throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); + // } + //} + if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty) { - chksql = @" select B.F_Define2 from ICSInventoryDetail A - INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint - where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; - chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); - var chkds = Repository().FindDataSetBySql(chksql); - DataTable chkdt = chkds.Tables[0]; - if (chkdt.Rows.Count != 0) - { - throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); - } + throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); } } #endregion @@ -2517,18 +2521,23 @@ a.Sequence, { throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量大于单据需求数量,请尝试重新拣料。"); } - if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty && (Type == "2" || Type == "5" || Type == "12")) + //{ + // chksql = @" select B.F_Define2 from ICSInventoryDetail A + // INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint + // where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; + // chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); + // var chkds = Repository().FindDataSetBySql(chksql); + // DataTable chkdt = chkds.Tables[0]; + // if (chkdt.Rows.Count != 0) + // { + // throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); + // } + //} + + if (Convert.ToDecimal(chkdr["Quantity"]) > ZLQty) { - chksql = @" select B.F_Define2 from ICSInventoryDetail A - INNER JOIN Sys_SRM_ItemsDetail B ON B.F_Define1=A.WHCode AND B.F_Define2=A.LocationCode AND B.F_Define4=A.WorkPoint - where INVCode='{0}' and WHCode='{1}' and WorkPoint='{2}'"; - chksql = string.Format(chksql, chkdr["InvCode"].ToString(), chkdr["WHCode"].ToString(), WorkPoint); - var chkds = Repository().FindDataSetBySql(chksql); - DataTable chkdt = chkds.Tables[0]; - if (chkdt.Rows.Count != 0) - { - throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,货柜单据必须整单拣料,请先核对库存。"); - } + throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量小于单据需求数量,单据必须整单拣料,请先核对库存。"); } } #endregion