浏览代码

提交数据

lvhao 2 月之前
父节点
当前提交
8a443f41f1
共有 2 个文件被更改,包括 68 次插入7 次删除
  1. 13 7
      core/CoreApp/controllers/Aatest.php
  2. 55 0
      core/CoreApp/models/Model_job_get3pewaybillid.php

+ 13 - 7
core/CoreApp/controllers/Aatest.php

@@ -69,6 +69,7 @@ class Aatest extends Start_Controller {
 		$this->load->_model('Model_message','message');
 		$this->load->_model('Model_message','message');
 		$this->load->_model('Model_itsxb','itsxb');
 		$this->load->_model('Model_itsxb','itsxb');
 		$this->load->_model("Model_logic_order","logic_order");
 		$this->load->_model("Model_logic_order","logic_order");
+		$this->load->_model("Model_job_get3pewaybillid",'job_get3pewaybillid');
     }
     }
 
 
     //定义方法的调用规则 获取URI第二段值
     //定义方法的调用规则 获取URI第二段值
@@ -106,13 +107,18 @@ class Aatest extends Start_Controller {
 		// 	//$this->_mdedit($arg_array);
 		// 	//$this->_mdedit($arg_array);
 		// }
 		// }
 		//$this->_print();
 		//$this->_print();
-		die;
-		$time = time() - 10 * 3600 * 24;
-        //快递为3pe  76  出库时间十天前   waybillid 不能为空
-        $where = "express = 76 and librarytime >= ".$time ." and waybillid is not null";
-		$list = $this->fullorder->find_all($where,"id,number,waybill,waybillid,librarytime,express");
-		echo "<pre>";
-		print_r($list);
+		// die;
+		// $time = time() - 10 * 3600 * 24;
+        // //快递为3pe  76  出库时间十天前   waybillid 不能为空
+        // $where = "express = 76 and librarytime >= ".$time ." and waybillid is not null";
+		// $list = $this->fullorder->find_all($where,"id,number,waybill,waybillid,librarytime,express");
+		// echo "<pre>";
+		// print_r($list);
+		// $res = $this->itsxb->getDetail('QQS-50621-021');
+		// echo "<pre>";
+		// print_r($res);
+		// die;
+		$this->get3pewaybillid->do_job();
     }
     }
 
 
 	public function _plcl(){
 	public function _plcl(){

+ 55 - 0
core/CoreApp/models/Model_job_get3pewaybillid.php

@@ -0,0 +1,55 @@
+<?php
+class Model_job_get3pewaybillid extends Lin_Model {
+    function __construct(){
+            parent::__construct();
+            $this->load->_model("Model_itsxb","itsxb");
+            $this->load->_model("Model_fullorder","fullorder");
+            $this->load->_model("Model_fullordersmt","fullordersmt");
+            $this->load->_model("Model_fullordertt","fullordertt");
+            $this->load->_model("Model_fullorderamz","fullorderamz");
+
+    }
+    public function do_job(){
+        $end_time = time() - 10 * 3600 * 24;
+        $start_time = time() - 2 * 3600 * 24;
+        //快递为3pe  76  出库时间十天前   waybillid 不能为空
+        $where = "express = 76 and librarytime >= ".$end_time ." and librarytime <= ".$start_time." ";
+        $fields = "id,number,waybill,waybillid,librarytime,express";
+        $this->do_dlz($where,$fields);
+        $this->do_tt();
+        $this->do_amz();
+        $this->do_smt();
+    }
+    //执行对立站的代码
+    private function do_dlz($where,$fields){
+        $list = $this->fullorder->find_all($where,$fields);
+        foreach($list as $item){
+            if(empty($item['waybill'])){
+                $this->do_final($item,"fullorder");
+            }else{
+                continue;
+            }
+        }
+    }
+
+    private  function do_tt(){
+
+    }
+
+    private function do_amz(){
+
+    }
+    private function do_smt(){
+
+    }
+
+    private function do_final($info,$table_name){
+        print_r($info);
+        sleep(1);
+        $res = $this->itsxb->getDetail($info['number']);
+        if(isset($res['code'])){
+            print_r($res);
+        }
+        die;
+    }
+}