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){