|
@@ -316,8 +316,8 @@ class Entrust extends Backend
|
|
|
* 无法确认是哪台机器(GC、GCMS)检测
|
|
* 无法确认是哪台机器(GC、GCMS)检测
|
|
|
* 1、先去找gcms表 没有查到数据 再找gc表
|
|
* 1、先去找gcms表 没有查到数据 再找gc表
|
|
|
*/
|
|
*/
|
|
|
- $data_txt = $entrust['sample_no'] . 'MS.D'; //如果是GCMS机台,数据文件为委托编号+MS.D
|
|
|
|
|
- $gather_gcms = Db::name('gather_txt_gcms')->where('data_txt_name', $data_txt)->order('id desc')->find();
|
|
|
|
|
|
|
+ $data_txt = $entrust['sample_no'] . 'MS.D'; //如果是GCMS机台,数据文件为委托编号+MS.D或MSR.D
|
|
|
|
|
+ $gather_gcms = Db::name('gather_txt_gcms')->where('data_txt_name', ['=',$data_txt],['=',$entrust['sample_no'].'MSR.D'],'or')->order('id desc')->find();
|
|
|
if (empty($gather_gcms)) {
|
|
if (empty($gather_gcms)) {
|
|
|
$data_txt_gc = $entrust['sample_no'] . '.D';
|
|
$data_txt_gc = $entrust['sample_no'] . '.D';
|
|
|
$gather_gc = Db::name('gather_txt_gc')->where('data_txt_name', $data_txt_gc)->order('id desc')->find();
|
|
$gather_gc = Db::name('gather_txt_gc')->where('data_txt_name', $data_txt_gc)->order('id desc')->find();
|
|
@@ -364,12 +364,21 @@ class Entrust extends Backend
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
$judge = Db::name('item_judge_detail')->where('pid', $temp_id[$ke])->select();
|
|
$judge = Db::name('item_judge_detail')->where('pid', $temp_id[$ke])->select();
|
|
|
- $class = Db::name('item_judge')->where('id', $id)->value('class');//获取判定标准类别
|
|
|
|
|
|
|
+ $class = Db::name('item_judge')->where('id', $temp_id[$ke])->value('class');//获取判定标准类别
|
|
|
$sum_all_dis_data = array_sum($all_dis_data);
|
|
$sum_all_dis_data = array_sum($all_dis_data);
|
|
|
|
|
+ if ($ethanol == '-'){
|
|
|
|
|
+ $ethanol = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($methanol == '-'){
|
|
|
|
|
+ $methanol = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ($ethylacetate == '-'){
|
|
|
|
|
+ $ethylacetate = 0;
|
|
|
|
|
+ }
|
|
|
if ($class == 1) {//常规类 26项减去乙醇 杂质总量14项
|
|
if ($class == 1) {//常规类 26项减去乙醇 杂质总量14项
|
|
|
$dis = $sum_all_dis_data - $ethanol; //残留总量
|
|
$dis = $sum_all_dis_data - $ethanol; //残留总量
|
|
|
$dis_impurity = array_sum($dis_impurity_data); //杂质总量
|
|
$dis_impurity = array_sum($dis_impurity_data); //杂质总量
|
|
|
- } elseif ($class == 2) {//特殊类1 26项减去乙醇、甲醇、乙酸乙酯,杂质总量减去甲醇
|
|
|
|
|
|
|
+ } else if ($class == 2) {//特殊类1 26项减去乙醇、甲醇、乙酸乙酯,杂质总量减去甲醇
|
|
|
$dis = $sum_all_dis_data - $ethanol - $methanol - $ethylacetate; //残留总量
|
|
$dis = $sum_all_dis_data - $ethanol - $methanol - $ethylacetate; //残留总量
|
|
|
$dis_impurity = array_sum($dis_impurity_data) - $methanol; //杂质总量
|
|
$dis_impurity = array_sum($dis_impurity_data) - $methanol; //杂质总量
|
|
|
} else {//特殊类2 26项减去乙醇 杂质总量14项减去甲醇
|
|
} else {//特殊类2 26项减去乙醇 杂质总量14项减去甲醇
|