瀏覽代碼

小高薪

cqp 3 月之前
父節點
當前提交
c5d8ef161d
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/Service/RuleSetService.php

+ 3 - 2
app/Service/RuleSetService.php

@@ -5,6 +5,7 @@ namespace App\Service;
 use App\Model\Device;
 use App\Model\Employee;
 use App\Model\Item;
+use App\Model\ItemDetails;
 use App\Model\RuleSet;
 use App\Model\RuleSetDetails;
 use Illuminate\Support\Facades\DB;
@@ -445,9 +446,9 @@ class RuleSetService extends Service
         $deviceMap = []; // [设备ID => [项目ID1, 项目ID2...]]
 
         foreach ($details as $row) {
-            if ($row->type == RuleSetDetails::type_one) {
+            if ($row->type == ItemDetails::type_one) {
                 $manMap[$row->data_id][] = $row->item_id;
-            } elseif ($row->type == RuleSetDetails::type_two) {
+            } elseif ($row->type == ItemDetails::type_two) {
                 $deviceMap[$row->data_id][] = $row->item_id;
             }
         }