医生接诊台
This commit is contained in:
@@ -47,9 +47,6 @@ class DoctorNoteLogic extends BaseLogic
|
||||
$prev = [];
|
||||
}
|
||||
$merged = array_values(array_unique(array_merge($prev, $newImages)));
|
||||
if (count($merged) > 9) {
|
||||
$merged = array_slice($merged, 0, 9);
|
||||
}
|
||||
$data['tongue_images'] = json_encode($merged, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
@@ -93,8 +90,6 @@ class DoctorNoteLogic extends BaseLogic
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
$domain = request()->domain();
|
||||
|
||||
foreach ($records as &$record) {
|
||||
$images = $record['tongue_images'] ?? [];
|
||||
if (is_string($images)) {
|
||||
@@ -103,13 +98,7 @@ class DoctorNoteLogic extends BaseLogic
|
||||
if (!is_array($images)) {
|
||||
$images = [];
|
||||
}
|
||||
$record['tongue_images'] = array_map(function ($url) use ($domain) {
|
||||
if (empty($url)) return $url;
|
||||
if (stripos($url, 'http://') === 0 || stripos($url, 'https://') === 0) {
|
||||
return $url;
|
||||
}
|
||||
return $domain . '/' . $url;
|
||||
}, $images);
|
||||
$record['tongue_images'] = $images;
|
||||
}
|
||||
|
||||
return $records;
|
||||
|
||||
@@ -181,12 +181,12 @@ class DiagnosisLogic extends BaseLogic
|
||||
if (isset($params['tongue_images']) && is_array($params['tongue_images'])) {
|
||||
$params['tongue_images'] = json_encode($params['tongue_images'], JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
|
||||
// 处理检查报告(JSON数组)
|
||||
if (isset($params['report_files']) && is_array($params['report_files'])) {
|
||||
$params['report_files'] = json_encode($params['report_files'], JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
|
||||
// 处理诊断日期
|
||||
if (isset($params['diagnosis_date'])) {
|
||||
$params['diagnosis_date'] = strtotime($params['diagnosis_date']);
|
||||
|
||||
Reference in New Issue
Block a user