|
@@ -511,7 +511,15 @@ class Index extends Api
|
|
|
$row[$k]['quantitative_ion'] = $v[3];
|
|
$row[$k]['quantitative_ion'] = $v[3];
|
|
|
$row[$k]['response_value'] = $v[4];
|
|
$row[$k]['response_value'] = $v[4];
|
|
|
$row[$k]['potency'] = $v[5];
|
|
$row[$k]['potency'] = $v[5];
|
|
|
- $row[$k]['unit'] = $v[6];
|
|
|
|
|
|
|
+ preg_match('/#/', $v[6], $matches);
|
|
|
|
|
+ if(count($matches)){
|
|
|
|
|
+ $unit = str_replace('#', '', $v[6]);
|
|
|
|
|
+ $row[$k]['unit'] = $unit;
|
|
|
|
|
+ $row[$k]['deviation'] = '#';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $row[$k]['unit'] = $v[6];
|
|
|
|
|
+ $row[$k]['deviation'] = '';
|
|
|
|
|
+ }
|
|
|
$row[$k]['quanlitative_ion'] = $v[7];
|
|
$row[$k]['quanlitative_ion'] = $v[7];
|
|
|
$row[$k]['create'] = $time;
|
|
$row[$k]['create'] = $time;
|
|
|
}else{
|
|
}else{
|
|
@@ -522,6 +530,7 @@ class Index extends Api
|
|
|
$row[$k]['response_value'] = $v[3];
|
|
$row[$k]['response_value'] = $v[3];
|
|
|
$row[$k]['potency'] = $v[3];
|
|
$row[$k]['potency'] = $v[3];
|
|
|
$row[$k]['unit'] = $v[3];
|
|
$row[$k]['unit'] = $v[3];
|
|
|
|
|
+ $row[$k]['deviation'] = '';
|
|
|
$row[$k]['quanlitative_ion'] = $v[3];
|
|
$row[$k]['quanlitative_ion'] = $v[3];
|
|
|
$row[$k]['create'] = $time;
|
|
$row[$k]['create'] = $time;
|
|
|
}
|
|
}
|
|
@@ -1027,7 +1036,15 @@ class Index extends Api
|
|
|
$row[$k]['quantitative_ion'] = $v[3];
|
|
$row[$k]['quantitative_ion'] = $v[3];
|
|
|
$row[$k]['response_value'] = $v[4];
|
|
$row[$k]['response_value'] = $v[4];
|
|
|
$row[$k]['potency'] = $v[5];
|
|
$row[$k]['potency'] = $v[5];
|
|
|
- $row[$k]['unit'] = $v[6];
|
|
|
|
|
|
|
+ preg_match('/#/', $v[6], $matches);
|
|
|
|
|
+ if(count($matches)){
|
|
|
|
|
+ $unit = str_replace('#', '', $v[6]);
|
|
|
|
|
+ $row[$k]['unit'] = $unit;
|
|
|
|
|
+ $row[$k]['deviation'] = '#';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $row[$k]['unit'] = $v[6];
|
|
|
|
|
+ $row[$k]['deviation'] = '';
|
|
|
|
|
+ }
|
|
|
$row[$k]['quanlitative_ion'] = $v[7];
|
|
$row[$k]['quanlitative_ion'] = $v[7];
|
|
|
$row[$k]['create'] = $time;
|
|
$row[$k]['create'] = $time;
|
|
|
}else{
|
|
}else{
|
|
@@ -1038,6 +1055,7 @@ class Index extends Api
|
|
|
$row[$k]['response_value'] = $v[3];
|
|
$row[$k]['response_value'] = $v[3];
|
|
|
$row[$k]['potency'] = $v[3];
|
|
$row[$k]['potency'] = $v[3];
|
|
|
$row[$k]['unit'] = $v[3];
|
|
$row[$k]['unit'] = $v[3];
|
|
|
|
|
+ $row[$k]['deviation'] = '';
|
|
|
$row[$k]['quanlitative_ion'] = $v[3];
|
|
$row[$k]['quanlitative_ion'] = $v[3];
|
|
|
$row[$k]['create'] = $time;
|
|
$row[$k]['create'] = $time;
|
|
|
}
|
|
}
|
|
@@ -1045,14 +1063,13 @@ class Index extends Api
|
|
|
|
|
|
|
|
//将检测数据插入子表gather_txt_check_gc
|
|
//将检测数据插入子表gather_txt_check_gc
|
|
|
db()->name('gather_txt_check_gcms')->insertAll($row);
|
|
db()->name('gather_txt_check_gcms')->insertAll($row);
|
|
|
-
|
|
|
|
|
//去除数据文件名称后面的字母和.
|
|
//去除数据文件名称后面的字母和.
|
|
|
$sample_no = preg_replace('/[a-zA-Z\.]+\s*$/', '', $res['data_txt_name']);
|
|
$sample_no = preg_replace('/[a-zA-Z\.]+\s*$/', '', $res['data_txt_name']);
|
|
|
//查询entrust表中是否存在, 如果存在修改状态
|
|
//查询entrust表中是否存在, 如果存在修改状态
|
|
|
if(db()->name('entrust')->where('sample_no',$sample_no)->find()){
|
|
if(db()->name('entrust')->where('sample_no',$sample_no)->find()){
|
|
|
db()->name('entrust')->where('sample_no',$sample_no)->update(['data_status'=>1]);
|
|
db()->name('entrust')->where('sample_no',$sample_no)->update(['data_status'=>1]);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//提交事务
|
|
//提交事务
|
|
|
db()->commit();
|
|
db()->commit();
|
|
|
return json_encode(['code'=>'0','msg'=>'修改成功','time'=>$time,'data'=>[$res,$row]]);
|
|
return json_encode(['code'=>'0','msg'=>'修改成功','time'=>$time,'data'=>[$res,$row]]);
|