团检 过期拦截 、婚检对接his

main
yanzai 11 months ago
parent 1582e79af8
commit 2caeb7a5ea

@ -140,6 +140,12 @@ class AspNetZhuanController extends Controller
$res= self::Post(self::$BaseUrl . '/sendwx.aspx?str='.$nonce,$data,'微信推送');
return $res;
}
//婚检插入his
public static function HunjianHis($data){
$nonce=uniqid();
$res= self::Post(self::$BaseUrl . '/hunjian.aspx?r='.$nonce,$data,'His信息Handle');
return $res;
}
public static function Get($url,$mark)
{

@ -1052,6 +1052,38 @@ class OrderController extends Controller
$dnet->WeiXinSend($data);
}
//如果是婚检发送给his
if($order_info->checkup_type_id==4 and isset($create_appointment['data'][0][0]) and $order_info->status==2){
$sex='';
if($order_info->sex=='1') $sex='男';
if($order_info->sex=='2') $sex='女';
$data_array = [
"action" => "1",
"ghzid" => $person->ghzid,
"yyid" => $yyid,
"YYDH" => $order_info->phone,
"YYXM" => $order_info->name,
"YYXB" => $sex,
"YYSR" => $order_info->birthday,
"YYNL" => Tools::GetAge($order_info->birthday),
"YYZJ" =>$order_info->id_number,
"YYRQ" => $order_info->appointment_date,
"YYSJ" => substr($order_info->appointment_time, 0, 5),
"YYSJ_B" => $order_info->appointment_time,
"YYSJ_E" => $order_info->appointment_time,
"YYSJ_BE" =>substr($order_info->appointment_time, 0, 5).'-'.substr($order_info->appointment_time, 0, 5),
];
$aspnet=new AspNetZhuanController();
$res = $aspnet->HunjianHis($data_array);
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' => "完成"];
}

@ -129,15 +129,19 @@ class PersonController extends Controller
];
$res = self::group_info($hospital_id, $data);
$dbinfo=DB::table('web_user_person')->where(['phone'=>$phone,'id_number'=>$id_number])->first();
$list=[];
if(!!$dbinfo){
foreach ($res as $key => $value) {
//dd($res[$key]);
$res[$key]['sex']=$dbinfo->sex;
$res[$key]['phone']=$dbinfo->phone;
$res[$key]['married']=$dbinfo->married ;
if($value['end_time']>=date('Y-m-d')){
$list[]= $res[$key];
}
}
return \Yz::Return(true,"查询完成",['unit'=>$res]);
}
return \Yz::Return(true,"查询完成",['unit'=>$list]);
}
//获取团检套餐
public function GetGroupCombo()

@ -57,12 +57,35 @@ class TestController extends Controller
//--------------
$aspnet=new AspNetZhuanController();
$res = $aspnet->GetPersonInfo([
"zjh" => "",
"action" => "2",
"ghzid"=>""
]);
// $res = $aspnet->GetPersonInfo([
// "zjh" => "",
// "action" => "2",
// "ghzid"=>""
// ]);
// $res=$aspnet::SendYanZhengMaCode(1,"19933509886");
$data_array = [
"action" => "1",
"yyid" => "6",
"ghzid" => "e159c45a2fe1449ba20698f141f22f01",
"YYDH" => "13383280827",
"YYXM" => "蒋成龙",
"YYXB" => "男",
"YYSR" => "1988-08-26",
"YYNL" => "36岁",
"YYZJ" => "130322198808264210",
"YYRQ" => "2024-10-31",
"YYSJ" => "20:00",
"YYSJ_B" => "20:00:00",
"YYSJ_E" => "20:00:00",
"YYSJ_BE" => "20:00-20:00"
];
$data2=[
"action" => "2",
"yyid" => "6",
"ghzid" => "e159c45a2fe1449ba20698f141f22f01",
"ID"=>"86d64cff41bb47e0ba3d482e5ce957b5"
];
$res = $aspnet->HunjianHis($data2);
dd($res);
//优惠券-----------------

@ -300,6 +300,24 @@ class OrderService
$s=new SanFangCodeService();
$cancel_hexiao=$s->CancelSanFangCode($sanfangcode['qudao_type'],$sanfangcode['code'],$orderInfo->id );
}
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)
]);
}
}
}
DB::table('orders')->where(['id' => $id])->update([
'status' => 5,
'refund_time'=>$now_datetime

@ -72,6 +72,10 @@ const choosePersonClick = async (info) => {
uni.hideLoading();
$response(response, () => {
unitList.value = response.data.unit;
if(unitList.value.length==0){
uni.$lu.toast("没有可预约的团检信息");
return false;
}
if (response.data.unit.length > 1) {
popup.value.open("bottom");
}

Loading…
Cancel
Save