|
@@ -135,6 +135,7 @@ class ConstructionService extends Service
|
|
$insert = [];
|
|
$insert = [];
|
|
foreach ($data['file'] as $value){
|
|
foreach ($data['file'] as $value){
|
|
$insert[] = [
|
|
$insert[] = [
|
|
|
|
+ 'order_number' => $data['order_number'],
|
|
'construction_id' => $data['id'],
|
|
'construction_id' => $data['id'],
|
|
'file' => $value['url'],
|
|
'file' => $value['url'],
|
|
'name' => $value['name'],
|
|
'name' => $value['name'],
|
|
@@ -254,6 +255,7 @@ class ConstructionService extends Service
|
|
$insert = [];
|
|
$insert = [];
|
|
foreach ($data['file'] as $value){
|
|
foreach ($data['file'] as $value){
|
|
$insert[] = [
|
|
$insert[] = [
|
|
|
|
+ 'order_number' => $data['order_number'],
|
|
'construction_id' => $data['id'],
|
|
'construction_id' => $data['id'],
|
|
'file' => $value['url'],
|
|
'file' => $value['url'],
|
|
'name' => $value['name'],
|
|
'name' => $value['name'],
|
|
@@ -298,7 +300,7 @@ class ConstructionService extends Service
|
|
->update(['del_time' => time()]);
|
|
->update(['del_time' => time()]);
|
|
ConstructionFile::where('del_time',0)
|
|
ConstructionFile::where('del_time',0)
|
|
->where('construction_id',$data['id'])
|
|
->where('construction_id',$data['id'])
|
|
- ->update(['del_time' => $time]);
|
|
|
|
|
|
+ ->update(['del_time' => time()]);
|
|
ConstructionProductInfo::where('del_time',0)
|
|
ConstructionProductInfo::where('del_time',0)
|
|
->where('construction_id',$data['id'])
|
|
->where('construction_id',$data['id'])
|
|
->update(['del_time' => time()]);
|
|
->update(['del_time' => time()]);
|
|
@@ -369,6 +371,14 @@ class ConstructionService extends Service
|
|
->select('b.title','a.contact_info')
|
|
->select('b.title','a.contact_info')
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
$construction['customer_array'] = $info;
|
|
$construction['customer_array'] = $info;
|
|
|
|
+ $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');
|
|
$construction['storehouse_title'] = Storehouse::where('id',$construction['storehouse_id'])->value('title');
|
|
$emp_title = Employee::where('id',$construction['customer_contact_id'])->value('emp_name');
|
|
$emp_title = Employee::where('id',$construction['customer_contact_id'])->value('emp_name');
|
|
$construction['customer_contact_title'] = $emp_title;
|
|
$construction['customer_contact_title'] = $emp_title;
|