删除自动开方时增加上报处方数据。增加自动结束时上报处方数据,修改上报处方脚本
This commit is contained in:
@@ -257,14 +257,6 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
// 修改处方表为通过
|
||||
$this->modifyOrderPrescription($data['order_prescription_id'],1);
|
||||
|
||||
// 增加上报监管平台表
|
||||
$res = $this->addReportRegulatory($order_inquiry['order_inquiry_id'],$order_prescription['order_prescription_id']);
|
||||
if (!$res){
|
||||
Db::rollBack();
|
||||
Log::getInstance("queue-AutoPharmacistCaVerify")->error("错误:增加监管平台上报表失败");
|
||||
return Result::REQUEUE;
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
Log::getInstance("queue-AutoPharmacistCaVerify")->info("成功");
|
||||
} catch (\Throwable $e) {
|
||||
@@ -479,31 +471,4 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
|
||||
OrderPrescription::edit($params,$data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加上报监管平台表
|
||||
* @param string $order_inquiry_id
|
||||
* @param string $order_prescription_id
|
||||
* @return bool
|
||||
*/
|
||||
protected function addReportRegulatory(string $order_inquiry_id,string $order_prescription_id): bool
|
||||
{
|
||||
// 检测是否已添加
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
$report_regulatory = ReportRegulatory::getOne($params);
|
||||
if (!empty($report_regulatory)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$data = array();
|
||||
$data['order_inquiry_id'] = $order_inquiry_id;
|
||||
$data['order_prescription_id'] = $order_prescription_id;
|
||||
$report_regulatory = ReportRegulatory::addReportRegulatory($data);
|
||||
if (empty($report_regulatory)){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user