升级php版本后错误修复
This commit is contained in:
@@ -102,8 +102,9 @@ class ExamineController extends BasePharmacistController
|
||||
throw new Exception('暂无数据');
|
||||
}
|
||||
|
||||
$list = [];
|
||||
// 遍历处方列表,处理每个处方的内容
|
||||
foreach ($prescription as &$v) {
|
||||
foreach ($prescription as $v) {
|
||||
// 解析处方内容中的JSON数据
|
||||
$tmp = json_decode($v['content'], true);
|
||||
// 提取并赋值处方类别
|
||||
@@ -127,10 +128,11 @@ class ExamineController extends BasePharmacistController
|
||||
$v['drugs_count'] = count($v['p_drugs']);
|
||||
// 格式化创建时间,若无创建时间则设为空字符串
|
||||
$v['created_at'] = !empty($v['created_at']) ? date('Y-m-d H:i:s', $v['created_at']) : '';
|
||||
$list[] = $v;
|
||||
}
|
||||
|
||||
// 返回处理后的处方列表
|
||||
return $prescription;
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user