|
|
@@ -43,23 +43,23 @@ class Index extends Api
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- //判断数据是否是ABCD开头
|
|
|
- preg_match('/^[A,B,C,D]/', $res['data_txt_name'], $matches);
|
|
|
- if(!count($matches)){
|
|
|
- Log::init([
|
|
|
- // 日志记录方式,支持 file socket
|
|
|
- 'type' => 'File',//type的值为test时临时关闭日志写入
|
|
|
- //日志保存目录
|
|
|
- 'path' => APP_PATH.'../runtime/log/notABCD/',
|
|
|
- //单个日志文件的大小限制,超过后会自动记录到第二个文件
|
|
|
- 'file_size' =>2097152,
|
|
|
- //日志的时间格式,默认是` c `
|
|
|
- 'time_format' =>'c',
|
|
|
- 'level' => ['log'],
|
|
|
- ]);
|
|
|
- Log::record(['失败'=>'样品编号为'.$res['data_txt_name'].'数据插入失败','原因'=>'该文件编号不以ABCD开头']);
|
|
|
- return $this->success('数据文件不以A、B、C、D开头,已记录日志',$req,0);
|
|
|
- }
|
|
|
+// //判断数据是否是ABCD开头
|
|
|
+// preg_match('/^[A,B,C,D]/', $res['data_txt_name'], $matches);
|
|
|
+// if(!count($matches)){
|
|
|
+// Log::init([
|
|
|
+// // 日志记录方式,支持 file socket
|
|
|
+// 'type' => 'File',//type的值为test时临时关闭日志写入
|
|
|
+// //日志保存目录
|
|
|
+// 'path' => APP_PATH.'../runtime/log/notABCD/',
|
|
|
+// //单个日志文件的大小限制,超过后会自动记录到第二个文件
|
|
|
+// 'file_size' =>2097152,
|
|
|
+// //日志的时间格式,默认是` c `
|
|
|
+// 'time_format' =>'c',
|
|
|
+// 'level' => ['log'],
|
|
|
+// ]);
|
|
|
+// Log::record(['失败'=>'样品编号为'.$res['data_txt_name'].'数据插入失败','原因'=>'该文件编号不以ABCD开头']);
|
|
|
+// return $this->success('数据文件不以A、B、C、D开头,已记录日志',$req,0);
|
|
|
+// }
|
|
|
foreach($rows as $k=>$v){
|
|
|
preg_match('/样品名称/', $v, $matches);
|
|
|
if(count($matches)){
|