diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index 3fce521..04c618d 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -1129,7 +1129,13 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; } if (Type == "2") { - return GetICSMOPickMergeByWorkorder(ID, WorkPoint); + sqls = @"select + a.ApplyCode as Code, a.InvCode, b.InvName, b.InvStd, b.InvUnit, SUM(ISNULL(a.Quantity, 0)) AS iQuantity, a.WhCode,a.ExtensionID + FROM + ICSMOApply a + LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint + WHERE a.ApplyCode in ({0}) AND a.WorkPoint = '{1}' + GROUP BY a.ApplyCode,a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.WhCode,a.ExtensionID"; } if (Type == "3") { @@ -1304,14 +1310,14 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; } sqls = string.Format(sqls, ID, WorkPoint); - string sql = $@"SELECT row_number() over (order by c.Code,c.InvCode,d.MTIME,d.LotNO) AS rowNo, + string sql = $@"SELECT row_number() over ( order by c.Code,c.InvCode,d.MTIME,d.LotNO) AS rowNo, c.Code, c.InvCode, c.InvName, c.InvStd, c.InvUnit, FLOOR(c.iQuantity) AS iQuantity, - d.WarehouseCode, + c.WHCode AS WarehouseCode, d.LotNO, FLOOR(ISNULL(d.Quantity, 0)) AS QTY, d.LocationCode AS LocationCode, @@ -1324,7 +1330,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; where d.LotNo=m.LotNo and d.WorkPoint=m.WorkPoint and d.WorkPoint='{WorkPoint}' AND d.Quantity>0 ) d on c.InvCode=d.INVCode AND c.WhCode=d.WarehouseCode and d.ExtensionID=c.ExtensionID - LEFT JOIN (SELECT INVCode,WarehouseCode,SUM(Quantity) AS QTYTotal FROM ICSWareHouseLotInfo WHERE WorkPoint='1701' GROUP BY INVCode,WarehouseCode) f ON c.InvCode=f.INVCode AND c.WhCode=f.WarehouseCode + LEFT JOIN (SELECT INVCode,WarehouseCode,SUM(Quantity) AS QTYTotal FROM ICSWareHouseLotInfo WHERE WorkPoint='{WorkPoint}' GROUP BY INVCode,WarehouseCode) f ON c.InvCode=f.INVCode AND c.WhCode=f.WarehouseCode order by c.Code,c.InvCode,d.MTIME "; var dataset = Repository().FindDataSetBySql(sql); @@ -1334,11 +1340,13 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; decimal qtyCount = 0; bool remove = false; List removeList = new List(); - for (int i = 0; i < table.Rows.Count; i++) { + if (i != 0 - && !table.Rows[i]["InvCode"].ToString().Equals(table.Rows[i - 1]["InvCode"].ToString())) + && (!table.Rows[i]["InvCode"].ToString().Equals(table.Rows[i - 1]["InvCode"].ToString()) + || !table.Rows[i]["Code"].ToString().Equals(table.Rows[i - 1]["Code"].ToString())) + ) { qtyCount = 0; remove = false; diff --git a/WMS-BS/NFine.Web/Properties/PublishProfiles/NFine.Framework.Release.pubxml b/WMS-BS/NFine.Web/Properties/PublishProfiles/NFine.Framework.Release.pubxml index efeea66..01735be 100644 --- a/WMS-BS/NFine.Web/Properties/PublishProfiles/NFine.Framework.Release.pubxml +++ b/WMS-BS/NFine.Web/Properties/PublishProfiles/NFine.Framework.Release.pubxml @@ -7,11 +7,11 @@ FileSystem - D:\Send\SHZS - False - Release + D:\智合诚公司文件\项目\纽威\代码发布\BS + false + Debug Any CPU - True - False + true + false \ No newline at end of file