Browse Source

Merge branch 'dev_wf' of wugg/phpstock into version1.5

wufeng 2 years ago
parent
commit
a069830927
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/command/ImportOrderFromCHandleData.php

+ 4 - 4
app/command/ImportOrderFromCHandleData.php

@@ -66,9 +66,9 @@ class ImportOrderFromCHandleData extends Command
 
                 if ($customer == false) throw new Exception('未找到客户数据');
 
-                $supplierNo = $extend_data['supplierNo'];
-                $supplier = Db::name("supplier")
-                    ->where(["code" => $supplierNo])
+                $supplierNo = $extend_data['companyNo'];
+                $supplier = Db::name("business")
+                    ->where(["companyNo" => $supplierNo])
                     ->find();
                 if ($supplier == false) throw new Exception('未找到平台供应商数据');
 
@@ -101,7 +101,7 @@ class ImportOrderFromCHandleData extends Command
                     $stock = Db::name("good_stock")
                         ->alias("a")
                         ->leftJoin("warehouse_info b", "a.wsm_code=b.wsm_code")
-                        ->where(["spuCode" => $spuCode, "a.is_del" => 0, "a.status" => 1, "b.supplierNo" => $supplierNo])
+                        ->where(["spuCode" => $spuCode, "a.is_del" => 0, "a.status" => 1, "b.companyNo" => $supplierNo])
                         ->field("a.id,a.usable_stock,a.wait_out_stock")
                         ->find();