|
@@ -8,6 +8,7 @@ use App\Model\ConstructionFile;
|
|
|
use App\Model\ConstructionInfo;
|
|
|
use App\Model\ConstructionProductInfo;
|
|
|
use App\Model\Customer;
|
|
|
+use App\Model\CustomerInfo;
|
|
|
use App\Model\DeliveryNote;
|
|
|
use App\Model\Depart;
|
|
|
use App\Model\Employee;
|
|
@@ -360,6 +361,14 @@ class ConstructionService extends Service
|
|
|
$construction['sales_order_number'] = $sales;
|
|
|
$customer_title = Customer::where('id',$construction['customer_id'])->value('title');
|
|
|
$construction['customer_title'] = $customer_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['storehouse_title'] = Storehouse::where('id',$construction['storehouse_id'])->value('title');
|
|
|
$emp_title = Employee::where('id',$construction['customer_contact_id'])->value('emp_name');
|
|
|
$construction['customer_contact_title'] = $emp_title;
|