散单策略数组边界
This commit is contained in:
parent
615dd6f038
commit
5993d4850e
@ -3865,6 +3865,7 @@ class Wms extends Frontend
|
|||||||
$r["SPACEINDEX"] = 0;
|
$r["SPACEINDEX"] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unset($r);
|
||||||
|
|
||||||
$calcTime = round((microtime(true) - $stageStart) * 1000, 2);
|
$calcTime = round((microtime(true) - $stageStart) * 1000, 2);
|
||||||
// ========== 优化点3:重构包裹统计 ==========
|
// ========== 优化点3:重构包裹统计 ==========
|
||||||
@ -3891,12 +3892,13 @@ class Wms extends Frontend
|
|||||||
foreach ($tmporders as &$r) {
|
foreach ($tmporders as &$r) {
|
||||||
$r["packindex"] = $packCountMap[$r["PACKID"]] ?? 0;
|
$r["packindex"] = $packCountMap[$r["PACKID"]] ?? 0;
|
||||||
}
|
}
|
||||||
|
unset($r);
|
||||||
|
|
||||||
$packTime = round((microtime(true) - $stageStart) * 1000, 2);
|
$packTime = round((microtime(true) - $stageStart) * 1000, 2);
|
||||||
// ========== 后续代码保持不变,但速度会提升 ==========
|
// ========== 后续代码保持不变,但速度会提升 ==========
|
||||||
$stageStart = microtime(true);
|
$stageStart = microtime(true);
|
||||||
usort($tmporders,function($a,$b){
|
usort($tmporders,function($a,$b){
|
||||||
return ($a['SPACEINDEX'] > $b['SPACEINDEX']);
|
return $a['SPACEINDEX'] <=> $b['SPACEINDEX'];
|
||||||
});
|
});
|
||||||
$sort1Time = round((microtime(true) - $stageStart) * 1000, 2);
|
$sort1Time = round((microtime(true) - $stageStart) * 1000, 2);
|
||||||
if(count($tmporders)>20){
|
if(count($tmporders)>20){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user