去除处方详情查询条件
This commit is contained in:
parent
e847874ecd
commit
249c585724
@ -10,6 +10,7 @@ use App\Model\OrderInquiry;
|
||||
use App\Model\User;
|
||||
use App\Services\ImService;
|
||||
use App\Utils\Log;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hyperf\Amqp\Result;
|
||||
use Hyperf\Amqp\Annotation\Consumer;
|
||||
use Hyperf\Amqp\Message\ConsumerMessage;
|
||||
@ -21,6 +22,12 @@ use PhpAmqpLib\Message\AMQPMessage;
|
||||
#[Consumer(exchange: 'amqp.direct', routingKey: 'SendStationMessage', queue: 'send.station.message.queue',nums: 1)]
|
||||
class SendStationMessageConsumer extends ConsumerMessage
|
||||
{
|
||||
/**
|
||||
* @param $data
|
||||
* @param AMQPMessage $message
|
||||
* @return string
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function consumeMessage($data, AMQPMessage $message): string
|
||||
{
|
||||
Log::getInstance()->info("开始执行 站内消息推送 队列:" . json_encode($data, JSON_UNESCAPED_UNICODE));
|
||||
@ -78,11 +85,8 @@ class SendStationMessageConsumer extends ConsumerMessage
|
||||
|
||||
$ImService->sendMessage("", $user['user_id'], $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
|
||||
// 新增通知消息表
|
||||
|
||||
|
||||
|
||||
|
||||
// 新增成功通知消息表
|
||||
$this->saveMessageNotice($user->toArray(),$data);
|
||||
|
||||
Log::getInstance()->info("站内消息推送成功");
|
||||
$this->saveSuccessPushLog($user['user_type'],$data['sub_data']);
|
||||
@ -91,6 +95,9 @@ class SendStationMessageConsumer extends ConsumerMessage
|
||||
Log::getInstance()->error("站内消息推送执行失败:" . $e->getMessage());
|
||||
|
||||
$this->saveErrorPushLog($user['user_type'],$data,$e->getMessage());
|
||||
|
||||
// 新增失败通知消息表
|
||||
$this->saveMessageNotice($user->toArray(),$data,0,$e->getMessage());
|
||||
}
|
||||
|
||||
return Result::ACK;
|
||||
@ -180,34 +187,71 @@ class SendStationMessageConsumer extends ConsumerMessage
|
||||
}
|
||||
}
|
||||
|
||||
// private function saveMessageNotice(){
|
||||
// $notice_data = array();
|
||||
// $notice_data['user_id'] = $user['user_id'];
|
||||
// $notice_data['user_type'] = $user['user_type'];
|
||||
// $notice_data['notice_type'] = $data['notice_type'];
|
||||
// if (isset($data['notice_system_type'])){
|
||||
// $notice_data['notice_system_type'] = $data['notice_system_type'] ;
|
||||
// }
|
||||
//
|
||||
// $notice_data['read_status'] = 0;
|
||||
//
|
||||
// if (isset($data['inquiry_type'])){
|
||||
// $notice_data['inquiry_type'] = $data['inquiry_type'] ;
|
||||
// }
|
||||
//
|
||||
// if (isset($data['from_name'])){
|
||||
// $notice_data['from_name'] = $data['from_name'] ;
|
||||
// }
|
||||
//
|
||||
// $notice_data['notice_title'] = $data['notice_title'] ;
|
||||
// $notice_data['notice_send_time'] = date('Y-m-d H:i:s',time());
|
||||
//
|
||||
// if (isset($data['notice_content'])){
|
||||
// $notice_data['notice_content'] = $data['notice_content'] ;
|
||||
// }
|
||||
//
|
||||
// if (isset($data['notice_content'])){
|
||||
// $notice_data['notice_content'] = $data['notice_content'] ;
|
||||
// }
|
||||
// }
|
||||
/**
|
||||
* 新增通知消息表
|
||||
* @param array $user
|
||||
* @param array $push_data
|
||||
* @param string $send_fail_reason
|
||||
* @param int $send_status
|
||||
* @return void
|
||||
*/
|
||||
private function saveMessageNotice(array $user,array $push_data,int $send_status = 1,string $send_fail_reason = ""): void
|
||||
{
|
||||
|
||||
$notice_data = array();
|
||||
$notice_data['user_id'] = $user['user_id'];
|
||||
$notice_data['user_type'] = $user['user_type'];
|
||||
$notice_data['notice_type'] = $push_data['notice_type'];
|
||||
if (isset($push_data['notice_system_type'])){
|
||||
$notice_data['notice_system_type'] = $push_data['notice_system_type'] ;
|
||||
}
|
||||
|
||||
$notice_data['read_status'] = 0;
|
||||
|
||||
if (isset($push_data['inquiry_type'])){
|
||||
$notice_data['inquiry_type'] = $push_data['inquiry_type'] ;
|
||||
}
|
||||
|
||||
if (isset($push_data['from_name'])){
|
||||
$notice_data['from_name'] = $push_data['from_name'] ;
|
||||
}
|
||||
|
||||
$notice_data['notice_title'] = $push_data['notice_title'] ;
|
||||
$notice_data['notice_send_time'] = date('Y-m-d H:i:s',time());
|
||||
|
||||
if (isset($push_data['notice_content'])){
|
||||
$notice_data['notice_content'] = $push_data['notice_content'] ;
|
||||
}
|
||||
|
||||
if (isset($push_data['notice_content'])){
|
||||
$notice_data['notice_content'] = $push_data['notice_content'] ;
|
||||
}
|
||||
|
||||
$notice_data['send_status'] = $send_status;
|
||||
$notice_data['send_fail_reason'] = $send_fail_reason;
|
||||
if (isset($push_data['button_type'])){
|
||||
$notice_data['button_type'] = $push_data['button_type'] ;
|
||||
}
|
||||
|
||||
if (isset($push_data['link_type'])){
|
||||
$notice_data['link_type'] = $push_data['link_type'] ;
|
||||
}
|
||||
|
||||
if (isset($push_data['link_params'])){
|
||||
$notice_data['link_params'] = $push_data['link_params'] ;
|
||||
}
|
||||
|
||||
if (isset($push_data['show_type'])){
|
||||
$notice_data['show_type'] = $push_data['show_type'];
|
||||
}
|
||||
|
||||
if (isset($push_data['show_params'])){
|
||||
$notice_data['show_params'] = $push_data['show_params'];
|
||||
}
|
||||
|
||||
$message_notice = MessageNotice::addMessageNotice($notice_data);
|
||||
if (empty($message_notice)){
|
||||
Log::getInstance()->error("站内消息推送成功,记录通知消息表失败:" . json_encode($notice_data,JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,14 +45,12 @@ class OrderPrescriptionService extends BaseService
|
||||
|
||||
/**
|
||||
* 获取处方中开方药品
|
||||
* @param string|int $order_inquiry_id
|
||||
* @param string|int $order_prescription_id
|
||||
* @return array
|
||||
*/
|
||||
public function getproductList(string|int $order_inquiry_id, string|int $order_prescription_id): array
|
||||
public function getproductList(string|int $order_prescription_id): array
|
||||
{
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
$params['order_prescription_id'] = $order_prescription_id;
|
||||
$order_prescription_products = OrderPrescriptionProduct::getLimit($params);
|
||||
if (empty($order_prescription_products)) {
|
||||
|
||||
@ -939,7 +939,7 @@ class UserDoctorService extends BaseService
|
||||
|
||||
// 订单-商品订单列表
|
||||
$OrderPrescriptionService = new OrderPrescriptionService();
|
||||
$order_prescription_product = $OrderPrescriptionService->getproductList($order_inquiry_id, $order_prescription_id);
|
||||
$order_prescription_product = $OrderPrescriptionService->getproductList($order_prescription_id);
|
||||
|
||||
// 获取处方关联疾病表
|
||||
$fields = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user