|
@@ -185,9 +185,9 @@ class Queueu9 extends Start_Controller {
|
|
|
}
|
|
}
|
|
|
//执行许昌备货的调入单查询
|
|
//执行许昌备货的调入单查询
|
|
|
private function _doXcBh(){
|
|
private function _doXcBh(){
|
|
|
- $this->db->select("dcd_no,status");
|
|
|
|
|
|
|
+ $this->db->select("dcd_no,status,drd_no");
|
|
|
$this->db->from("bhdcd");
|
|
$this->db->from("bhdcd");
|
|
|
- $this->db->where("status",0);
|
|
|
|
|
|
|
+ $this->db->where("drd_no = '' or drd_no is null");
|
|
|
$this->db->group_by('dcd_no');
|
|
$this->db->group_by('dcd_no');
|
|
|
$query = $this->db->get();
|
|
$query = $this->db->get();
|
|
|
$rows = $query->result_array();
|
|
$rows = $query->result_array();
|
|
@@ -204,42 +204,44 @@ class Queueu9 extends Start_Controller {
|
|
|
$this->db->where('dcd_no',$dcd_no);
|
|
$this->db->where('dcd_no',$dcd_no);
|
|
|
$this->db->update('bhdcd',[
|
|
$this->db->update('bhdcd',[
|
|
|
'drd_no' => $u9_drd_no,
|
|
'drd_no' => $u9_drd_no,
|
|
|
- 'status'=>1,
|
|
|
|
|
|
|
+ //'status'=>1,
|
|
|
]);
|
|
]);
|
|
|
}
|
|
}
|
|
|
usleep(100);
|
|
usleep(100);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- $this->db->select("dcd_no,status,drd_no");
|
|
|
|
|
- $this->db->from("bhdcd");
|
|
|
|
|
- $this->db->where("status",1);
|
|
|
|
|
- $this->db->group_by('dcd_no');
|
|
|
|
|
- $query = $this->db->get();
|
|
|
|
|
- $rows = $query->result_array();
|
|
|
|
|
- foreach($rows as $row){
|
|
|
|
|
- $drd_no = $row['drd_no'];
|
|
|
|
|
- $token = $this->settingtest->get_yytoken_120();
|
|
|
|
|
- $res = $this->apiyyv1->drdcxBydrd($drd_no,$token);
|
|
|
|
|
- if(!empty($res[0]['Data'])){
|
|
|
|
|
- if(!empty($res[0]['Data'][0])){
|
|
|
|
|
- if(!empty($res[0]['Data'][0]['docno'])){
|
|
|
|
|
- $u9_status = $res[0]['Data'][0]['status'];
|
|
|
|
|
- $u9_drd_no = $res[0]['Data'][0]['docno'];
|
|
|
|
|
- if($u9_status == 2){
|
|
|
|
|
- if($u9_drd_no == $drd_no){
|
|
|
|
|
- $this->db->where('drd_no',$drd_no);
|
|
|
|
|
- $this->db->update('bhdcd',[
|
|
|
|
|
- 'status'=>2,
|
|
|
|
|
- ]);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // $this->db->select("dcd_no,status,drd_no");
|
|
|
|
|
+ // $this->db->from("bhdcd");
|
|
|
|
|
+ // $this->db->where("status",1);
|
|
|
|
|
+ // $this->db->group_by('dcd_no');
|
|
|
|
|
+ // $query = $this->db->get();
|
|
|
|
|
+ // $rows = $query->result_array();
|
|
|
|
|
+ // foreach($rows as $row){
|
|
|
|
|
+ // $drd_no = $row['drd_no'];
|
|
|
|
|
+ // $token = $this->settingtest->get_yytoken_120();
|
|
|
|
|
+ // $res = $this->apiyyv1->drdcxBydrd($drd_no,$token);
|
|
|
|
|
+ // if(!empty($res[0]['Data'])){
|
|
|
|
|
+ // if(!empty($res[0]['Data'][0])){
|
|
|
|
|
+ // if(!empty($res[0]['Data'][0]['docno'])){
|
|
|
|
|
+ // $u9_status = $res[0]['Data'][0]['status'];
|
|
|
|
|
+ // $u9_drd_no = $res[0]['Data'][0]['docno'];
|
|
|
|
|
+ // if($u9_status == 2){
|
|
|
|
|
+ // if($u9_drd_no == $drd_no){
|
|
|
|
|
+ // $this->db->where('drd_no',$drd_no);
|
|
|
|
|
+ // $this->db->update('bhdcd',[
|
|
|
|
|
+ // 'status'=>2,
|
|
|
|
|
+ // ]);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- usleep(100);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // usleep(100);
|
|
|
|
|
+ // }
|
|
|
echo "SUCCESS";
|
|
echo "SUCCESS";
|
|
|
}
|
|
}
|
|
|
|
|
|