This commit is contained in:
Your Name
2026-04-21 18:02:27 +08:00
parent a1d2ab4649
commit d899e0fe0a
301 changed files with 1937 additions and 344 deletions
+23 -2
View File
@@ -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'];