Explorar o código

上线在途库存同步u9

longyi hai 5 meses
pai
achega
036d36ab9e
Modificáronse 1 ficheiros con 20 adicións e 21 borrados
  1. 20 21
      core/CoreApp/controllers/Queueu9.php

+ 20 - 21
core/CoreApp/controllers/Queueu9.php

@@ -104,7 +104,6 @@ class Queueu9 extends Start_Controller {
     
     public function _zt(){
         echo "<pre>";
-        die;
         $classid = $this->classid->sku();
         $tcall = $this->typeclass->find_all();
         foreach ($tcall as $v)
@@ -114,35 +113,35 @@ class Queueu9 extends Start_Controller {
         }
             
         //第一步生成 许昌成品库的调出单
-        //$list =  $this->zzquque_u9->find_all("type = 1 and dc_status = 0 and cg_status = 0 and xs_status = 0 ",'*','id asc',0,1);
+        $list =  $this->zzquque_u9->find_all("type = 1 and dc_status = 0 and cg_status = 0 and xs_status = 0 ",'*','id asc',0,5);
         //ZT250314172219
-        $list =  $this->zzquque_u9->find_all("order_no = 'ZT250314173250'  and cg_status = 0 and xs_status = 0 ",'*','id asc',0,1);
+        // $list =  $this->zzquque_u9->find_all("order_no = 'ZT250314173250'  and cg_status = 0 and xs_status = 0 ",'*','id asc',0,1);
         foreach($list as $k=>$v){
             $this->logic_u9zt->createdDc($v,$classid,$typeclass);
         }
 
         //第二步查询调出但状态
-        // $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 1 and cg_status = 0 and xs_status = 0 ",'*','id asc');
-        // foreach($list as $k=>$v){
-        //     $this->logic_u9zt->cxDxcheck($v);
-        // }
+        $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 1 and cg_status = 0 and xs_status = 0 ",'*','id asc');
+        foreach($list as $k=>$v){
+            $this->logic_u9zt->cxDxcheck($v);
+        }
         //第三步创建销售单和采购单 
-        // $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 3 and dc_data_status = 1 and cg_status = 0 and xs_status = 0 ",'*','id asc');
-        // foreach($list as $k=>$v){
-        //     $this->logic_u9zt->createXsAndCg($v);
-        // }
-        //sleep(2);
+        $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 3 and dc_data_status = 1 and cg_status = 0 and xs_status = 0 ",'*','id asc');
+        foreach($list as $k=>$v){
+            $this->logic_u9zt->createXsAndCg($v);
+        }
+        sleep(2);
         //第四部查询调出单产生的调入单
-        // $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 3 and dc_data_status = 1 and cg_status = 1 and xs_status = 1 and dr_status = 0 ",'*','id asc');
-        // foreach($list as $k=>$v){
-        //     $this->logic_u9zt->cxDrByDc($v);
-        // }
+        $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 3 and dc_data_status = 1 and cg_status = 1 and xs_status = 1 and dr_status = 0 ",'*','id asc');
+        foreach($list as $k=>$v){
+            $this->logic_u9zt->cxDrByDc($v);
+        }
 
-        // //第五步审核产生的销售单和采购单
-        // $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 3 and dc_data_status = 1 and cg_status = 1 and xs_status = 1 and dr_status = 3 ",'*','id asc');
-        // foreach($list as $k=>$v){
-        //     $this->logic_u9zt->shCgAndXs($v);
-        // }
+        //第五步审核产生的销售单和采购单
+        $list = $this->zzquque_u9->find_all("type = 1 and dc_status = 3 and dc_data_status = 1 and cg_status = 1 and xs_status = 1 and dr_status = 3 ",'*','id asc');
+        foreach($list as $k=>$v){
+            $this->logic_u9zt->shCgAndXs($v);
+        }
         //第六步更新在途库存
         $list = $this->zzquque_u9->find_all("type = 2 and dc_status = 0  and dc_data_status = 0 and dr_status = 0 ",'*','id asc');
         foreach($list as $k=>$v){