From 28933bc391be3d7b6ff7337d16140aec620be770 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Wed, 26 Aug 2026 14:43:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=AD=A3=E5=9B=A2=E8=B4=AD?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=98=AF=E5=90=A6=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/wms/Wms.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/application/index/controller/wms/Wms.php b/application/index/controller/wms/Wms.php index f520768..850603b 100644 --- a/application/index/controller/wms/Wms.php +++ b/application/index/controller/wms/Wms.php @@ -903,6 +903,7 @@ class Wms extends Frontend } $GRABNUM = (isset($wmsOrder['wave_no']) && $wmsOrder['wave_no']) ? $wmsOrder['wave_no'] : $POSTNUM; $PLSENDFLAG = (isset($wmsOrder['recheck_status']) && $wmsOrder['recheck_status'] === 'fin') ? 1 : 0; + $isPACK = (isset($wmsOrder['pack_status']) && $wmsOrder['pack_status'] === 'none') ? 0 : 1; $STOREID = isset($wmsOrder['store_id']) ? $wmsOrder['store_id'] : 0; $STORE = isset($wmsResult['store_remark']) ? $wmsResult['store_remark'] : ''; $ITEMS = implode('|', $ITEMS_arr); @@ -918,6 +919,7 @@ class Wms extends Frontend 'POSTNUM' => $POSTNUM, 'STORE' => $STORE, 'STOCKS' => $STOCKS, + "isPack" => $isPACK, ]; // 构建 items 数组 $items_tmp = []; @@ -950,7 +952,11 @@ class Wms extends Frontend 'waveTotalOrders' => $totalOrders, 'itemsCount' => count($wmsItems), 'itemsTotal' => count($wmsItems), + '' ]; + + + $data['items'] = $items_tmp; // 缓存 newWmsData 供 startWork 打包时拉取,不传给前端 $this->redis->set("newWmsData:{$POSTNUM}", json_encode($newWmsData, JSON_UNESCAPED_UNICODE), 3600); @@ -8823,11 +8829,14 @@ class Wms extends Frontend }else{ $newWmsData = $this->redis->get("newWmsData:{$POSTNUM}"); if($newWmsData){ - $users = explode("|",$gzt->workers_ids); + $user_ids_arr = []; - foreach($users as $k => $v){ - [$username, $userId] = explode("_",$v); - array_push($user_ids_arr,$userId); + if($gzt->workers_ids){ + $users = explode("|",$gzt->workers_ids); + foreach($users as $k => $v){ + [$username, $userId] = explode("_",$v); + array_push($user_ids_arr,$userId); + } } $userModel = new \app\common\model\User; $userList = $userModel->where("id","in",$user_ids_arr)->select(); @@ -11749,8 +11758,6 @@ class Wms extends Frontend \think\Log::error("[new_wms_notify] 出参: " . json_encode($result, JSON_UNESCAPED_UNICODE)); - // 业务 code >= 400 时,HTTP 状态码同步为非200,调用方视为失败并重试 - $httpCode = (is_array($result) && isset($result['code']) && $result['code'] >= 400) ? $result['code'] : 200; - return json($result, $httpCode); + return json($result); } }