longyi 5 miesięcy temu
rodzic
commit
29796b71c4

+ 18 - 13
core/CoreApp/controllers/Queueu9.php

@@ -30,11 +30,15 @@ class Queueu9 extends Start_Controller {
         }
     }
     public function _index(){
+        //  $list = $this->zzquque_u9->find_all("type = 11 ");
+        // foreach($list as $k=>$v){
+        //     $this->zzquque_u9->remove($v['id']);
+        // }
          //新加一步  查询修改调出单的审核结果
-         echo "<pre>";
-         $list = $this->zzquque_u9->find_all("type = 10 and order_no = 'QQS-50228-020'");
+        //  echo "<pre>";
+        //  $list = $this->zzquque_u9->find_all("type = 10 and order_no = 'QQS-50228-020'");
         
-         $this->logic_u9xg->xdlsOneExtraStep($list);
+        //  $this->logic_u9xg->xdlsOneExtraStep($list);
         //执行第一步的参数
         // $list = $this->zzquque_u9->find_all();
         // $do_list = [];
@@ -75,22 +79,23 @@ class Queueu9 extends Start_Controller {
 
      //执行小单的流转到临时仓的队列  
     public function _xdls(){
-        //die;
+       
+        die;
         echo "<pre>";
         //第一步生成 许昌成品库的调出单
-        // $list =  $this->zzquque_u9->find_all("type = 10 and dc_status = 0 and cg_status = 0 and xs_status = 0 ",'*','id asc',0,1);
-        // $do_list = [];
-        // foreach($list as $k=>$v){
-        //     $tmp_info = $this->logic_order->getInfoByPlat($v['platform'],$v['order_no']);
-        //     $tmp_info['zq_u9_id'] = $v['id'];
-        //     $do_list[] = $tmp_info;
-        // }
+        $list =  $this->zzquque_u9->find_all("type = 10 and dc_status = 0 and cg_status = 0 and xs_status = 0 ",'*','id asc',0,1);
+        $do_list = [];
+        foreach($list as $k=>$v){
+            $tmp_info = $this->logic_order->getInfoByPlat($v['platform'],$v['order_no']);
+            $tmp_info['zq_u9_id'] = $v['id'];
+            $do_list[] = $tmp_info;
+        }
         
-        // $this->logic_u9xg->xdlsOneStep($do_list);
+        $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',0,8);
+        $list = $this->zzquque_u9->find_all("type = 10 and dc_status = 1 and cg_status = 0 and xs_status = 0 ",'*','id asc');
         $this->logic_u9xg->xdlsOneExtraStep($list);
         
         //var_dump($list);

+ 13 - 12
core/CoreApp/controllers/Systemfout.php

@@ -941,17 +941,17 @@ class Systemfout extends Start_Controller {
 				}
 				
 
-				//添加队列的录入
+				//添加队列的录入    合并单没有产品信息和价格不再执行了
 
-				$queue_u9_list[] = [
-					'platform'=>$fullorder_name,
-					'warehouse'=>$v['type'],
-					'type'=>($y['type'] == 5)?11:10,
-					'order_no'=>$v['number'],
-					'status'=>0,
-					'create_time'=>time(),
-					'update_time'=>time(),
-				];
+				// $queue_u9_list[] = [
+				// 	'platform'=>$fullorder_name,
+				// 	'warehouse'=>$v['type'],
+				// 	'type'=>($y['type'] == 5)?11:10,
+				// 	'order_no'=>$v['number'],
+				// 	'status'=>0,
+				// 	'create_time'=>time(),
+				// 	'update_time'=>time(),
+				// ];
 				// $wh = $this->_fout_db($v,$warehouse,$bdck);
 				// foreach ($wh['sj'] as $vv)
 		  //      {
@@ -963,8 +963,9 @@ class Systemfout extends Start_Controller {
 			//将要执行的队列数据添加进去
 			foreach($queue_u9_list as $item){
 				if($item['platform'] != 'fullorderxw'){
-				
-					$this->zzquque_u9->insert($item);
+				    if($item['warehouse'] != 5){
+				        $this->zzquque_u9->insert($item);
+				    }
 				}
 				
 			}

+ 4 - 4
core/CoreApp/models/Model_logic_u9xg.php

@@ -340,21 +340,21 @@ class Model_logic_u9xg extends Lin_Model {
         //创建许昌成品库的销售单
         $xsd_res = $this->apiyyv1->xsdCreate($dc_params,$this->getToken(130));
         if(empty($xsd_res[0]['Data'][0]['m_code'])){
-            $this->editData($info['id'],['xs_status'=>-1,'update_time'=>time()],$info['number'],2,1,'xs',$xsd_res[1],$xsd_res[0]);
+            $this->editData($info['id'],['xs_status'=>-1,'update_time'=>time()],$info['order_no'],2,1,'xs',$xsd_res[1],$xsd_res[0]);
             return ;
         }
         //更新销售单数据
        $xs_no = $xsd_res[0]['Data'][0]["m_code"];
-       $this->editData($info['id'],['xs_no'=>$xs_no,'xs_status'=>1,'update_time'=>time()],$info['number'],2,1,'xs',$xsd_res[1],$xsd_res[0]);
+       $this->editData($info['id'],['xs_no'=>$xs_no,'xs_status'=>1,'update_time'=>time()],$info['order_no'],2,1,'xs',$xsd_res[1],$xsd_res[0]);
 
         //创建香港公司的采购单
         $cgd_res = $this->apiyyv1->cgdCreate($dc_params,$this->getToken(140));
         if(empty($cgd_res[0]['Data'][0]["Code"])){
-            $this->editData($info['id'],['cg_status'=>-1,'update_time'=>time()],$info['number'],3,1,'cg',$cgd_res[1],$cgd_res[0]);
+            $this->editData($info['id'],['cg_status'=>-1,'update_time'=>time()],$info['order_no'],3,1,'cg',$cgd_res[1],$cgd_res[0]);
             return ;
         }
 
-        $this->editData($info['id'],['cg_no'=>$cgd_res[0]['Data'][0]["Code"],'cg_status'=>1,'update_time'=>time()],$info['number'],3,1,'cg',$cgd_res[1],$cgd_res[0]);
+        $this->editData($info['id'],['cg_no'=>$cgd_res[0]['Data'][0]["Code"],'cg_status'=>1,'update_time'=>time()],$info['order_no'],3,1,'cg',$cgd_res[1],$cgd_res[0]);
         return;
     }