cqpCow 1 year ago
parent
commit
8ea89193db
1 changed files with 8 additions and 0 deletions
  1. 8 0
      app/Service/ConstructionService.php

+ 8 - 0
app/Service/ConstructionService.php

@@ -360,6 +360,14 @@ class ConstructionService extends Service
         $sales = SalesOrder::where('id',$construction['sales_order_id'])->value('order_number');
         $construction['sales_order_number'] = $sales;
         $customer_title = Customer::where('id',$construction['customer_id'])->value('title');
+        $info = CustomerInfo::from('customer_info as a')
+            ->leftJoin('basic_type as b','b.id','a.contact_type')
+            ->where('a.del_time',0)
+            ->where('a.customer_id',$construction['customer_id'])
+            ->where('a.contact_type','>',0)
+            ->select('b.title','a.contact_info')
+            ->get()->toArray();
+        $construction['customer_array'] = $info;
         $construction['customer_title'] = $customer_title ?? "";
         $info = CustomerInfo::from('customer_info as a')
             ->leftJoin('basic_type as b','b.id','a.contact_type')