cqp 3 ماه پیش
والد
کامیت
884d74595c
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      app/Service/EmployeeService.php

+ 2 - 2
app/Service/EmployeeService.php

@@ -61,7 +61,7 @@ class EmployeeService extends Service
             $model->number = $data['number'];
             $model->number = $data['number'];
             $model->title = $data['title'];
             $model->title = $data['title'];
             $model->mobile = $data['mobile'];
             $model->mobile = $data['mobile'];
-            $model->sex = $data['sex'];
+            $model->sex = $data['sex'] ?? 0;
             $model->education = $data['education'] ?? "";
             $model->education = $data['education'] ?? "";
             $model->id_card = $data['id_card'];
             $model->id_card = $data['id_card'];
             $model->major = $data['major'] ?? "";
             $model->major = $data['major'] ?? "";
@@ -122,7 +122,7 @@ class EmployeeService extends Service
             $model->number = $data['number'];
             $model->number = $data['number'];
             $model->title = $data['title'];
             $model->title = $data['title'];
             $model->mobile = $data['mobile'];
             $model->mobile = $data['mobile'];
-            $model->sex = $data['sex'];
+            $model->sex = $data['sex'] ?? 0;
             $model->education = $data['education'] ?? "";
             $model->education = $data['education'] ?? "";
             $model->id_card = $data['id_card'];
             $model->id_card = $data['id_card'];
             $model->major = $data['major'] ?? "";
             $model->major = $data['major'] ?? "";