修改上报监管平台
This commit is contained in:
parent
750b7ae2fd
commit
edb10283c5
@ -53,10 +53,9 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
return;
|
||||
}
|
||||
|
||||
$order_prescription_count = 1;
|
||||
for ($i = 0; $i < $order_prescription_count; $i++) {
|
||||
// 获取待上报订单
|
||||
$order_prescription = $this->getOrderPrescription();
|
||||
$order_prescription = $this->getOrderPrescription($i);
|
||||
if (empty($order_prescription)) {
|
||||
$this->line("结束:本轮无可执行订单");
|
||||
continue;
|
||||
@ -64,15 +63,14 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
|
||||
$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;
|
||||
// }
|
||||
try {
|
||||
$this->line("信息:检测执行次数");
|
||||
$res = $this->checkHandleNumber($order_prescription['order_prescription_id']);
|
||||
} catch (\Exception $e) {
|
||||
$this->line("错误:" . $e->getMessage());
|
||||
continue;
|
||||
}
|
||||
|
||||
$res = true;
|
||||
if (!$res) {
|
||||
$this->line("错误:超出最大执行次数或检测错误");
|
||||
|
||||
@ -226,23 +224,14 @@ class ReportRegulatoryCommand extends HyperfCommand
|
||||
* @param int $limit 个数
|
||||
* @return array
|
||||
*/
|
||||
private function getOrderPrescription(): array
|
||||
private function getOrderPrescription(string|int $offset): array
|
||||
{
|
||||
// $params = array();
|
||||
// $params['pharmacist_audit_status'] = 1;
|
||||
//
|
||||
// $prescription_status_params = [2,3,4];
|
||||
// $order_prescription = OrderPrescription::getStatusLimit($params,$prescription_status_params,["*"],$offset,$limit);
|
||||
// if (empty($order_prescription)){
|
||||
// return [];
|
||||
// }
|
||||
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = "514128068311498753";
|
||||
$params['pharmacist_audit_status'] = 1;
|
||||
|
||||
$prescription_status_params = [1, 2, 3, 4];
|
||||
$order_prescription = OrderPrescription::getStatusOne($params, $prescription_status_params, ["*"]);
|
||||
if (empty($order_prescription)) {
|
||||
$prescription_status_params = [2,3,4];
|
||||
$order_prescription = OrderPrescription::getStatusLimit($params,$prescription_status_params,["*"],$offset,1);
|
||||
if (empty($order_prescription)){
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user