快递订阅数据修改
快递订阅地址
This commit is contained in:
parent
d3d5a62fb8
commit
5578850766
@ -235,7 +235,7 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
$this->modifyOrderPrescription($data['order_prescription_id'],1);
|
||||
|
||||
// 增加上报监管平台表
|
||||
$res = $this->addReportRegulatory($order_inquiry['order_inquiry_id']);
|
||||
$res = $this->addReportRegulatory($order_inquiry['order_inquiry_id'],$order_prescription['order_prescription_id']);
|
||||
if (!$res){
|
||||
Db::rollBack();
|
||||
Log::getInstance("queue-AutoPharmacistCaVerify")->error("错误:增加监管平台上报表失败");
|
||||
@ -488,9 +488,10 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
/**
|
||||
* 增加上报监管平台表
|
||||
* @param string $order_inquiry_id
|
||||
* @param string $order_prescription_id
|
||||
* @return bool
|
||||
*/
|
||||
protected function addReportRegulatory(string $order_inquiry_id): bool
|
||||
protected function addReportRegulatory(string $order_inquiry_id,string $order_prescription_id): bool
|
||||
{
|
||||
// 检测是否已添加
|
||||
$params = array();
|
||||
@ -502,6 +503,7 @@ class AutoPharmacistCaVerifyDelayDirectConsumer extends ConsumerMessage
|
||||
|
||||
$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;
|
||||
|
||||
@ -46,71 +46,29 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
{
|
||||
$this->line("开始");
|
||||
|
||||
// 获取未上传监管平台订单数量
|
||||
$report_regulatory_count = $this->getNotReportRegulatoryCount();
|
||||
if ($report_regulatory_count <= 0) {
|
||||
// 获取未上传监管平台订单
|
||||
$report_regulatorys = $this->getNotReportRegulatory(0,100);
|
||||
if (empty($report_regulatorys)) {
|
||||
$this->line("结束:无可执行订单");
|
||||
return;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $report_regulatory_count; $i++) {
|
||||
// 获取待上报订单
|
||||
$order_prescription = $this->getOrderPrescription($i);
|
||||
if (empty($order_prescription)) {
|
||||
$this->line("结束:本轮无可执行订单");
|
||||
foreach ($report_regulatorys as $report_regulatory){
|
||||
// 获取处方数据
|
||||
$params = array();
|
||||
$params['order_prescription_id'] = $report_regulatory['order_prescription_id'];
|
||||
$order_prescription = OrderPrescription::getOne($params);
|
||||
if (empty($order_prescription)){
|
||||
// 无处方数据,不处理
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->line("开始:" . $order_prescription['order_prescription_id']);
|
||||
|
||||
try {
|
||||
$this->line("信息:检测执行次数");
|
||||
$res = $this->checkHandleNumber($order_prescription['order_prescription_id']);
|
||||
} catch (\Exception $e) {
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$res) {
|
||||
$this->line("错误:超出最大执行次数或检测错误");
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
try {
|
||||
// 修改为上报失败
|
||||
$this->line("错误:记录上报失败");
|
||||
$res = $this->modifyReportRegulatoryInquiry($order_prescription, 2, 1, "超出最大执行次数或检测错误");
|
||||
if (!$res) {
|
||||
Db::rollBack();
|
||||
$this->line("错误:系统错误");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 修改为上报失败
|
||||
$this->line("错误:记录上报失败");
|
||||
$res = $this->modifyReportRegulatoryPrescription($order_prescription, 2, "超出最大执行次数或检测错误");
|
||||
if (!$res) {
|
||||
// 记录失败
|
||||
$this->line("错误:记录失败");
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
|
||||
continue;
|
||||
} catch (\Exception $e) {
|
||||
Db::rollBack();
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$this->line("信息:检测执行次数通过");
|
||||
|
||||
// 获取问诊订单数据
|
||||
$order_inquiry = $this->getOrderInquiry($order_prescription['order_inquiry_id']);
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (empty($order_inquiry)) {
|
||||
// 无问诊数据,跳过
|
||||
$this->line("错误:问诊订单数据为空");
|
||||
// 无处方数据,不处理
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -120,12 +78,35 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->line("信息:上报监管平台-问诊");
|
||||
|
||||
try {
|
||||
// 检测问诊是否已经上报监管平台
|
||||
$res = $this->checkIsReportRegulatoryInquiry($order_prescription['order_inquiry_id']);
|
||||
if (!$res) {
|
||||
$this->line("开始:" . $report_regulatory['report_regulatory_id']);
|
||||
|
||||
// 上报问诊
|
||||
if ($report_regulatory['report_inquiry_status'] != 1){
|
||||
$this->line("信息:上报问诊");
|
||||
|
||||
try {
|
||||
$this->line("信息:检测执行次数");
|
||||
|
||||
$key = $report_regulatory['report_regulatory_id'] . 'report_inquiry';
|
||||
$res = $this->checkHandleNumber($key);
|
||||
|
||||
if (!$res){
|
||||
$this->line("错误:超出最大执行次数或检测错误");
|
||||
$res = $this->modifyReportRegulatoryInquiry($report_regulatory, 2, 1, "超出最大执行次数或检测错误");
|
||||
if (!$res) {
|
||||
$this->line("错误:系统错误");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$this->line("信息:检测执行次数通过");
|
||||
} catch (\Exception $e) {
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
// 检测患者是否首次问诊
|
||||
$is_first = $this->checkPatientFirstInquiry($order_prescription['patient_id'], $order_prescription['order_prescription_id']);
|
||||
|
||||
@ -136,31 +117,80 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
$res = $this->reportRegulatoryInquiry($report_inquiry_data, $is_first);
|
||||
if (empty($res)) {
|
||||
// 上报成功
|
||||
$res = $this->modifyReportRegulatoryInquiry($order_prescription, 1, $is_first ? 1 : 2);
|
||||
$res = $this->modifyReportRegulatoryInquiry($report_regulatory, 1, $is_first ? 1 : 2);
|
||||
if (!$res) {
|
||||
// 记录失败
|
||||
$this->line("错误:记录失败");
|
||||
$this->line("错误:上报成功,存储记录失败");
|
||||
}
|
||||
} else {
|
||||
// 上报失败
|
||||
$res = $this->modifyReportRegulatoryInquiry($order_prescription, 2, $is_first ? 1 : 2, $res);
|
||||
$res = $this->modifyReportRegulatoryInquiry($report_regulatory, 2, $is_first ? 1 : 2, $res);
|
||||
if (!$res) {
|
||||
// 记录失败
|
||||
$this->line("错误:上报失败,存储记录失败");
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
// 上报失败
|
||||
$res = $this->modifyReportRegulatoryInquiry($report_regulatory, 2, $is_first ? 1 : 2, $e->getMessage());
|
||||
if (!$res) {
|
||||
// 记录失败
|
||||
$this->line("错误:上报失败,存储记录失败");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 上报处方
|
||||
if ($report_regulatory['report_prescription_status'] != 1){
|
||||
$this->line("信息:上报处方");
|
||||
|
||||
try {
|
||||
$this->line("信息:检测执行次数");
|
||||
|
||||
$key = $report_regulatory['report_regulatory_id'] . 'report_prescription';
|
||||
$res = $this->checkHandleNumber($key);
|
||||
if (!$res){
|
||||
// 修改为上报失败
|
||||
$this->line("错误:超出最大执行次数或检测错误");
|
||||
$res = $this->modifyReportRegulatoryPrescription($report_regulatory, 2, "超出最大执行次数或检测错误");
|
||||
if (!$res) {
|
||||
// 记录失败
|
||||
$this->line("错误:记录失败");
|
||||
}
|
||||
}
|
||||
|
||||
$this->line("信息:检测执行次数通过");
|
||||
} catch (\Exception $e) {
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
continue;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
// 上报失败
|
||||
$res = $this->modifyReportRegulatoryInquiry($order_prescription, 2, $is_first ? 1 : 2, $e->getMessage());
|
||||
if (!$res) {
|
||||
// 记录失败
|
||||
$this->line("错误:记录失败");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for ($i = 0; $i < $report_regulatory_count; $i++) {
|
||||
|
||||
|
||||
$this->line("信息:检测执行次数通过");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->line("信息:上报监管平台-处方");
|
||||
|
||||
try {
|
||||
@ -205,72 +235,40 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
$this->line("全部结束");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取符合条件的处方订单个数
|
||||
* @return int
|
||||
*/
|
||||
private function getOrderPrescriptionCount(): int
|
||||
{
|
||||
$params = array();
|
||||
$params['pharmacist_audit_status'] = 1;
|
||||
|
||||
$prescription_status_params = [2, 3, 4];
|
||||
return OrderPrescription::getStatusCount($params, $prescription_status_params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取符合条件的订单
|
||||
*/
|
||||
private function getNotReportRegulatory(int $offset = 0,int $limit = 10)
|
||||
{
|
||||
$params = array();
|
||||
$params[] = ['report_inquiry_int','<',4];
|
||||
$params[] = ['report_prescription_int','<',4];
|
||||
|
||||
$or_params = array();
|
||||
$or_params['report_inquiry_status'] = 0;
|
||||
$or_params['report_prescription_status'] = 0;
|
||||
return ReportRegulatory::getOrStatusLimit($params,$or_params,['*'],$offset,$limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取符合条件的处方订单
|
||||
* @param int $offset 起始位置
|
||||
* @param int $limit 个数
|
||||
* @return array
|
||||
*/
|
||||
private function getOrderPrescription(string|int $offset): array
|
||||
private function getNotReportRegulatory(): array
|
||||
{
|
||||
$params = array();
|
||||
$params['pharmacist_audit_status'] = 1;
|
||||
$params[] = ['report_inquiry_int','<',5];
|
||||
$params[] = ['report_prescription_int','<',5];
|
||||
|
||||
$prescription_status_params = [2,3,4];
|
||||
$order_prescription = OrderPrescription::getStatusLimit($params,$prescription_status_params,["*"],$offset,1);
|
||||
if (empty($order_prescription)){
|
||||
$report_regulatory = ReportRegulatory::getNotReportList($params,['*']);
|
||||
if (empty($report_regulatory)){
|
||||
return [];
|
||||
}else{
|
||||
return $report_regulatory->toArray();
|
||||
}
|
||||
|
||||
$order_prescription = $order_prescription->toArray();
|
||||
|
||||
return $order_prescription[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测执行次数
|
||||
* @param string $order_prescription_id
|
||||
* @param string $key
|
||||
* @return bool
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
protected function checkHandleNumber(string $order_prescription_id): bool
|
||||
protected function checkHandleNumber(string $key): bool
|
||||
{
|
||||
try {
|
||||
$redis = $this->container->get(Redis::class);
|
||||
|
||||
$redis_key = "ReportRegulatoryInquiry" . $order_prescription_id;
|
||||
$redis_key = "ReportRegulatoryInquiry" . $key;
|
||||
$redis_value = $redis->get($redis_key);
|
||||
if (empty($redis_value)) {
|
||||
$redis->set($redis_key, 1, 60 * 60 * 24 * 6);
|
||||
$redis->set($redis_key, 1, 60 * 60 * 24 * 10);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -290,45 +288,27 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改 问诊数据
|
||||
* @param array|object $order_prescription
|
||||
* 修改上报问诊数据
|
||||
* @param array|object $report_regulatory
|
||||
* @param int $report_inquiry_status 问诊上报状态(0:未上报 1:已上报 2:上报失败)
|
||||
* @param int $report_inquiry_type 问诊上报类型(1:网络初诊 2:网络复诊)
|
||||
* @param string $report_inquiry_fail_reason 问诊上报失败原因
|
||||
* @return bool
|
||||
*/
|
||||
private function modifyReportRegulatoryInquiry(array|object $order_prescription, int $report_inquiry_status, int $report_inquiry_type, string $report_inquiry_fail_reason = ""): bool
|
||||
private function modifyReportRegulatoryInquiry(array|object $report_regulatory, int $report_inquiry_status, int $report_inquiry_type, string $report_inquiry_fail_reason = ""): bool
|
||||
{
|
||||
try {
|
||||
// 检测数据是否存在
|
||||
// 修改
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$report_regulatory = ReportRegulatory::getOne($params);
|
||||
if (empty($report_regulatory)) {
|
||||
// 新增
|
||||
$data = array();
|
||||
$data['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$data['order_prescription_id'] = $order_prescription['order_prescription_id'];
|
||||
$data['report_inquiry_status'] = $report_inquiry_status;
|
||||
$data['report_inquiry_type'] = $report_inquiry_type;
|
||||
$data['report_inquiry_time'] = date('Y-m-d H:i:s', time());
|
||||
$data['report_inquiry_fail_reason'] = $report_inquiry_fail_reason;
|
||||
$report_regulatory = ReportRegulatory::addReportRegulatory($data);
|
||||
if (empty($report_regulatory)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// 修改
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$params['report_regulatory_id'] = $report_regulatory['report_regulatory_id'];
|
||||
|
||||
$data = array();
|
||||
$data['report_inquiry_status'] = $report_inquiry_status;
|
||||
$data['report_inquiry_type'] = $report_inquiry_type;
|
||||
$data['report_inquiry_time'] = date('Y-m-d H:i:s', time());
|
||||
$data['report_inquiry_fail_reason'] = $report_inquiry_fail_reason;
|
||||
ReportRegulatory::edit($params, $data);
|
||||
}
|
||||
$data = array();
|
||||
$data['report_inquiry_status'] = $report_inquiry_status;
|
||||
$data['report_inquiry_int'] = $report_regulatory['report_inquiry_int'] + 1;
|
||||
$data['report_inquiry_type'] = $report_inquiry_type;
|
||||
$data['report_inquiry_time'] = date('Y-m-d H:i:s', time());
|
||||
$data['report_inquiry_fail_reason'] = $report_inquiry_fail_reason;
|
||||
ReportRegulatory::edit($params, $data);
|
||||
} catch (\Exception $e) {
|
||||
$this->line("失败:" . $e->getMessage());
|
||||
return false;
|
||||
@ -338,42 +318,26 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改 处方数据
|
||||
* @param array|object $order_prescription
|
||||
* 修改上报处方数据
|
||||
* @param array|object $report_regulatory
|
||||
* @param int $report_prescription_status 处方上报状态(0:未上报 1:已上报 2:上报失败)
|
||||
* @param string $report_prescription_fail_reason 处方上报失败原因
|
||||
* @return bool
|
||||
*/
|
||||
private function modifyReportRegulatoryPrescription(array|object $order_prescription, int $report_prescription_status, string $report_prescription_fail_reason = ""): bool
|
||||
private function modifyReportRegulatoryPrescription(array|object $report_regulatory, int $report_prescription_status, string $report_prescription_fail_reason = ""): bool
|
||||
{
|
||||
try {
|
||||
// 检测数据是否存在
|
||||
// 修改
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$report_regulatory = ReportRegulatory::getOne($params);
|
||||
if (empty($report_regulatory)) {
|
||||
// 新增
|
||||
$data = array();
|
||||
$data['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$data['order_prescription_id'] = $order_prescription['order_prescription_id'];
|
||||
$data['report_prescription_status'] = $report_prescription_status;
|
||||
$data['report_prescription_time'] = date('Y-m-d H:i:s', time());
|
||||
$data['report_prescription_fail_reason'] = $report_prescription_fail_reason;
|
||||
$report_regulatory = ReportRegulatory::addReportRegulatory($data);
|
||||
if (empty($report_regulatory)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// 修改
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
|
||||
$params['report_regulatory_id'] = $report_regulatory['report_regulatory_id'];
|
||||
|
||||
$data = array();
|
||||
$data['report_prescription_status'] = $report_prescription_status;
|
||||
$data['report_prescription_int'] = $report_regulatory['report_prescription_int'] + 1;
|
||||
$data['report_prescription_time'] = date('Y-m-d H:i:s', time());
|
||||
$data['report_prescription_fail_reason'] = $report_prescription_fail_reason;
|
||||
ReportRegulatory::edit($params, $data);
|
||||
|
||||
$data = array();
|
||||
$data['report_prescription_status'] = $report_prescription_status;
|
||||
$data['report_prescription_time'] = date('Y-m-d H:i:s', time());
|
||||
$data['report_prescription_fail_reason'] = $report_prescription_fail_reason;
|
||||
ReportRegulatory::edit($params, $data);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->line("失败:" . $e->getMessage());
|
||||
return false;
|
||||
@ -382,22 +346,6 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取问诊订单数据
|
||||
* @param string $order_inquiry_id
|
||||
* @return array
|
||||
*/
|
||||
private function getOrderInquiry(string $order_inquiry_id): array
|
||||
{
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (empty($order_inquiry)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $order_inquiry->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测问诊订单数据
|
||||
@ -410,7 +358,7 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
$inquiry_status = [5, 6, 7];// 5:已完成 6:已结束 7:已取消
|
||||
if (!in_array($order_inquiry['inquiry_status'], $inquiry_status)) {
|
||||
// 问诊订单状态(1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消)
|
||||
$this->line("信息:订单状态未完成-不执行");
|
||||
$this->line("信息:订单状态未完成,不执行");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -453,47 +401,6 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测问诊是否已经上报监管平台
|
||||
* @param string $order_inquiry_id
|
||||
* @return bool true:已上报 false:未上报
|
||||
*/
|
||||
private function checkIsReportRegulatoryInquiry(string $order_inquiry_id): bool
|
||||
{
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
$report_regulatory = ReportRegulatory::getOne($params);
|
||||
if (empty($report_regulatory)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($report_regulatory['report_inquiry_status'] == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测处方是否已经上报监管平台
|
||||
* @param string $order_inquiry_id
|
||||
* @return bool true:已上报 false:未上报
|
||||
*/
|
||||
private function checkIsReportRegulatoryPrescription(string $order_inquiry_id): bool
|
||||
{
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
$report_regulatory = ReportRegulatory::getOne($params);
|
||||
if (empty($report_regulatory)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($report_regulatory['report_prescription_status'] == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上报监管数据-问诊
|
||||
|
||||
@ -142,6 +142,9 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
|
||||
$Kuaidi = new Kuaidi();
|
||||
$Kuaidi->subscribe($result['deliveryId'],$logistics_company_code,$item['consignee_tel']);
|
||||
|
||||
// 修改成功时药品订单数据
|
||||
$this->savePreSuccessOrderStatus($item,$result['deliveryId'],$logistics_company_code,$result['deliveryTime']);
|
||||
|
||||
try {
|
||||
// 获取患者数据
|
||||
$params = array();
|
||||
@ -161,8 +164,7 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
|
||||
}
|
||||
}
|
||||
|
||||
// 修改成功时药品订单数据
|
||||
$this->savePreSuccessOrderStatus($item,$result['deliveryId'],$logistics_company_code,$result['deliveryTime']);
|
||||
|
||||
}
|
||||
|
||||
$this->line("获取处方平台订单数据结束:处理完毕");
|
||||
|
||||
@ -44,6 +44,7 @@ use Extend\Prescription\Prescription;
|
||||
use Extend\RegulatoryPlatform\regulatoryPlatform;
|
||||
use Extend\TencentIm\RecentContact;
|
||||
use Extend\Wechat\Wechat;
|
||||
use GuzzleHttp\Client;
|
||||
use Hyperf\Amqp\Producer;
|
||||
use Hyperf\Cache\Cache;
|
||||
use Hyperf\DbConnection\Db;
|
||||
@ -335,6 +336,5 @@ class TestController extends AbstractController
|
||||
|
||||
public function test_15(){
|
||||
|
||||
// dump($result);
|
||||
}
|
||||
}
|
||||
@ -99,7 +99,7 @@ class ReportRegulatory extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* 列表-限制数量
|
||||
* @param array $params
|
||||
* @param array $or_params
|
||||
* @param array $fields
|
||||
@ -115,4 +115,21 @@ class ReportRegulatory extends Model
|
||||
->limit($limit)
|
||||
->get($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param array $params
|
||||
* @param array $or_params
|
||||
* @param array $fields
|
||||
* @return Collection|array
|
||||
*/
|
||||
public static function getNotReportList(array $params = [],array $fields = ["*"]): Collection|array
|
||||
{
|
||||
return self::where($params)
|
||||
->Where(function ($query) {
|
||||
$query->orWhere('report_inquiry_status','!=',1);
|
||||
$query->orWhere('report_prescription_status','!=',1);
|
||||
})
|
||||
->get($fields);
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,8 @@ class Kuaidi
|
||||
#[Inject]
|
||||
protected Client $client;
|
||||
|
||||
protected string $domain_name;
|
||||
|
||||
/**
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
@ -31,6 +33,14 @@ class Kuaidi
|
||||
{
|
||||
$this->container = ApplicationContext::getContainer();
|
||||
$this->client = $this->container->get(Client::class);
|
||||
|
||||
$app_env = config('app_env','dev');
|
||||
if ($app_env == "prod"){
|
||||
$this->domain_name = env('DOMAIN_NAME_PROD','https://prod.hospital.applets.igandanyiyuan.com/');
|
||||
}else{
|
||||
$this->domain_name = env('DOMAIN_NAME_DEV','https://dev.hospital.applets.igandanyiyuan.com/');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -57,7 +67,7 @@ class Kuaidi
|
||||
'number' => $logistics_no, // 快递单号
|
||||
'key' => config("kuaidi100.key"), // 客户授权key
|
||||
'parameters' => array (
|
||||
'callbackurl' => 'http://dev.hospital.applets.igandanyiyuan.com/callback/logistics', // 回调地址
|
||||
'callbackurl' => $this->domain_name . 'callback/logistics', // 回调地址
|
||||
'resultv2' => '1', // 行政区域解析
|
||||
'phone' => $phone ?: "", // 手机号
|
||||
'salt' => config('kuaidi100.salt'), // 签名用字符串
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user