gogs 1 سال پیش
والد
کامیت
0dbf794711
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      app/Service/ConstructionService.php

+ 5 - 0
app/Service/ConstructionService.php

@@ -866,7 +866,12 @@ class ConstructionService extends Service
         if(isset($data['id'])) $model = DeliveryNote::where('id',$data['id'])->where('del_time',0)->first();
         if(isset($data['construction_order_number'])) $model = DeliveryNote::where('id',$data['construction_order_number'])->where('del_time',0)->first();
         if(empty($model)) return [false,'数据不存在!'];
+        $employee_key_list = Employee::pluck('emp_name','id')->toArray();
         $detail = $model;
+        foreach ($detail as &$v){
+            $v['install_man_title'] = $employee_key_list[$v['install_man']];
+            $v['sale_man_title'] = $employee_key_list[$v['sale_man']];
+        }
 
         return [true,$detail];
     }