This commit is contained in:
weiz 2023-12-12 17:46:53 +08:00
parent 738210732f
commit eacfc0f08e

View File

@ -122,9 +122,10 @@ class CustomerDemandController extends BaseAdminController
->select()->each(function($item){
$item['importance_text'] = $item->importance_text;
$item['recording_time'] = date('Y-m-d H:i:s',$item['recording_time']);
$project = Project::field('name,custom_id')->where('id',$item['project_id'])->findOrEmpty();
$project = Project::field('name,project_code,custom_id')->where('id',$item['project_id'])->findOrEmpty();
$custom = Custom::field('name')->where('id',$project['custom_id'])->findOrEmpty();
$item['project_name'] = $project['name'];
$item['project_code'] = $project['project_code'];
$item['custom_name'] = $custom['name'];
return $item;
})->toArray();