更新
This commit is contained in:
@@ -86,7 +86,18 @@ class OrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
->field('id');
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
// 按诊单医助筛选(订单 patient_id 存诊单 id)
|
||||
$assistantId = (int) ($this->params['assistant_id'] ?? 0);
|
||||
if ($assistantId > 0) {
|
||||
$where[] = ['patient_id', 'in', function ($query) use ($assistantId) {
|
||||
$query->table('zyt_tcm_diagnosis')
|
||||
->whereNull('delete_time')
|
||||
->where('assistant_id', '=', $assistantId)
|
||||
->field('id');
|
||||
}];
|
||||
}
|
||||
|
||||
// 处理创建时间范围
|
||||
if (!empty($this->params['create_time_start'])) {
|
||||
$where[] = ['create_time', '>=', $this->params['create_time_start'] . ' 00:00:00'];
|
||||
@@ -132,7 +143,17 @@ class OrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
->field('id');
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
$assistantIdCount = (int) ($this->params['assistant_id'] ?? 0);
|
||||
if ($assistantIdCount > 0) {
|
||||
$where[] = ['patient_id', 'in', function ($query) use ($assistantIdCount) {
|
||||
$query->table('zyt_tcm_diagnosis')
|
||||
->whereNull('delete_time')
|
||||
->where('assistant_id', '=', $assistantIdCount)
|
||||
->field('id');
|
||||
}];
|
||||
}
|
||||
|
||||
// 处理创建时间范围
|
||||
if (!empty($this->params['create_time_start'])) {
|
||||
$where[] = ['create_time', '>=', $this->params['create_time_start'] . ' 00:00:00'];
|
||||
|
||||
Reference in New Issue
Block a user