个检增加体检类型id,调整对接报告计算日期

main
yanzai 1 year ago
parent 4b6e944ac2
commit 207f3e8180

@ -640,6 +640,7 @@ class OrderController extends Controller
} }
//如果是个检 //如果是个检
if ($order_info->type == 1) { if ($order_info->type == 1) {
$checkup_type=DB::table('checkup_type')->where(['id' => $order_info->checkup_type_id])->first();
$cad = [ $cad = [
'type' => 1, 'type' => 1,
"姓名" => $order_info->name, "姓名" => $order_info->name,
@ -651,7 +652,7 @@ class OrderController extends Controller
"预约时间" => $order_info->appointment_date . ' ' . $order_info->appointment_time, "预约时间" => $order_info->appointment_date . ' ' . $order_info->appointment_time,
"介绍人" => $order_info->referral, "介绍人" => $order_info->referral,
'套餐Id' => $order_info->combo_id == 0 ? null : $order_info->combo_id, '套餐Id' => $order_info->combo_id == 0 ? null : $order_info->combo_id,
'体检类型Id'=>isset($checkup_type->sx_id)?$checkup_type->sx_id:null,
"已收费" => true, "已收费" => true,
]; ];

@ -37,7 +37,7 @@ class PlanController extends Controller
if(!$plan) return \Yz::echoError1("该号源不存在"); if(!$plan) return \Yz::echoError1("该号源不存在");
if($plan->status<>1) return \Yz::echoError1("该号源不已被占用,请重新选择"); if($plan->status<>1) return \Yz::echoError1("该号源不已被占用,请重新选择");
$u=DB::table('plans')->where(['id',$id,'status'=>1])->update(['status'=>2]); $u=DB::table('plans')->where(['id'=>$id,'status'=>1])->update(['status'=>2]);
if($u){ if($u){
return \Yz::Return(true,'操作成功',[]); return \Yz::Return(true,'操作成功',[]);
}else{ }else{

@ -12,8 +12,8 @@ class TestController extends Controller
{ {
public function DBtest(){ public function DBtest(){
echo DB::table('users')->count(); echo DB::table('users')->count();
//$order= new OrderService(); // $order= new OrderService();
// dd($order->DepartmentItemCount(33)); // dd($order->DepartmentItemCount(147));
$aspnet=new AspNetZhuanController(); $aspnet=new AspNetZhuanController();

@ -2,6 +2,7 @@
namespace App\Services; namespace App\Services;
use App\Http\Controllers\API\AspNetZhuanController; use App\Http\Controllers\API\AspNetZhuanController;
use App\Http\Controllers\API\PEISApiController;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
class OrderService class OrderService
@ -12,6 +13,15 @@ class OrderService
{ {
$order=DB::table('orders')->where('id',$id)->first(); $order=DB::table('orders')->where('id',$id)->first();
if(!$order) return ['status'=>false,'msg'=>'订单不存在']; if(!$order) return ['status'=>false,'msg'=>'订单不存在'];
$wait_day=false;
if(isset($order->tj_number) and !empty($order->tj_number)){
$peis = new PEISApiController();
$wait=$peis::Get($peis::Api('报告时间计算',"2403020020"),"111111","报告时间计算");
if(isset($wait['Data']['预计所需天数'])){
$wait_day=$wait['Data']['预计所需天数'];
}
}
$buy_info=json_decode($order->buy_info,true); $buy_info=json_decode($order->buy_info,true);
$list=[]; $list=[];
$drop_ids = ['519', '603']; $drop_ids = ['519', '603'];
@ -72,7 +82,7 @@ class OrderService
'count'=>count($item), 'count'=>count($item),
]; ];
} }
return ['department_list'=>$de_list,'wait_day'=>"10"]; return ['department_list'=>$de_list,'wait_day'=>$wait_day];
} }
public function Cancel($orderInfo) public function Cancel($orderInfo)

Loading…
Cancel
Save