|
@@ -73,6 +73,8 @@ class AppointmentService
|
|
|
$row->appointment_apply_json = !empty($row->appointment_apply_json) ? json_decode($row->appointment_apply_json,true) : [];
|
|
|
if ($row->appointment_category == 'NOFEE') {
|
|
|
$row->member_benefit_name = "后付费预约";
|
|
|
+ }elseif ($row->appointment_category == 'GREENWAY'){
|
|
|
+ $row->member_benefit_name = "就医绿通";
|
|
|
}
|
|
|
if (!empty($row->appointment_apply_json)) {
|
|
|
$applyJson = $row->appointment_apply_json;
|
|
@@ -593,13 +595,18 @@ class AppointmentService
|
|
|
$paramsData['component_id'] = $quota['join_member_rule_added_component_id'];
|
|
|
|
|
|
QuotaController::doWriteOff($paramsData);
|
|
|
+ // 回写权益ID
|
|
|
+ if(empty($appointment->join_appointment_member_benefit_id)){
|
|
|
+ Appointment::where('appointment_id', $appointmentId)->update(['join_appointment_member_benefit_id' => $params['quota_id']]);
|
|
|
+ }
|
|
|
}else if($quotaType == 'BF'){
|
|
|
$paramsData['benefit_id'] = $params['quota_id'];
|
|
|
- BenefitController::doWriteOff($paramsData);
|
|
|
- }
|
|
|
- // 回写权益ID
|
|
|
- if(empty($appointment->join_appointment_member_benefit_id)){
|
|
|
- Appointment::where('appointment_id', $appointmentId)->update(['join_appointment_member_benefit_id' => $params['quota_id']]);
|
|
|
+ BenefitController::doWriteOff($paramsData,$appointment);
|
|
|
+
|
|
|
+ // 清除后付费预约
|
|
|
+ if($appointment->appointment_category == 'NOFEE'){
|
|
|
+ Appointment::where('appointment_id', $appointmentId)->delete();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
_syslog("预约","已有服务核销");
|