更新
This commit is contained in:
@@ -72,7 +72,9 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
public function detail()
|
||||
{
|
||||
$params = (new PrescriptionOrderValidate())->get()->goCheck('detail');
|
||||
$detail = PrescriptionOrderLogic::detail((int) $params['id'], $this->adminId, $this->adminInfo);
|
||||
$detail = PrescriptionOrderLogic::detail(
|
||||
(int) $params['id'], $this->adminId, $this->adminInfo, (int) ($params['prescription_id'] ?? 0)
|
||||
);
|
||||
if ($detail === null) {
|
||||
return $this->fail(PrescriptionOrderLogic::getError());
|
||||
}
|
||||
@@ -80,6 +82,29 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
return $this->data($detail);
|
||||
}
|
||||
|
||||
public function prescriptionOrdersForBinding()
|
||||
{
|
||||
$params = (new PrescriptionOrderValidate())->get()->goCheck('prescriptionOrdersForBinding');
|
||||
try {
|
||||
return $this->data(PrescriptionOrderLogic::prescriptionOrdersForBinding(
|
||||
(int) $params['prescription_id'], trim((string) ($params['order_no'] ?? '')), $this->adminId, $this->adminInfo
|
||||
));
|
||||
} catch (\DomainException $exception) {
|
||||
return $this->fail($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function bindPrescription()
|
||||
{
|
||||
$params = (new PrescriptionOrderValidate())->post()->goCheck('bindPrescription');
|
||||
try {
|
||||
PrescriptionOrderLogic::bindPrescription((int) $params['id'], (int) $params['prescription_id'], $this->adminId, $this->adminInfo);
|
||||
} catch (\DomainException $exception) {
|
||||
return $this->fail($exception->getMessage());
|
||||
}
|
||||
return $this->success('业务订单已绑定');
|
||||
}
|
||||
|
||||
/**
|
||||
* 快递轨迹查询(对接快递100;未配置时仍可跳转顺丰/京东官网)
|
||||
*/
|
||||
@@ -437,6 +462,18 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
return $this->success('关联支付单成功', $result);
|
||||
}
|
||||
|
||||
/** 在业务订单详情关联一笔已有收款。 */
|
||||
public function attachReceipt()
|
||||
{
|
||||
$params = (new PrescriptionOrderValidate())->post()->goCheck('attachReceipt');
|
||||
$result = PrescriptionOrderLogic::attachReceipt($params, $this->adminId, $this->adminInfo);
|
||||
if ($result === false) {
|
||||
return $this->fail(PrescriptionOrderLogic::getError());
|
||||
}
|
||||
|
||||
return $this->success('收款已关联', $result);
|
||||
}
|
||||
|
||||
/** 解除单笔收款关联,总金额不变,同步更新已付金额和需代收。 */
|
||||
public function unlinkPayOrder()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user