cqp před 2 měsíci
rodič
revize
0baa702c8e

+ 2 - 2
app/Service/DeviceWorkService.php

@@ -1053,7 +1053,7 @@ class DeviceWorkService extends Service
         $ruleSet = DB::table('rule_set_details as rd')
             ->join('rule_set as r', 'r.id', '=', 'rd.main_id')
             ->where('r.month', $monthStart)
-            ->where('rd.type', 2) // 设备类型
+            ->where('rd.type', RuleSetDetails::type_two) // 设备类型
             ->where('r.del_time', 0)
             ->where('rd.del_time', 0)
             ->select('rd.*')
@@ -1063,7 +1063,7 @@ class DeviceWorkService extends Service
         $usedItemIds = $ruleSet->pluck('item_id')->unique()->toArray();
         $itemMap = DB::table('item')
             ->whereIn('id', $usedItemIds)
-            ->pluck('title', 'id') // 这里的 title 对应你之前的需求
+            ->pluck('title', 'id')
             ->toArray();
 
         $ruleSetGrouped = $ruleSet->groupBy('data_id'); // 按 device_id 分组

+ 0 - 4
app/Service/PersonWorkService.php

@@ -1271,8 +1271,6 @@ class PersonWorkService extends Service
                     'is_create' => 1,
                     'crt_id' => $user['id'],
                     'crt_time' => $now,
-                    'upd_time' => $now,
-                    'del_time' => 0,
                 ]);
 
                 // 构造批量插入的明细数组
@@ -1289,8 +1287,6 @@ class PersonWorkService extends Service
                         'end_time_min'    => $d['end_min'],
                         'total_work_min'  => $d['total_work_min'],
                         'crt_time'        => $now,
-                        'upd_time'        => $now,
-                        'del_time'        => 0,
                     ];
                 }