This commit is contained in:
weiz 2024-06-05 10:43:12 +08:00
parent 97fbb44018
commit 8e8030f85f
2 changed files with 2 additions and 1 deletions

View File

@ -169,6 +169,7 @@ class OaExamineLogic extends BaseLogic
$data['total_self_score'] = OaExamineDetail::where('examine_id',$data['id'])->sum('self_score');
$data['total_superior_score'] = OaExamineDetail::where('examine_id',$data['id'])->sum('superior_score');
$data['final_score'] = bcadd($data['total_self_score'],$data['total_superior_score'],2) / 2;
$data['detail'] = OaExamineDetail::field('id,examine_item,score,examine_desc,self_score,superior_score')->where('examine_id',$data['id'])->select()->toArray();
return $data->toArray();
}
}

View File

@ -171,7 +171,7 @@ class OaSelfExamineLogic extends BaseLogic
$data['examine_type_text'] = $data->examine_type_text;
$data['total_score'] = OaSelfExamineDetail::where('self_examine_id',$data['id'])->sum('score');
$data['total_self_score'] = OaSelfExamineDetail::where('self_examine_id',$data['id'])->sum('self_score');
$data['detail'] = OaSelfExamineDetail::field('id,self_examine_id,self_score,examine_item,score,examine_desc')->where('self_examine_id',$data['id'])->select()->toArray();
$data['detail'] = OaSelfExamineDetail::field('id,self_score,examine_item,score,examine_desc')->where('self_examine_id',$data['id'])->select()->toArray();
return $data->toArray();
}
}