首页关闭检后复检,获取可用积分

main
yanzai 1 year ago
parent 34321489d9
commit 27dc026cb8

@ -20,14 +20,11 @@ class AspNetZhuanController extends Controller
if ($type == 1) return $res['剩余积分']; if ($type == 1) return $res['剩余积分'];
if ($type == 2) return $res['剩余预存款']; if ($type == 2) return $res['剩余预存款'];
} }
//获取本次账单可使用的积分和可抵扣的金额 //获取本次账单可使用的积分
public static function GetEnableCount($ghzid,$ysje,$ssje) public static function GetEnableCount($ghzid,$ysje,$ssje)
{ {
$res = self::Get(self::$JF_BaseUrl . '?type=3' . '&ghzid=' . $ghzid. '&ysje=' . $ysje. '&ssje=' . $ssje); $res = self::Get(self::$JF_BaseUrl . '?type=3' . '&ghzid=' . $ghzid. '&ysje=' . $ysje. '&ssje=' . $ssje);
return [ return $res['本次账单可抵扣积分'];
'keyong_jifen'=>$res['本次账单可抵扣积分'],
'keyong_jine'=>$res['本次账单可抵扣金额'],
];
} }
public static function Get($url) public static function Get($url)
{ {

@ -95,17 +95,22 @@ class HomeController extends Controller
'name' => '报告查询', 'name' => '报告查询',
'jump' => '/pages/main/bgcx/bgcx', 'jump' => '/pages/main/bgcx/bgcx',
'icon' => '/assets/h5/a_baogaochaxun.png' 'icon' => '/assets/h5/a_baogaochaxun.png'
], [ ],
'message' => '暂未开放', // [
'name' => '检后复查', // 'message' => '暂未开放',
'jump' => '/pages/main/cjwt/cjwt', // 'name' => '检后复查',
'icon' => '/assets/h5/a_jianhoufucha.png' // 'jump' => '/pages/main/cjwt/cjwt',
], [ // 'icon' => '/assets/h5/a_jianhoufucha.png'
// ],
[
'message' => '', 'message' => '',
'name' => '我的订单', 'name' => '我的订单',
'jump' => '/pages/main/order/order', 'jump' => '/pages/main/order/order',
'icon' => '/assets/h5/a_wodedingdan.png' 'icon' => '/assets/h5/a_wodedingdan.png'
]] ]
]
], ],
'color' => true, 'color' => true,
]; ];

@ -20,9 +20,17 @@ class IntegralSaveMoneyCouponController extends Controller
if(!$person) return \Yz::echoError1('就诊人信息查询失败'); if(!$person) return \Yz::echoError1('就诊人信息查询失败');
$jifen=0; $jifen=0;
$yucunkuan=0; $yucunkuan=0;
$AspNet=new AspNetZhuanController(); $env=config('app.globals.Env');
$jifen= $AspNet::GetJiFen_YuCunKuan(1,$person->ghzid); if($env=='pro') { //如果是正式环境
$yucunkuan= $AspNet::GetJiFen_YuCunKuan(2,$person->ghzid); $AspNet=new AspNetZhuanController();
$jifen= $AspNet::GetJiFen_YuCunKuan(1,$person->ghzid);
$yucunkuan= $AspNet::GetJiFen_YuCunKuan(2,$person->ghzid);
}
if($env=='dev') {//如果是开发环境
$jifen=50;
$yucunkuan=20;
}
return \Yz::Return(true,"查询完成",[ return \Yz::Return(true,"查询完成",[
'person'=>$person, 'person'=>$person,
'integral'=>$jifen, 'integral'=>$jifen,
@ -46,24 +54,24 @@ class IntegralSaveMoneyCouponController extends Controller
]); ]);
} }
//获取本单可用金额和积分 //获取本单可用积分
public function UsableIntegralSaveMoney(){ public function UsableIntegralSaveMoney(){
$order_price =request('order_price'); $ysje =request('ysje');
$type =request('type'); //1积分2预存款 $ssje =request('ssje');
$type =request('type'); //1积分2预存款预存款暂时不用此接口查
$openid =request('openid'); $openid =request('openid');
$person_id =request('person_id'); $person_id =request('person_id');
if(!isset($type)) return \Yz::echoError1("type不能为空");
$user=DB::table('web_users')->where(['openid'=>$openid,'status'=>1,'is_del'=>0])->first(); $user=DB::table('web_users')->where(['openid'=>$openid,'status'=>1,'is_del'=>0])->first();
if(!$user) return \Yz::echoError1('openid对应用户不存在'); if(!$user) return \Yz::echoError1('openid对应用户不存在');
$person=DB::table('web_user_person')->where(['user_id'=>$user->id,'is_del'=>0,'id'=>$person_id])->first(); $person=DB::table('web_user_person')->where(['user_id'=>$user->id,'is_del'=>0,'id'=>$person_id])->first();
if(!$person) return \Yz::echoError1('就诊人信息查询失败'); if(!$person) return \Yz::echoError1('就诊人信息查询失败');
$AspNet=new AspNetZhuanController(); $AspNet=new AspNetZhuanController();
$count= $AspNet::GetEnableCount($person->ghzid,$order_price,$order_price); $count= $AspNet::GetEnableCount($person->ghzid,$ysje,$ssje);
if($type==1){ if($type==1){
return \Yz::Return(true,"查询完成",['keyong_jifen'=>$count['keyong_jifen']]); return \Yz::Return(true,"查询完成",['keyong_jifen'=>$count]);
}
if($type==2){
return \Yz::Return(true,"查询完成",['keyong_jine'=>$count['keyong_jine']]);
} }
return \Yz::echoError1("查询失败");
} }
} }

Loading…
Cancel
Save