Browse Source

fix:验货通过

super-yimizi 1 month ago
parent
commit
978f2785b4

+ 2 - 2
application/api/controller/inspection/Order.php

@@ -119,8 +119,7 @@ class Order extends Base
           
           if (empty($orderGoodsId)) {
               $this->error('订单商品ID不能为空');
-          }
-          
+          }        
           // 验证订单商品是否可以发货
           $orderData = OrderService::validateOrderGoodsForDelivery($orderId, $orderGoodsId);
           if (!$orderData) {
@@ -133,6 +132,7 @@ class Order extends Base
           $expressName = trim($params['express_name'] ?? '');
           $expressNo = trim($params['express_no'] ?? '');
           $expressImage = $params['express_image'] ?? [];
+         
           // 事务处理
           // 1. 更新订单商品发货状态
           $result = OrderService::updateOrderGoodsDeliveryStatus($orderGoodsId, $expressName, $expressNo, $expressImage);

+ 1 - 1
application/common/Service/InspectService.php

@@ -223,7 +223,7 @@ class InspectService
             OrderService::updateOrderGoodsInspectStatus($taskData['order_goods_id'], $inspectStatus);
             
             // 6. 检查订单是否所有商品都验收完成,决定是否更新订单状态
-            OrderService::updateOrderStatusByInspectResult($taskData['order_id'], $taskData['inspector_id'] ?? 0);
+            OrderService::updateOrderStatusByInspectResult($taskData['order_id'], 0);
             
             Db::commit();            
             return [1, '验货任务提交成功', ['task_id' => $taskId]];