修改物流
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Model\OrderInquiry;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderPrescriptionFile;
|
||||
use App\Model\OrderPrescriptionProduct;
|
||||
use App\Model\ReportRegulatory;
|
||||
use App\Model\UserDoctor;
|
||||
use App\Model\UserPatient;
|
||||
use App\Model\UserPharmacist;
|
||||
@@ -128,7 +129,6 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
Log::getInstance("queue-AutoPharmacistCaVerify")->info("信息:检测执行次数");
|
||||
|
||||
@@ -177,10 +177,7 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
// 修改处方表为未通过
|
||||
$this->modifyOrderPrescription($data['order_prescription_id'],2,"请联系平台客服,请勿重开处方");
|
||||
|
||||
|
||||
|
||||
Db::commit();
|
||||
|
||||
}
|
||||
|
||||
// 获取处方文件数据
|
||||
@@ -237,6 +234,14 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
// 修改处方表为通过
|
||||
$this->modifyOrderPrescription($data['order_prescription_id'],1);
|
||||
|
||||
// 增加上报监管平台表
|
||||
$res = $this->addReportRegulatory($order_inquiry['order_inquiry_id']);
|
||||
if (!$res){
|
||||
Db::rollBack();
|
||||
Log::getInstance("queue-AutoPharmacistCaVerify")->error("错误:增加监管平台上报表失败");
|
||||
return Result::REQUEUE;
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
Log::getInstance("queue-AutoPharmacistCaVerify")->info("成功");
|
||||
} catch (\Exception $e) {
|
||||
@@ -479,4 +484,29 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
|
||||
OrderPrescription::edit($params,$data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加上报监管平台表
|
||||
* @param string $order_inquiry_id
|
||||
* @return bool
|
||||
*/
|
||||
protected function addReportRegulatory(string $order_inquiry_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;
|
||||
$report_regulatory = ReportRegulatory::addReportRegulatory($data);
|
||||
if (empty($report_regulatory)){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user