处理报告推送细节

main
yanzai 12 months ago
parent ae494a33ac
commit 32419f0f34

@ -115,10 +115,10 @@ class ReportController extends Controller
$report_res = new ReportService();
$save= $report_res->Save($res);
if($save->status){
if($save['status']){
$report = DB::table('report_l1_records as a')->where(['a.体检号' => $tijian_num])->first();
}else{
return $save;
return \Yz::Return($save['status'],$save['msg'],$save['data']);
}
}else{
return \Yz::echoError1("查询报告详情失败");

@ -31,7 +31,9 @@ class SiXinPushController extends Controller
//如果推送的是报告
if ($code == 'report') {
$report = new ReportService();
return $report->Save($content);
$report_save= $report->Save($content);
return \Yz::Return($report_save['status'],$report_save['msg'],$report_save['data']);
}
//如果推送的是套餐、项目、分组
if ($code == 'updateInfo') {

@ -15,6 +15,8 @@ use Illuminate\Support\Facades\Http;
class TestController extends Controller
{
public function DBtest(){
$a=$this->ApiTest();
dd($a->getContent());
//微信推送
// $data = [
// "ghzid" => "b3346cd4d63b49a58dbd9a41d69efde2",
@ -84,14 +86,14 @@ class TestController extends Controller
$peis = new PEISApiController();
$data = [
'电话号码' => "",
'证件号码' => "",
"预约Id"=>"3bcfa68d-8edd-40e6-a0ce-bca050be7961"
];
$reports = $peis::Post('团检预约查询', 1, $data);
dd($reports);
// $peis = new PEISApiController();
// $data = [
// '电话号码' => "",
// '证件号码' => "",
// "预约Id"=>"3bcfa68d-8edd-40e6-a0ce-bca050be7961"
// ];
// $reports = $peis::Post('团检预约查询', 1, $data);
// dd($reports);
// //到检
// $aa=Http::post('https://tj-h5.hnxdfe.com/TJCheck',[

@ -7,7 +7,8 @@ class ReportService
{
public function Save($res)
{
if(!isset($res['体检号'])) return \Yz::echoError1("数据非预期,缺失'体检号'");
//if(!isset($res['体检号'])) return \Yz::echoError1("数据非预期,缺失'体检号'");
if(!isset($res['体检号'])) return ['status'=>false,'msg'=>"数据非预期,缺失'体检号'",'data'=>'report'];
//根据体检号查询获取id万一不小心有多个相同的体检号 所以返回数组正常就1个
$report_l1_records_ids = DB::table('report_l1_records')->where(['体检号' => $res['体检号']])->pluck('id')->toArray();
//查找对应的收费项目列表 获取id数组
@ -93,6 +94,7 @@ class ReportService
}
return \Yz::Return(true,"接收完成",'report');
//return \Yz::Return(true,"接收完成",'report');
return ['status'=>true,'msg'=>'接收完成','data'=>'report'];
}
}

Loading…
Cancel
Save