cqp hai 1 mes
pai
achega
705e43f287
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      app/Service/TeamService.php

+ 2 - 4
app/Service/TeamService.php

@@ -74,8 +74,8 @@ class TeamService extends Service
                 $unit[] = [
                     'team_id' => $id,
                     'data_id' => $value['data_id'],
-                    'crt_time' => $time,
                     'top_depart_id' => $value['top_depart_id'],
+                    'crt_time' => $time,
                 ];
             }
             if(! empty($unit)) TeamDetails::insert($unit);
@@ -92,11 +92,10 @@ class TeamService extends Service
             ->get()->toArray();
         $map = array_column($map,null,'id');
 
-        $unit = $receipt = [];
+        $unit = [];
         foreach ($data as $value){
             $tmp = $map[$value['data_id']] ?? [];
             $unit[] = [
-                'type' => $value['type'],
                 'data_id' => $value['data_id'],
                 'data_title' => $tmp['title'],
                 'data_code' => $tmp['number'],
@@ -189,7 +188,6 @@ class TeamService extends Service
         if(! isset(Team::State_Type[$data['state']])) return [false, '状态不存在'];
         if(empty($data['man_list'])) return [false, '人员不能为空'];
         foreach ($data['man_list'] as $key => $value){
-            if(empty($value['type'])) return [false, '类型不能为空'];
             if(empty($value['data_id'])) return [false, '人员不能为空'];
             $data['man_list'][$key]['top_depart_id'] = $data['top_depart_id'];
         }