lvhao 3 днів тому
батько
коміт
7be14a7a93
1 змінених файлів з 19 додано та 2 видалено
  1. 19 2
      core/CoreApp/controllers/Whlabel_bh.php

+ 19 - 2
core/CoreApp/controllers/Whlabel_bh.php

@@ -143,6 +143,9 @@ class Whlabel_bh extends Start_Controller {
 			$this->_excelcpkhz();
 
 		}
+		else if($arg == 'check_by_number'){
+			$this->_check_by_number();
+		}
 		else
 		{
 			 $this->_index();
@@ -2299,8 +2302,6 @@ class Whlabel_bh extends Start_Controller {
 		$start_time = strtotime(date('Y-m-d')) -  14* 24 * 60 * 60;
 		$end_time = strtotime(date('Y-m-d')) + 24 * 60 * 60;
 		//
-		echo "extra_type = 1 and time >= ".$start_time." and time <= ".$end_time;
-		die;
 		$tmp_list = $this->whlabel_bh->find_pc("extra_type = 1 and time >= ".$start_time." and time <= ".$end_time,'orderinfo',"id,orderinfo,jgtime",'id desc');
 		if(empty($tmp_list)){
 			$total_num = 0;
@@ -2967,4 +2968,20 @@ class Whlabel_bh extends Start_Controller {
 				exit($str); 
 		}
 	}
+	/**
+	 * 使用的是orderinfo作为唯一标识
+	 */
+	private function _check_by_number(){
+		$orderinfo = $this->input->get('orderinfo',true);
+		$orderinfo = trim($orderinfo);
+		if(empty($orderinfo)){
+			exit(json_encode(['code'=>-1,'msg'=>'单号不能为空']));
+		}
+		$info = $this->whlabel_bh->find(" orderinfo like '%".$orderinfo."%");
+		if(empty($info)){
+			exit(json_encode(['code'=>-1,'msg'=>'未找到该订单']));
+		}else{
+			exit(json_encode(['code'=>1,'msg'=>'未找到该订单']));
+		}
+	}
 }