|
|
|
|
@ -293,6 +293,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$group_info = false;
|
|
|
|
|
$lose_price=0;
|
|
|
|
|
if (!!$group_id) {
|
|
|
|
|
$P = new PersonController();
|
|
|
|
|
$data = [
|
|
|
|
|
@ -302,7 +303,15 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$group_info = $P->group_info($hospital_id, $data);
|
|
|
|
|
if(count($group_info)==0) return \Yz::echoError1("获取团检登记信息失败");
|
|
|
|
|
|
|
|
|
|
//如果是团检,统收限额大于0,并且没有自带项目,则判断剩余金额
|
|
|
|
|
if($group_info[0]['tongshou_xiane']>0 and count($group_info[0]['items'])==0){
|
|
|
|
|
$lose_price=$group_info[0]['tongshou_xiane']- $true_price;
|
|
|
|
|
if($lose_price<0) $lose_price=0;
|
|
|
|
|
}
|
|
|
|
|
$true_price = $true_price + $group_info[0]['sixi_zong_ji_jin_e'];
|
|
|
|
|
$true_price = ($true_price - $group_info[0]['tongshou_xiane']) > 0 ? $true_price - $group_info[0]['tongshou_xiane'] : 0;
|
|
|
|
|
|
|
|
|
|
$all_items = DB::table('items')->where(['status' => 1])->get();
|
|
|
|
|
$item_new = [];
|
|
|
|
|
@ -347,6 +356,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
|
|
|
|
|
'true_price' => $true_price,//需要用户支付的金的
|
|
|
|
|
'original_price' => $all_original_price,//总原价
|
|
|
|
|
'pay_item_count' => $pay_item_count,//需要付费的项目数量
|
|
|
|
|
'lose_price'=>$lose_price,//剩余的不用就会浪费的金额
|
|
|
|
|
'nmr_list' => [[
|
|
|
|
|
'item_id' => "1",
|
|
|
|
|
"name" => "磁共振平扫(腰椎)"
|
|
|
|
|
@ -369,6 +379,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
|
|
|
|
|
}
|
|
|
|
|
return \Yz::Return(true, "查询完成", ['list' => $combos]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//推荐套餐
|
|
|
|
|
public function ComboRecommend()
|
|
|
|
|
{
|
|
|
|
|
|