|
@@ -64,8 +64,9 @@ class Queueu9 extends Start_Controller {
|
|
|
|
|
|
//执行小单的流转到临时仓的队列
|
|
|
public function _xdls(){
|
|
|
+ $start_time = time() - 60 * 24 * 60 * 60;
|
|
|
//第一步生成 许昌成品库的调出单
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 0 and cg_status = 0 and xs_status = 0 ",'*','id asc');
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 0 and cg_status = 0 and xs_status = 0 and create_time >= ".$start_time,'*','id asc');
|
|
|
$do_list = [];
|
|
|
foreach($list as $k=>$v){
|
|
|
$tmp_info = $this->logic_order->getInfoByPlat($v['platform'],$v['order_no']);
|
|
@@ -76,18 +77,18 @@ class Queueu9 extends Start_Controller {
|
|
|
$this->logic_u9xg->xdlsOneStep($do_list);
|
|
|
|
|
|
//新加一步 查询修改调出单的审核结果
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 1 and cg_status = 0 and xs_status = 0 ",'*','id asc');
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 1 and cg_status = 0 and xs_status = 0 and create_time >= ".$start_time,'*','id asc');
|
|
|
$this->logic_u9xg->xdlsOneExtraStep($list);
|
|
|
|
|
|
//var_dump($list);
|
|
|
//第二步 创建的采购单和销售单
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and dc_data_status = 1 and cg_status = 0 and xs_status = 0 ");
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and dc_data_status = 1 and cg_status = 0 and xs_status = 0 and create_time >= ".$start_time);
|
|
|
// var_dump($list);
|
|
|
// die;
|
|
|
//var_dump($list);
|
|
|
$this->logic_u9xg->xdlsTwoStep($list);
|
|
|
//审核销售单和采购单
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and dc_data_status = 1 and cg_status = 1 and xs_status = 1");
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and dc_data_status = 1 and cg_status = 1 and xs_status = 1 and create_time >= ".$start_time);
|
|
|
//var_dump($list);
|
|
|
$this->logic_u9xg->xdlsTwoExtraStep($list);
|
|
|
|
|
@@ -95,10 +96,10 @@ class Queueu9 extends Start_Controller {
|
|
|
|
|
|
|
|
|
//第三步 查询调出单生成的调入单是否生成 如果生成了就审核 如果没生成 说明异常了 这种都是按步骤走的
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 0");
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 0 and create_time >= ".$start_time);
|
|
|
$this->logic_u9xg->xdlsThreeStep($list);
|
|
|
//第四步 建立香港的销售单 标准出库单有源的需要先审核 先创建销售单
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 0 ");
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 0 and create_time >= ".$start_time);
|
|
|
$do_list = [];
|
|
|
foreach($list as $k=>$v){
|
|
|
$tmp_info = $this->logic_order->getInfoByPlat($v['platform'],$v['order_no']);
|
|
@@ -112,14 +113,14 @@ class Queueu9 extends Start_Controller {
|
|
|
|
|
|
|
|
|
//执行第五步骤 审核销售单 并同时生成标准出货单
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 1 and bzch_status = 0 ");
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 1 and bzch_status = 0 and create_time >= ".$start_time);
|
|
|
|
|
|
if(!empty($list)){
|
|
|
$this->logic_u9xg->xdlsFiveStep($list);
|
|
|
}
|
|
|
|
|
|
sleep(3);
|
|
|
- $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 3 and bzch_status = 1 ");
|
|
|
+ $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 3 and cg_status = 3 and xs_status = 3 and dr_status = 3 and xs_two_status = 3 and bzch_status = 1 and create_time >= ".$start_time);
|
|
|
|
|
|
$this->logic_u9xg->xdlsSixStep($list);
|
|
|
}
|