|
|
|
@ -832,6 +832,26 @@ class OrderController extends Controller
|
|
|
|
$asp = new AspNetZhuanController();
|
|
|
|
$asp = new AspNetZhuanController();
|
|
|
|
$asp::SendMsg($orderInfo->hospital_id, $orderInfo->phone, $orderInfo->name, $planInfo->date . ' ' . substr($planInfo->time, 0, 5),$orderInfo->sex);
|
|
|
|
$asp::SendMsg($orderInfo->hospital_id, $orderInfo->phone, $orderInfo->name, $planInfo->date . ' ' . substr($planInfo->time, 0, 5),$orderInfo->sex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if($orderInfo->checkup_type_id==4){ //如果是婚检调用his取消
|
|
|
|
|
|
|
|
$his_info=json_decode($orderInfo->his_info,true);
|
|
|
|
|
|
|
|
if(!!$his_info and isset($his_info['hunjian_yuyue_gid']) and !empty($his_info['hunjian_yuyue_gid'])){
|
|
|
|
|
|
|
|
$his_data=[
|
|
|
|
|
|
|
|
"action" => "2",
|
|
|
|
|
|
|
|
"yyid" => $yyid,
|
|
|
|
|
|
|
|
"ghzid" => $person->ghzid,
|
|
|
|
|
|
|
|
"ID"=>$his_info['hunjian_yuyue_gid']
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$res=$AspNet::HunjianHis($his_data);
|
|
|
|
|
|
|
|
if ($res['code'] == "200") {
|
|
|
|
|
|
|
|
$his_info['hunjian_yuyue_gid']=null;
|
|
|
|
|
|
|
|
$u = DB::table('orders')->where(['id' => $orderInfo->id])->update([
|
|
|
|
|
|
|
|
'his_info'=>json_encode($his_info, JSON_UNESCAPED_UNICODE)
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$orderInfo = DB::table('orders')->where(['id' => $orderid, 'status' => 2])->first();
|
|
|
|
|
|
|
|
$this->HisInsertHunjian($orderInfo,$yyid,$person);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return \Yz::Return(true, "操作完成", []);
|
|
|
|
return \Yz::Return(true, "操作完成", []);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1066,56 +1086,59 @@ class OrderController extends Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//如果是婚检发送给his
|
|
|
|
//如果是婚检发送给his
|
|
|
|
if($order_info->checkup_type_id==4 and isset($create_appointment['data'][0][0]) and $order_info->status==2){
|
|
|
|
if($order_info->checkup_type_id==4 and isset($create_appointment['data'][0][0]) and $order_info->status==2){
|
|
|
|
$sex='';
|
|
|
|
$this->HisInsertHunjian($order_info,$yyid,$person);
|
|
|
|
if($order_info->sex=='1') $sex='男';
|
|
|
|
}
|
|
|
|
if($order_info->sex=='2') $sex='女';
|
|
|
|
return ['status' => true, 'msg' => "完成"];
|
|
|
|
$loginfo=DB::table('questions_log')->where(['personid' => $order_info->person_id])->orderBy('id','desc')->first();
|
|
|
|
}
|
|
|
|
if(!$loginfo) return ['status' => false,'msg' => "未找到婚检问题记录"];
|
|
|
|
public function HisInsertHunjian($order_info,$yyid,$person){
|
|
|
|
$loginfo=json_decode($loginfo->content,true);
|
|
|
|
$loginfo=DB::table('questions_log')->where(['personid' => $order_info->person_id])->orderBy('id','desc')->first();
|
|
|
|
$data_array = [
|
|
|
|
if(!$loginfo) return ['status' => false,'msg' => "未找到婚检问题记录"];
|
|
|
|
"action" => "1",
|
|
|
|
$loginfo=json_decode($loginfo->content,true);
|
|
|
|
"ghzid" => $person->ghzid,
|
|
|
|
$sex='';
|
|
|
|
"yyid" => $yyid,
|
|
|
|
if($order_info->sex=='1') $sex='男';
|
|
|
|
"YYDH" => $order_info->phone,
|
|
|
|
if($order_info->sex=='2') $sex='女';
|
|
|
|
"YYXM" => $order_info->name,
|
|
|
|
$data_array = [
|
|
|
|
"YYXB" => $sex,
|
|
|
|
"action" => "1",
|
|
|
|
"YYSR" => $order_info->birthday,
|
|
|
|
"ghzid" => $person->ghzid,
|
|
|
|
"YYNL" => Tools::GetAge($order_info->birthday),
|
|
|
|
"yyid" => $yyid,
|
|
|
|
"YYZJ" =>$order_info->id_number,
|
|
|
|
"YYDH" => $order_info->phone,
|
|
|
|
"YYRQ" => $order_info->appointment_date,
|
|
|
|
"YYXM" => $order_info->name,
|
|
|
|
"YYSJ" => substr($order_info->appointment_time, 0, 5),
|
|
|
|
"YYXB" => $sex,
|
|
|
|
"YYSJ_B" => $order_info->appointment_time,
|
|
|
|
"YYSR" => $order_info->birthday,
|
|
|
|
"YYSJ_E" => $order_info->appointment_time,
|
|
|
|
"YYNL" => Tools::GetAge($order_info->birthday),
|
|
|
|
"YYSJ_BE" =>substr($order_info->appointment_time, 0, 5).'-'.substr($order_info->appointment_time, 0, 5),
|
|
|
|
"YYZJ" =>$order_info->id_number,
|
|
|
|
"zy"=>$loginfo['职业'],
|
|
|
|
"YYRQ" => $order_info->appointment_date,
|
|
|
|
"whcd"=>$loginfo['文化程度'],
|
|
|
|
"YYSJ" => substr($order_info->appointment_time, 0, 5),
|
|
|
|
"gj"=>$loginfo['国籍'],
|
|
|
|
"YYSJ_B" => $order_info->appointment_time,
|
|
|
|
"mz"=>$loginfo['民族'],
|
|
|
|
"YYSJ_E" => $order_info->appointment_time,
|
|
|
|
"csd"=>$loginfo['出生地'],
|
|
|
|
"YYSJ_BE" =>substr($order_info->appointment_time, 0, 5).'-'.substr($order_info->appointment_time, 0, 5),
|
|
|
|
"sBjSfz"=>$order_info->id_number,
|
|
|
|
"zy"=>$loginfo['职业'],
|
|
|
|
"s_province"=>$loginfo['户籍地址省市区'][0]['text'],
|
|
|
|
"whcd"=>$loginfo['文化程度'],
|
|
|
|
"s_city"=>$loginfo['户籍地址省市区'][1]['text'],
|
|
|
|
"gj"=>$loginfo['国籍'],
|
|
|
|
"s_county"=>$loginfo['户籍地址省市区'][2]['text'],
|
|
|
|
"mz"=>$loginfo['民族'],
|
|
|
|
"xxdz"=>$loginfo['现地址'],
|
|
|
|
"csd"=>$loginfo['出生地'],
|
|
|
|
"yzbm"=>"",
|
|
|
|
"sBjSfz"=>$order_info->id_number,
|
|
|
|
"dw"=>$loginfo['工作单位'],
|
|
|
|
"s_province"=>$loginfo['户籍地址省市区'][0]['text'],
|
|
|
|
"poxm"=>$loginfo['配偶姓名'],
|
|
|
|
"s_city"=>$loginfo['户籍地址省市区'][1]['text'],
|
|
|
|
"xb"=>$loginfo['血缘关系'],
|
|
|
|
"s_county"=>$loginfo['户籍地址省市区'][2]['text'],
|
|
|
|
"hjdz"=>$loginfo['户籍地址'],
|
|
|
|
"xxdz"=>$loginfo['现地址'],
|
|
|
|
|
|
|
|
"yzbm"=>"",
|
|
|
|
|
|
|
|
"dw"=>$loginfo['工作单位'],
|
|
|
|
|
|
|
|
"poxm"=>$loginfo['配偶姓名'],
|
|
|
|
|
|
|
|
"xb"=>$loginfo['血缘关系'],
|
|
|
|
|
|
|
|
"hjdz"=>$loginfo['户籍地址'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$aspnet=new AspNetZhuanController();
|
|
|
|
|
|
|
|
$res = $aspnet->HunjianHis($data_array);
|
|
|
|
|
|
|
|
if ($res['code'] == "200") {
|
|
|
|
|
|
|
|
$his_info=[
|
|
|
|
|
|
|
|
"hunjian_yuyue_gid"=>$res['gid'],
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$aspnet=new AspNetZhuanController();
|
|
|
|
$u = DB::table('orders')->where(['id' => $order_info->id])->update([
|
|
|
|
$res = $aspnet->HunjianHis($data_array);
|
|
|
|
'his_info'=>json_encode($his_info, JSON_UNESCAPED_UNICODE)
|
|
|
|
if ($res['code'] == "200") {
|
|
|
|
]);
|
|
|
|
$his_info=[
|
|
|
|
|
|
|
|
"hunjian_yuyue_gid"=>$res['gid'],
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$u = DB::table('orders')->where(['id' => $order_info->id])->update([
|
|
|
|
|
|
|
|
'his_info'=>json_encode($his_info, JSON_UNESCAPED_UNICODE)
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ['status' => true, 'msg' => "完成"];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|