From 615dd6f038a9970dd705248178215fad7c9a3072 Mon Sep 17 00:00:00 2001 From: nealo <381020974@qq.com> Date: Sun, 4 Oct 2026 20:36:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=A3=E5=8D=95=E5=8E=BB=E9=87=8D=E6=97=A0?= =?UTF-8?q?=E6=95=88=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/wms/Wms.php | 40 ------------------------ 1 file changed, 40 deletions(-) diff --git a/application/index/controller/wms/Wms.php b/application/index/controller/wms/Wms.php index d41c344..f9bb347 100644 --- a/application/index/controller/wms/Wms.php +++ b/application/index/controller/wms/Wms.php @@ -2566,16 +2566,6 @@ class Wms extends Frontend $Allitems = $OrderModel->field('ID,STOREID,POSTCODE,ITEMS,STOREID,JDFLAG,GOODSCOUNT,POSTNUM,PROVINCE,STOCKS,STORENAME')->where(["WAREHOUSEID"=>$WAREHOUSEID,"plSendFlag"=>0,"FLAG"=>0,"POSTFLAG"=>1,"ISLOCK"=>0])->where('GRABNUM IS NULL or GRABNUM=""')->where(["ASSIGNFLAG"=>1])->where($where)->select(); } - // 按订单ID去重:避免同一订单被重复计入,导致 ordercount 虚高(显示N单/抓取N-1单) - $__dedup = []; - $__seen = []; - foreach ($Allitems as $__it){ - $__oid = $__it['ID']; - if (isset($__seen[$__oid])) continue; - $__seen[$__oid] = true; - $__dedup[] = $__it; - } - $Allitems = $__dedup; $STOCKSarr = []; foreach ($Allitems as $order){ @@ -2795,16 +2785,6 @@ class Wms extends Frontend $Allitems = $OrderModel->field('ID,STOREID,POSTCODE,ITEMS,STOREID,JDFLAG,GOODSCOUNT,POSTNUM,PROVINCE,STOCKS,STORENAME,ECNOTES')->where(["WAREHOUSEID"=>$WAREHOUSEID,"PLSENDFLAG"=>0,"FLAG"=>0,"POSTFLAG"=>1,"ISLOCK"=>0])->where('GRABNUM IS NULL or GRABNUM=""')->where(["ASSIGNFLAG"=>1])->where($where)->select(); } - // 按订单ID去重:避免同一订单被重复计入,导致 ordercount 虚高(显示N单/抓取N-1单) - $__dedup = []; - $__seen = []; - foreach ($Allitems as $__it){ - $__oid = $__it['ID']; - if (isset($__seen[$__oid])) continue; - $__seen[$__oid] = true; - $__dedup[] = $__it; - } - $Allitems = $__dedup; array_push($times,time()-$lastTime); $lastTime = time(); @@ -3010,16 +2990,6 @@ class Wms extends Frontend $Allitems = $OrderModel->field('ID,STOREID,POSTCODE,ITEMS,STOREID,JDFLAG,ID,GOODSCOUNT,PROVINCE,STOCKS,STORENAME')->where(["WAREHOUSEID"=>$WAREHOUSEID,"plSendFlag"=>0,"ASSIGNFLAG"=>1,"POSTFLAG"=>1,"ISLOCK"=>0,"FLAG"=>0])->where('GRABNUM IS NULL or GRABNUM=""')->where($where)->select(); } - // 按订单ID去重:避免同一订单被重复计入,导致 ordercount 虚高(显示N单/抓取N-1单) - $__dedup = []; - $__seen = []; - foreach ($Allitems as $__it){ - $__oid = $__it['ID']; - if (isset($__seen[$__oid])) continue; - $__seen[$__oid] = true; - $__dedup[] = $__it; - } - $Allitems = $__dedup; $STOCKSarr = []; foreach ($Allitems as $order){ @@ -3210,16 +3180,6 @@ class Wms extends Frontend $Allitems = $OrderModel->field('ID,STOREID,POSTCODE,ITEMS,STOREID,JDFLAG,ID,GOODSCOUNT,PROVINCE,STOCKS,STORENAME,ECNOTES')->where(["WAREHOUSEID"=>$WAREHOUSEID,"plSendFlag"=>0,"ASSIGNFLAG"=>1,"POSTFLAG"=>1,"ISLOCK"=>0,"FLAG"=>0])->where('GRABNUM IS NULL or GRABNUM=""')->where($where)->select(); } - // 按订单ID去重:避免同一订单被重复计入,导致 ordercount 虚高(显示N单/抓取N-1单) - $__dedup = []; - $__seen = []; - foreach ($Allitems as $__it){ - $__oid = $__it['ID']; - if (isset($__seen[$__oid])) continue; - $__seen[$__oid] = true; - $__dedup[] = $__it; - } - $Allitems = $__dedup; $STOCKSarr = []; foreach ($Allitems as $order){