|
|
|
|
@ -12,12 +12,24 @@ class ReportController extends Controller
|
|
|
|
|
public function GetReportList()
|
|
|
|
|
{
|
|
|
|
|
$openid = request('openid');
|
|
|
|
|
$tj_status = request('tj_status');
|
|
|
|
|
if (!isset($openid)) return \Yz::echoError1("openid不能为空");
|
|
|
|
|
|
|
|
|
|
$user = DB::table('web_users')->where(['openid' => $openid, 'status' => 1, 'is_del' => 0])->first();
|
|
|
|
|
if (!$user) return \Yz::echoError1('用户不存在');
|
|
|
|
|
$persons = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->pluck('id_number')->toArray();
|
|
|
|
|
|
|
|
|
|
$list = DB::table('report_l1_records')->select('姓名', '性别', '登记时间', '套餐名称', '体检号', '体检状态', 'is_read')->whereIn('证件号码', $persons)->get();
|
|
|
|
|
$list = DB::table('report_l1_records')->select('姓名', '性别', '登记时间', '套餐名称', '体检号', '体检状态', 'is_read')->whereIn('证件号码', $persons);
|
|
|
|
|
if(isset($tj_status)){
|
|
|
|
|
if($tj_status===0){
|
|
|
|
|
$tj_status='报告未出';
|
|
|
|
|
}
|
|
|
|
|
if($tj_status===1){
|
|
|
|
|
$tj_status='报告已出';
|
|
|
|
|
}
|
|
|
|
|
$list=$list->where('体检状态', $tj_status);
|
|
|
|
|
}
|
|
|
|
|
$list=$list->get();
|
|
|
|
|
return \Yz::Return(true, "查询完成", ['list' => $list]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|