feat: integrate Luoyang pharmacy workflow
This commit is contained in:
@@ -161,6 +161,27 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
return $this->success('已保存', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工核对甘草不确定提交:确认远端成功或确认未创建。
|
||||
*/
|
||||
public function confirmGancaoSubmission()
|
||||
{
|
||||
$params = (new PrescriptionOrderValidate())->post()->goCheck('confirmGancaoSubmission');
|
||||
$result = PrescriptionOrderLogic::confirmGancaoSubmission(
|
||||
(int) $params['id'],
|
||||
(string) $params['resolution'],
|
||||
(string) ($params['remote_order_no'] ?? ''),
|
||||
(string) $params['note'],
|
||||
$this->adminId,
|
||||
$this->adminInfo
|
||||
);
|
||||
if ($result === false) {
|
||||
return $this->fail(PrescriptionOrderLogic::getError());
|
||||
}
|
||||
|
||||
return $this->success('甘草提交核对已记录', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改关联处方的患者姓名与手机号(订单详情场景)
|
||||
*/
|
||||
@@ -451,7 +472,7 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
{
|
||||
try {
|
||||
$params = (new PrescriptionOrderValidate())->post()->goCheck('submitGancaoRecipel');
|
||||
$result = PrescriptionOrderLogic::submitGancaoRecipel((int) $params['id'], $this->adminId, $this->adminInfo);
|
||||
$result = PrescriptionOrderLogic::uploadToPharmacy((int) $params['id'], $this->adminId, $this->adminInfo);
|
||||
|
||||
if ($result === false) {
|
||||
$error = PrescriptionOrderLogic::getError();
|
||||
@@ -465,7 +486,7 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
return $this->fail('返回数据格式错误');
|
||||
}
|
||||
|
||||
return $this->success('甘草药方上传成功', $result);
|
||||
return $this->success('药方上传成功', $result);
|
||||
} catch (\Throwable $e) {
|
||||
\think\facade\Log::error('submitGancaoRecipel exception', [
|
||||
'message' => $e->getMessage(),
|
||||
@@ -477,6 +498,19 @@ class PrescriptionOrderController extends BaseAdminController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unified pharmacy upload. The order ship_mode decides the target.
|
||||
*/
|
||||
public function uploadToPharmacy()
|
||||
{
|
||||
$params = (new PrescriptionOrderValidate())->post()->goCheck('uploadToPharmacy');
|
||||
$result = PrescriptionOrderLogic::uploadToPharmacy((int) $params['id'], $this->adminId, $this->adminInfo);
|
||||
if ($result === false) {
|
||||
return $this->fail(PrescriptionOrderLogic::getError());
|
||||
}
|
||||
return $this->success('药方上传成功', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 甘草药管家:预下单测试(仅 CTM_PREVIEW,不提交订单)
|
||||
* 用于在编辑订单时测试价格和配置
|
||||
|
||||
Reference in New Issue
Block a user