longyi 1 day ago
parent
commit
332bb5f9af
1 changed files with 10 additions and 4 deletions
  1. 10 4
      core/CoreApp/controllers/Whlabelfz1.php

+ 10 - 4
core/CoreApp/controllers/Whlabelfz1.php

@@ -157,14 +157,20 @@ class Whlabelfz1 extends Start_Controller
 				exit(json_encode(['code'=>-1,'msg'=>'扫描数量不能大于2000','data'=>[],JSON_UNESCAPED_UNICODE]));
 			}
 		}
-		$info = $this->whlabel_bh_scan->find("label ='".$label."'");
-		if(!empty($info)){
-			exit(json_encode(['code'=>-1,'msg'=>'该标签已被扫描','data'=>[],JSON_UNESCAPED_UNICODE]));
-		}
+		
 		
 		if($type == 1){
+		    $info = $this->whlabel_bh_scan->find("label ='".$label."'");
+    		if(!empty($info)){
+    			exit(json_encode(['code'=>-1,'msg'=>'该标签已被扫描','data'=>[],JSON_UNESCAPED_UNICODE]));
+    		}
 			$res = $this->_bbscan($orderinfo,$label);
 		}elseif($type == 2){
+		    $start_time = strtotime(date("Y-m-d"),time());
+		    $info = $this->whlabel_bh_scan->find("label ='".$label."' and scantime >= ");
+    		if(!empty($info)){
+    			exit(json_encode(['code'=>-1,'msg'=>'该标签已被扫描','data'=>[],JSON_UNESCAPED_UNICODE]));
+    		}
 			$res = $this->_bqscan($orderinfo,$label,$num);
 		}