1
This commit is contained in:
@@ -255,17 +255,17 @@ class InquiryService extends BaseService
|
||||
$pay_config = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
|
||||
// 增加至退款延迟队列
|
||||
// $data = array();
|
||||
// $data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
//
|
||||
// $message = new CancelUnpayOrdersDelayDirectProducer($data);
|
||||
// $message->setDelayMs(60 * 30 * 1000);
|
||||
// $producer = $this->container->get(Producer::class) ;
|
||||
// $res = $producer->produce($message);
|
||||
// if(!$res){
|
||||
// Db::rollBack();
|
||||
// return fail(HttpEnumCode::SERVER_ERROR, "订单创建失败");
|
||||
// }
|
||||
$data = array();
|
||||
$data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
|
||||
$message = new CancelUnpayOrdersDelayDirectProducer($data);
|
||||
$message->setDelayMs(1000 * 60 * 30);
|
||||
$producer = $this->container->get(Producer::class) ;
|
||||
$res = $producer->produce($message);
|
||||
if(!$res){
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::SERVER_ERROR, "订单创建失败");
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -732,7 +732,12 @@ class PatientFamilyService extends BaseService
|
||||
return success();
|
||||
}
|
||||
|
||||
public function addFamilyHealth(){
|
||||
/**
|
||||
* 新增家庭成员-健康情况
|
||||
* @return array
|
||||
*/
|
||||
public function addFamilyHealth(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo");
|
||||
$request_params = $this->request->all();
|
||||
|
||||
@@ -750,13 +755,37 @@ class PatientFamilyService extends BaseService
|
||||
$params['family_id'] = $patient_family['family_id'];
|
||||
$params['patient_id'] = $user_info['client_user_id'];
|
||||
$patient_family_health = PatientFamilyHealth::getOne($params);
|
||||
if (empty($patient_family_health)) {
|
||||
if (!empty($patient_family_health)) {
|
||||
return fail();
|
||||
}
|
||||
|
||||
$data = array();
|
||||
$data['family_id'] = $request_params['family_id'];
|
||||
$data['patient_id'] = $user_info['client_user_id'];
|
||||
|
||||
if (!empty($request_params['disease_class_id'])){
|
||||
// 疾病分类id-系统
|
||||
$data['disease_class_id'] = $request_params['disease_class_id'];
|
||||
|
||||
// 检测疾病是否正确
|
||||
$params = array();
|
||||
$params['disease_class_id'] = $request_params['disease_class_id'];
|
||||
$disease_class = DiseaseClass::getOne($params);
|
||||
if (empty($disease_class)){
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"疾病数据错误");
|
||||
}
|
||||
|
||||
$data['disease_class_name'] = $disease_class['disease_class_name'];
|
||||
}
|
||||
|
||||
$data['diagnosis_date'] = $request_params['diagnosis_date'];
|
||||
$data['diagnosis_hospital'] = $request_params['diagnosis_hospital'];
|
||||
$data['drugs_name'] = $request_params['drugs_name'];
|
||||
$patient_family_health = PatientFamilyHealth::addPatientFamilyHealth($data);
|
||||
if (empty($patient_family_health)){
|
||||
return fail();
|
||||
}
|
||||
|
||||
return success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user