updat
This commit is contained in:
parent
44489eea9d
commit
5d3258850f
@ -16,8 +16,9 @@ namespace app\adminapi\lists\supervision_prepare;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
use app\common\model\supervision_prepare\SupervisionPlanning;
|
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
|
use app\common\model\supervision_prepare\SupervisionPlanning;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
|
|
||||||
|
|
||||||
@ -61,9 +62,11 @@ class SupervisionPlanningLists extends BaseAdminDataLists implements ListsSearch
|
|||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name,project_manager')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name,project_manager')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['approval_user'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['project_manager'] = $project['project_manager'];
|
$data['project_manager'] = $project['project_manager'];
|
||||||
$data['approval_type_text'] = $data->approval_type_text;
|
$data['approval_type_text'] = $data->approval_type_text;
|
||||||
|
$data['approval_user_name'] = $admin?->name;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,11 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionDeviceEntry;
|
use app\common\model\supervision_work\SupervisionDeviceEntry;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
|
|
||||||
|
|
||||||
@ -64,9 +65,11 @@ class SupervisionDeviceEntryLists extends BaseAdminDataLists implements ListsSea
|
|||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['co_participant'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['enter_result_text'] = $data->enter_result_text;
|
$data['enter_result_text'] = $data->enter_result_text;
|
||||||
|
$data['co_participant_name'] = $admin?->name;
|
||||||
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 4)->count();
|
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 4)->count();
|
||||||
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 4)->where('is_rectification', 1)->count();
|
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 4)->where('is_rectification', 1)->count();
|
||||||
})
|
})
|
||||||
|
@ -16,9 +16,10 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionDiary;
|
use app\common\model\supervision_work\SupervisionDiary;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,7 +62,10 @@ class SupervisionDiaryLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['user'], $data['director']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
|
$data['user_name'] = $admin[$data['user']] ?? '';
|
||||||
|
$data['director_name'] = $admin[$data['director']] ?? '';
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,12 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||||
use app\common\model\supervision_work\SupervisionInspection;
|
use app\common\model\supervision_work\SupervisionInspection;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
|
|
||||||
|
|
||||||
@ -67,12 +68,14 @@ class SupervisionInspectionLists extends BaseAdminDataLists implements ListsSear
|
|||||||
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
||||||
|
$admin = Admin::where('id', 'in', [$data['inspection_user'], $data['follow_user']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['check_item_name'] = $check_item['node_name'];
|
$data['check_item_name'] = $check_item['node_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
||||||
$data['inspection_type_text'] = $data->inspection_type_text;
|
$data['inspection_type_text'] = $data->inspection_type_text;
|
||||||
$data['is_important_text'] = $data->is_important_text;
|
$data['is_important_text'] = $data->is_important_text;
|
||||||
|
$data['follow_user_name'] = $admin[$data['follow_user']] ?? '';
|
||||||
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 1)->count();
|
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 1)->count();
|
||||||
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 1)->where('is_rectification', 1)->count();
|
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 1)->where('is_rectification', 1)->count();
|
||||||
})
|
})
|
||||||
|
@ -16,11 +16,11 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntryDetail;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,10 +64,12 @@ class SupervisionMaterialEntryLists extends BaseAdminDataLists implements ListsS
|
|||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['co_participant'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['enter_result_text'] = $data->enter_result_text;
|
$data['enter_result_text'] = $data->enter_result_text;
|
||||||
$data['parallel_test_text'] = $data->parallel_test_text;
|
$data['parallel_test_text'] = $data->parallel_test_text;
|
||||||
|
$data['co_participant_name'] = $admin?->name;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,12 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialParallelTesting;
|
use app\common\model\supervision_work\SupervisionMaterialParallelTesting;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,11 +66,13 @@ class SupervisionMaterialParallelTestingLists extends BaseAdminDataLists impleme
|
|||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$material_entry = SupervisionMaterialEntry::field('code,theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
$material_entry = SupervisionMaterialEntry::field('code,theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['inspector'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['material_entry_code'] = $material_entry['code'];
|
$data['material_entry_code'] = $material_entry['code'];
|
||||||
$data['theme'] = $material_entry['theme'];
|
$data['theme'] = $material_entry['theme'];
|
||||||
$data['enter_time'] = $material_entry['enter_time'];
|
$data['enter_time'] = $material_entry['enter_time'];
|
||||||
|
$data['inspector_name'] = $admin?->name;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,11 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionNotice;
|
use app\common\model\supervision_work\SupervisionNotice;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,8 +64,11 @@ class SupervisionNoticeLists extends BaseAdminDataLists implements ListsSearchIn
|
|||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['notify_user'], $data['rectification_reply_user']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
|
$data['notify_user_name'] = $admin[$data['notify_user']] ?? '';
|
||||||
|
$data['rectification_reply_user_name'] = $admin[$data['rectification_reply_user']] ?? '';
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,13 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
use app\common\model\supervision_work\SupervisionSideStation;
|
use app\common\model\supervision_work\SupervisionSideStation;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,12 +68,14 @@ class SupervisionSideStationLists extends BaseAdminDataLists implements ListsSea
|
|||||||
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
||||||
|
$admin = Admin::field('name')->where('id', $data['side_station_user'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['check_item_name'] = $check_item['node_name'];
|
$data['check_item_name'] = $check_item['node_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
||||||
$data['side_station_type_text'] = $data->side_station_type_text;
|
$data['side_station_type_text'] = $data->side_station_type_text;
|
||||||
$data['side_station_result_text'] = $data->side_station_result_text;
|
$data['side_station_result_text'] = $data->side_station_result_text;
|
||||||
|
$data['side_station_user_name'] = $admin?->name;
|
||||||
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 2)->count();
|
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 2)->count();
|
||||||
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 2)->where('is_rectification', 1)->count();
|
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 2)->where('is_rectification', 1)->count();
|
||||||
})
|
})
|
||||||
|
@ -16,11 +16,12 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
use app\common\model\supervision_work\SupervisionTestBlocksSpecimens;
|
use app\common\model\supervision_work\SupervisionTestBlocksSpecimens;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,9 +65,11 @@ class SupervisionTestBlocksSpecimensLists extends BaseAdminDataLists implements
|
|||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['witness'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['test_result_text'] = $data->test_result_text;
|
$data['test_result_text'] = $data->test_result_text;
|
||||||
|
$data['witness_name'] = $admin?->name;
|
||||||
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 6)->count();
|
$data['problem_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 6)->count();
|
||||||
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 6)->where('is_rectification', 1)->count();
|
$data['reply_num'] = SupervisionProblem::field('id')->where('data_id', $data['id'])->where('data_type', 6)->where('is_rectification', 1)->count();
|
||||||
})
|
})
|
||||||
|
@ -16,12 +16,12 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
||||||
use app\common\model\supervision_work\SupervisionWitnessSampling;
|
use app\common\model\supervision_work\SupervisionWitnessSampling;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
use app\common\model\supervision_work\SupervisionWitnessSamplingDetail;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,11 +66,14 @@ class SupervisionWitnessSamplingLists extends BaseAdminDataLists implements List
|
|||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$material_entry = SupervisionMaterialEntry::field('code,theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
$material_entry = SupervisionMaterialEntry::field('code,theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['witness'], $data['sampler']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['material_entry_code'] = $material_entry['code'];
|
$data['material_entry_code'] = $material_entry['code'];
|
||||||
$data['theme'] = $material_entry['theme'];
|
$data['theme'] = $material_entry['theme'];
|
||||||
$data['enter_time'] = $material_entry['enter_time'];
|
$data['enter_time'] = $material_entry['enter_time'];
|
||||||
|
$data['witness_name'] = $admin[$data['witness']] ?? '';
|
||||||
|
$data['sampler_name'] = $admin[$data['sampler']] ?? '';
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,10 @@ namespace app\adminapi\lists\supervision_work;
|
|||||||
|
|
||||||
|
|
||||||
use app\adminapi\lists\BaseAdminDataLists;
|
use app\adminapi\lists\BaseAdminDataLists;
|
||||||
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionWorkContact;
|
use app\common\model\supervision_work\SupervisionWorkContact;
|
||||||
use app\common\lists\ListsSearchInterface;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,7 +63,10 @@ class SupervisionWorkContactLists extends BaseAdminDataLists implements ListsSea
|
|||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($data) {
|
->select()->each(function ($data) {
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['initiator'], $data['copy_user']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
|
$data['initiator_name'] = $admin[$data['initiator']] ?? '';
|
||||||
|
$data['copy_user_name'] = $admin[$data['copy_user']] ?? '';
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
namespace app\adminapi\logic\supervision_prepare;
|
namespace app\adminapi\logic\supervision_prepare;
|
||||||
|
|
||||||
|
|
||||||
use app\common\model\supervision_prepare\SupervisionPlanning;
|
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
|
use app\common\model\supervision_prepare\SupervisionPlanning;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -119,9 +120,11 @@ class SupervisionPlanningLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
$data = SupervisionPlanning::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionPlanning::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name,project_manager')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name,project_manager')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['approval_user'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['project_manager'] = $project['project_manager'];
|
$data['project_manager'] = $project['project_manager'];
|
||||||
$data['approval_type_text'] = $data->approval_type_text;
|
$data['approval_type_text'] = $data->approval_type_text;
|
||||||
|
$data['approval_user_name'] = $admin?->name;
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,10 +15,11 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionDeviceEntry;
|
use app\common\model\supervision_work\SupervisionDeviceEntry;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionDeviceEntryDetail;
|
use app\common\model\supervision_work\SupervisionDeviceEntryDetail;
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -212,9 +213,11 @@ class SupervisionDeviceEntryLogic extends BaseLogic
|
|||||||
$data = SupervisionDeviceEntry::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionDeviceEntry::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['co_participant'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['enter_result_text'] = $data->enter_result_text;
|
$data['enter_result_text'] = $data->enter_result_text;
|
||||||
|
$data['co_participant_name'] = $admin?->name;
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,9 +15,10 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionDiary;
|
use app\common\model\supervision_work\SupervisionDiary;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
@ -125,7 +126,10 @@ class SupervisionDiaryLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
$data = SupervisionDiary::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionDiary::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['user'], $data['director']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
|
$data['user_name'] = $admin[$data['user']] ?? '';
|
||||||
|
$data['director_name'] = $admin[$data['director']] ?? '';
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,11 +15,12 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||||
use app\common\model\supervision_work\SupervisionInspection;
|
use app\common\model\supervision_work\SupervisionInspection;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionInspectionResult;
|
use app\common\model\supervision_work\SupervisionInspectionResult;
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -225,12 +226,15 @@ class SupervisionInspectionLogic extends BaseLogic
|
|||||||
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
||||||
|
$admin = Admin::where('id', 'in', [$data['inspection_user'], $data['follow_user']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['check_item_name'] = $check_item['node_name'];
|
$data['check_item_name'] = $check_item['node_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
||||||
$data['inspection_type_text'] = $data->inspection_type_text;
|
$data['inspection_type_text'] = $data->inspection_type_text;
|
||||||
$data['is_important_text'] = $data->is_important_text;
|
$data['is_important_text'] = $data->is_important_text;
|
||||||
|
$data['inspection_user_name'] = $admin[$data['inspection_user']] ?? '';
|
||||||
|
$data['follow_user_name'] = $admin[$data['follow_user']] ?? '';
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,10 +15,11 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntryDetail;
|
use app\common\model\supervision_work\SupervisionMaterialEntryDetail;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -169,10 +170,12 @@ class SupervisionMaterialEntryLogic extends BaseLogic
|
|||||||
$data = SupervisionMaterialEntry::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionMaterialEntry::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['co_participant'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['enter_result_text'] = $data->enter_result_text;
|
$data['enter_result_text'] = $data->enter_result_text;
|
||||||
$data['parallel_test_text'] = $data->parallel_test_text;
|
$data['parallel_test_text'] = $data->parallel_test_text;
|
||||||
|
$data['co_participant_name'] = $admin?->name;
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialParallelTesting;
|
use app\common\model\supervision_work\SupervisionMaterialParallelTesting;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionMaterialParallelTestingDetail;
|
use app\common\model\supervision_work\SupervisionMaterialParallelTestingDetail;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -155,10 +156,12 @@ class SupervisionMaterialParallelTestingLogic extends BaseLogic
|
|||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$material_entry = SupervisionMaterialEntry::field('theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
$material_entry = SupervisionMaterialEntry::field('theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['inspector'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['material_entry_name'] = $material_entry['theme'];
|
$data['material_entry_name'] = $material_entry['theme'];
|
||||||
$data['enter_time'] = $material_entry['enter_time'];
|
$data['enter_time'] = $material_entry['enter_time'];
|
||||||
|
$data['inspector_name'] = $admin?->name;
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,9 +15,10 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMeetingMinutes;
|
use app\common\model\supervision_work\SupervisionMeetingMinutes;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
@ -125,7 +126,11 @@ class SupervisionMeetingMinutesLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
$data = SupervisionMeetingMinutes::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionMeetingMinutes::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['emcee'], $data['recorder']])->column('name', 'id');
|
||||||
|
$attendees = Admin::where('id', 'in', $data['attendees'])->column('name');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
|
$data['emcee_name'] = $admin[$data['emcee']] ?? '';
|
||||||
|
$data['recorder_name'] = $admin[$data['recorder']] ?? '';
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,10 +15,11 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionNotice;
|
use app\common\model\supervision_work\SupervisionNotice;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionNoticeProblem;
|
use app\common\model\supervision_work\SupervisionNoticeProblem;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -181,8 +182,11 @@ class SupervisionNoticeLogic extends BaseLogic
|
|||||||
$data = SupervisionNotice::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionNotice::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['notify_user'], $data['rectification_reply_user']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
|
$data['notify_user_name'] = $admin[$data['notify_user']] ?? '';
|
||||||
|
$data['rectification_reply_user_name'] = $admin[$data['rectification_reply_user']] ?? '';
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,12 +15,13 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionCheckItem;
|
use app\common\model\supervision_work\SupervisionCheckItem;
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
use app\common\model\supervision_work\SupervisionSideStation;
|
use app\common\model\supervision_work\SupervisionSideStation;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionSideStationResult;
|
use app\common\model\supervision_work\SupervisionSideStationResult;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -224,12 +225,14 @@ class SupervisionSideStationLogic extends BaseLogic
|
|||||||
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
$check_item = SupervisionCheckItem::field('node_name')->where('id', $data['check_item_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
$check_item_detail = SupervisionCheckItem::where('id', 'in', $data['check_item_detail_ids'])->column('node_name');
|
||||||
|
$admin = Admin::field('name')->where('id', $data['side_station_user'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['check_item_name'] = $check_item['node_name'];
|
$data['check_item_name'] = $check_item['node_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
$data['check_item_detail_name'] = implode(',', $check_item_detail);
|
||||||
$data['side_station_type_text'] = $data->side_station_type_text;
|
$data['side_station_type_text'] = $data->side_station_type_text;
|
||||||
$data['side_station_result_text'] = $data->side_station_result_text;
|
$data['side_station_result_text'] = $data->side_station_result_text;
|
||||||
|
$data['side_station_user_name'] = $admin?->name;
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,11 +15,12 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionProblem;
|
use app\common\model\supervision_work\SupervisionProblem;
|
||||||
use app\common\model\supervision_work\SupervisionTestBlocksSpecimens;
|
use app\common\model\supervision_work\SupervisionTestBlocksSpecimens;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
|
|
||||||
@ -168,9 +169,11 @@ class SupervisionTestBlocksSpecimensLogic extends BaseLogic
|
|||||||
$data = SupervisionTestBlocksSpecimens::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionTestBlocksSpecimens::withoutField('update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $data['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::field('name')->where('id', $data['witness'])->findOrEmpty();
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['test_result_text'] = $data->test_result_text;
|
$data['test_result_text'] = $data->test_result_text;
|
||||||
|
$data['witness_name'] = $admin?->name;
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,11 +15,12 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
use app\common\model\supervision_project\SupervisionParticipatingUnits;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
use app\common\model\supervision_work\SupervisionMaterialEntry;
|
||||||
use app\common\model\supervision_work\SupervisionWitnessSampling;
|
use app\common\model\supervision_work\SupervisionWitnessSampling;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionWitnessSamplingDetail;
|
use app\common\model\supervision_work\SupervisionWitnessSamplingDetail;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -156,10 +157,13 @@ class SupervisionWitnessSamplingLogic extends BaseLogic
|
|||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
$material_entry = SupervisionMaterialEntry::field('theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
$material_entry = SupervisionMaterialEntry::field('theme,company_id,enter_time')->where('id', $data['material_entry_id'])->findOrEmpty();
|
||||||
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
$company = SupervisionParticipatingUnits::field('unit_name')->where('id', $material_entry['company_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['witness'], $data['sampler']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
$data['company_name'] = $company['unit_name'];
|
$data['company_name'] = $company['unit_name'];
|
||||||
$data['material_entry_name'] = $material_entry['theme'];
|
$data['material_entry_name'] = $material_entry['theme'];
|
||||||
$data['enter_time'] = $material_entry['enter_time'];
|
$data['enter_time'] = $material_entry['enter_time'];
|
||||||
|
$data['witness_name'] = $admin[$data['witness']] ?? '';
|
||||||
|
$data['sampler_name'] = $admin[$data['sampler']] ?? '';
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,9 +15,10 @@
|
|||||||
namespace app\adminapi\logic\supervision_work;
|
namespace app\adminapi\logic\supervision_work;
|
||||||
|
|
||||||
|
|
||||||
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\model\auth\Admin;
|
||||||
use app\common\model\supervision_project\SupervisionProject;
|
use app\common\model\supervision_project\SupervisionProject;
|
||||||
use app\common\model\supervision_work\SupervisionWorkContact;
|
use app\common\model\supervision_work\SupervisionWorkContact;
|
||||||
use app\common\logic\BaseLogic;
|
|
||||||
use app\common\model\supervision_work\SupervisionWorkContactProblem;
|
use app\common\model\supervision_work\SupervisionWorkContactProblem;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -146,7 +147,10 @@ class SupervisionWorkContactLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
$data = SupervisionWorkContact::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
$data = SupervisionWorkContact::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||||
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
$project = SupervisionProject::field('project_name')->where('id', $data['project_id'])->findOrEmpty();
|
||||||
|
$admin = Admin::where('id', 'in', [$data['initiator'], $data['copy_user']])->column('name', 'id');
|
||||||
$data['project_name'] = $project['project_name'];
|
$data['project_name'] = $project['project_name'];
|
||||||
|
$data['initiator_name'] = $admin[$data['initiator']] ?? '';
|
||||||
|
$data['copy_user_name'] = $admin[$data['copy_user']] ?? '';
|
||||||
return $data->toArray();
|
return $data->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user