wuggemail@foxmail.com 3 meses atrás
pai
commit
bbc5685af7
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      app/cxinv/controller/FinancialProducts.php

+ 1 - 1
app/cxinv/controller/FinancialProducts.php

@@ -366,7 +366,7 @@ class FinancialProducts extends Base
         $this->model->startTrans();
         try {
             $use = (new ProductCheck)->saveAll($create);
-            if ($use == 0) throw new \think\Exception("批量新增盘点单失败");
+            if ($use->isEmpty()) throw new \think\Exception("批量新增盘点单失败");
             $this->model->commit();
         } catch (\Exception $e) {
             $this->model->rollback();