|
@@ -310,14 +310,18 @@ class Practice extends Backend
|
|
|
$fault_right_list = Db::name('real_exam_fault')->where(['exam_id'=>$ids,'flag'=>1])->select();
|
|
|
|
|
|
//根据故障部位,查找故障现象
|
|
|
- if($row['fault_total']==1){
|
|
|
- $fault_arr = [$fault_right_list[0]['fault_id']];
|
|
|
- }else if($row['fault_total']==2){
|
|
|
- $fault_arr = [$fault_right_list[0]['fault_id'],$fault_right_list[1]['fault_id']];
|
|
|
- }else if($row['fault_total']==3){
|
|
|
- $fault_arr = [$fault_right_list[0]['fault_id'],$fault_right_list[1]['fault_id'],$fault_right_list[2]['fault_id']];
|
|
|
+ if($row['fault_total']>0){
|
|
|
+ if($row['fault_total']==1){
|
|
|
+ $fault_arr = [$fault_right_list[0]['fault_id']];
|
|
|
+ }else if($row['fault_total']==2){
|
|
|
+ $fault_arr = [$fault_right_list[0]['fault_id'],$fault_right_list[1]['fault_id']];
|
|
|
+ }else if($row['fault_total']==3){
|
|
|
+ $fault_arr = [$fault_right_list[0]['fault_id'],$fault_right_list[1]['fault_id'],$fault_right_list[2]['fault_id']];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $fault_arr = Db::name('real_exam_fault')->where(['exam_id'=>$ids,'flag'=>1])->column('fault_id');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//根据故障部位查找,匹配的排除方法
|
|
|
$paichu_arr = Report::where(['bw_id'=>['in',$fault_arr],'sim_type'=>$info['sim_type']])->column('pc_id');
|
|
|
|