wugg 2 years ago
parent
commit
96cc65b900
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/model/OrderOutChild.php

+ 2 - 2
app/admin/model/OrderOutChild.php

@@ -100,8 +100,8 @@ class OrderOutChild extends Model
 
         if (empty($child)) throw new Exception("工单信息不能为空");
         $stock = self::name("good_stock")->alias("a")
-            ->leftJoin("warehouse_info b", "a.wsm_code=b.wsm_code and b.wsm_type in (2,5)")
-            ->where(["spuCode" => $child['spuCode'], "a.is_del" => 0, "b.companyNo" => $child['companyNo']])
+            ->leftJoin("warehouse_info b", "a.wsm_code=b.wsm_code")
+            ->where(["spuCode" => $child['spuCode'], "a.is_del" => 0,"b.wsm_type"=>[2,5], "b.companyNo" => $child['companyNo']])
             ->order("a.usable_stock desc")
             ->column("a.id,a.usable_stock,a.wait_out_stock,b.wsm_code,b.supplierNo,b.supplierName", "a.id");