This commit is contained in:
parent
e34eea86e1
commit
7560486731
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Command;
|
||||
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\OrderInquiry;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderProduct;
|
||||
use App\Model\OrderSystem;
|
||||
@ -72,6 +73,22 @@ class ReportPreProductOrderCommand extends HyperfCommand
|
||||
continue;
|
||||
}
|
||||
|
||||
// 获取问诊订单数据
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $item['order_inquiry_id'];
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (empty($order_inquiry)) {
|
||||
$this->line("结束,问诊订单数据错误");
|
||||
continue;
|
||||
}
|
||||
|
||||
//检测是否为抄方订单
|
||||
if (!empty($order_inquiry['transfer_doctor_id'])){
|
||||
$this->line("结束,该问诊订单为抄方订单");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
try {
|
||||
@ -152,6 +169,7 @@ class ReportPreProductOrderCommand extends HyperfCommand
|
||||
'order_product_id',
|
||||
'patient_id',
|
||||
'order_prescription_id',
|
||||
'order_inquiry_id',
|
||||
];
|
||||
|
||||
$order_product = OrderProduct::getList($params,$fields);
|
||||
|
||||
@ -82,7 +82,9 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
|
||||
// 上报网络咨询
|
||||
try {
|
||||
if ($report_regulatory['report_consult_status'] != 1 && $report_regulatory['report_consult_int'] < 5){
|
||||
//检测是否为抄方订单
|
||||
$transferInquiryOrder = $this->checkTransferInquiryOrder($order_inquiry);
|
||||
if ($report_regulatory['report_consult_status'] != 1 && $report_regulatory['report_consult_int'] < 5 && $transferInquiryOrder){
|
||||
$this->line("上报网络咨询");
|
||||
|
||||
// 获取上报数据-网络咨询
|
||||
@ -115,7 +117,9 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
|
||||
// 上报复诊
|
||||
try {
|
||||
if ($report_regulatory['is_further_consult'] == 1){
|
||||
//检测是否为抄方订单
|
||||
$transferInquiryOrder = $this->checkTransferInquiryOrder($order_inquiry);
|
||||
if ($report_regulatory['is_further_consult'] == 1 && $transferInquiryOrder){
|
||||
if ($report_regulatory['report_further_consult_status'] != 1 && $report_regulatory['report_further_consult_int'] < 5) {
|
||||
$this->line("上报复诊");
|
||||
|
||||
@ -318,7 +322,16 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
$this->line("信息:订单未取消的未完成订单,不执行");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测抄方订单
|
||||
* @param array|object $order_inquiry 问诊订单数据
|
||||
* @return bool true:可执行 false:不可执行
|
||||
*/
|
||||
private function checkTransferInquiryOrder(array|object $order_inquiry): bool
|
||||
{
|
||||
//判断该问诊是否为抄方
|
||||
if(!empty($order_inquiry['transfer_doctor_id'])){
|
||||
$this->line("信息:该问诊为抄方类型,不执行");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user