修改药师自动审核

This commit is contained in:
wucongxing 2023-05-05 18:41:57 +08:00
parent 388c23f57e
commit 7e3fff6cdc

View File

@ -128,14 +128,23 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
} }
} }
try { try {
Log::getInstance("queue-AutoPharmacistCaVerify")->info("检测执行次数"); Log::getInstance("queue-AutoPharmacistCaVerify")->info("信息:检测执行次数");
// 检测执行次数 // 检测执行次数
$res = $this->checkHandleNumber($data['prescription_file_id']); $res = $this->checkHandleNumber($data['prescription_file_id']);
if (!$res) { }catch (\Exception $e){
Log::getInstance("queue-AutoPharmacistCaVerify")->error("错误:超出最大执行次数或检测错误"); // 检测次数失败
Log::getInstance("queue-AutoPharmacistCaVerify")->info("错误:" . $e->getMessage());
return Result::ACK;
}
if (!$res) {
Log::getInstance("queue-AutoPharmacistCaVerify")->error("错误:超出最大执行次数或检测错误");
Db::beginTransaction();
try {
// 修改处方表为未通过 // 修改处方表为未通过
$this->modifyOrderPrescription($data['order_prescription_id'], 2, "请联系平台客服,请勿重开处方"); $this->modifyOrderPrescription($data['order_prescription_id'], 2, "请联系平台客服,请勿重开处方");
@ -146,27 +155,20 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
// 患者-处方审核未通过 // 患者-处方审核未通过
$MessagePush = new MessagePush($user_patient['user_id'], $order_prescription['order_inquiry_id']); $MessagePush = new MessagePush($user_patient['user_id'], $order_prescription['order_inquiry_id']);
$MessagePush->patientPrescriptionVerifyFail(); $MessagePush->patientPrescriptionVerifyFail();
Db::commit();
return Result::ACK; return Result::ACK;
} }catch (\Exception $e){
if (time() < 1682424000){
Db::rollBack(); Db::rollBack();
return Result::REQUEUE; Log::getInstance("queue-AutoPharmacistCaVerify")->info("错误:" . $e->getMessage());
return Result::ACK;
} }
}catch (\Exception $e){
// 检测次数失败
Log::getInstance("queue-AutoPharmacistCaVerify")->info("错误:" . $e->getMessage());
return Result::ACK;
} }
// 下载医生签章文件 // 下载医生签章文件
Db::beginTransaction(); Db::beginTransaction();
try { try {
// 检测执行次数 // 检测执行次数
$res = $this->checkHandleNumber($data['prescription_file_id']); $res = $this->checkHandleNumber($data['prescription_file_id']);
if (!$res) { if (!$res) {