修正返回问题

This commit is contained in:
wucongxing 2023-04-07 17:59:26 +08:00
parent 7f486b85d9
commit ac5467b951
2 changed files with 21 additions and 21 deletions

View File

@ -208,7 +208,7 @@ class DoctorAccountService extends BaseService
// 计算医生个人所得税 // 计算医生个人所得税
$income_tax = $this->computeIndividualIncomeTax($balance_account); $income_tax = $this->computeIndividualIncomeTax($balance_account);
$withdrawal_amount = floor(($balance_account - $income_tax) * 100) / 100; $withdrawal_amount = floor(($balance_account * 0.75 - $income_tax) * 100) / 100;
$income_tax = floor($income_tax * 100) / 100; $income_tax = floor($income_tax * 100) / 100;
@ -298,19 +298,19 @@ class DoctorAccountService extends BaseService
/** /**
* 获取医生账户余额 * 获取医生账户余额
* @param string $doctor_id * @param string $doctor_id
* @return int * @return float
*/ */
public function getDoctorBalanceAccount(string $doctor_id): int public function getDoctorBalanceAccount(string $doctor_id): float
{ {
$params = array(); $params = array();
$params['doctor_id'] = $doctor_id; $params['doctor_id'] = $doctor_id;
$doctor_account = DoctorAccount::getOne($params); $doctor_account = DoctorAccount::getOne($params);
if (empty($doctor_account)) { if (empty($doctor_account)) {
$balance_account = 0; $balance_account = 0;
} else { } else {
$balance_account = $doctor_account['balance_account']; $balance_account = $doctor_account['balance_account'];
} }
return $balance_account; return $balance_account;
} }

View File

@ -855,23 +855,23 @@ class InquiryService extends BaseService
throw new BusinessException("订单数据为空"); throw new BusinessException("订单数据为空");
} }
// // 检测问诊订单状态 // 检测问诊订单状态
// if (!in_array($order_inquiry['inquiry_status'], [2, 3, 4, 5, 7])) { if (!in_array($order_inquiry['inquiry_status'], [2, 3, 4, 5, 7])) {
// // 问诊订单状态1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消) // 问诊订单状态1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消)
// throw new BusinessException("订单状态错误"); throw new BusinessException("订单状态错误");
// } }
//
// // 检测订单退款状态 // 检测订单退款状态
// if (in_array($order_inquiry['inquiry_refund_status'], [2, 3, 5])) { if (in_array($order_inquiry['inquiry_refund_status'], [2, 3, 5])) {
// // 问诊订单退款状态0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭) // 问诊订单退款状态0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭)
// throw new BusinessException("订单退款状态错误"); throw new BusinessException("订单退款状态错误");
// } }
//
// // 检测支付状态 // 检测支付状态
// if ($order_inquiry['inquiry_pay_status'] != 2) { if ($order_inquiry['inquiry_pay_status'] != 2) {
// // 支付状态1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款) // 支付状态1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款)
// throw new BusinessException("订单支付状态错误"); throw new BusinessException("订单支付状态错误");
// } }
// 系统退款编号 // 系统退款编号
$generator = $this->container->get(IdGeneratorInterface::class); $generator = $this->container->get(IdGeneratorInterface::class);