|
|
@@ -294,6 +294,12 @@ class Outerrors extends Start_Controller{
|
|
|
'remark'=>"无此数据",
|
|
|
'scan_time'=>time(),
|
|
|
];
|
|
|
+
|
|
|
+ $ck_info = $this->outerrors->find("number = '".$info['number']."'");
|
|
|
+ if(!empty($ck_info)){
|
|
|
+ echo json_encode(['code'=>-1,'msg'=>$info['number']."不允许重复录入"]);exit;
|
|
|
+ }
|
|
|
+
|
|
|
if($this->outerrors->insert($arr)){
|
|
|
echo json_encode(['code'=>1,'msg'=>'扫描成功']);exit;
|
|
|
}else{
|
|
|
@@ -325,6 +331,12 @@ class Outerrors extends Start_Controller{
|
|
|
'remark'=>$r['msg'],
|
|
|
'scan_time'=>time(),
|
|
|
];
|
|
|
+
|
|
|
+ $ck_info = $this->outerrors->find("number = '".$info['number']."'");
|
|
|
+ if(!empty($ck_info)){
|
|
|
+ echo json_encode(['code'=>-1,'msg'=>$info['number']."不允许重复录入"]);exit;
|
|
|
+ }
|
|
|
+
|
|
|
if($this->outerrors->insert($arr)){
|
|
|
echo json_encode(['code'=>1,'msg'=>'扫描成功']);exit;
|
|
|
}else{
|