瀏覽代碼

修改u9队列缺失的问题

lvhao 3 月之前
父節點
當前提交
333e636a0a
共有 1 個文件被更改,包括 33 次插入21 次删除
  1. 33 21
      core/CoreApp/controllers/Systemfout.php

+ 33 - 21
core/CoreApp/controllers/Systemfout.php

@@ -897,17 +897,8 @@ class Systemfout extends Start_Controller {
 				}
 			}
 			**/
-			$this->logic_ding->sendToDing("u9小单队列监听数据第一位".$y['number']."称重".$numweight."快递公司".$y['express']);
-			if($outtype == 2 && $y['printnumber'] > 1)
-			{
-				$this->logic_ding->sendToDing("u9小单队列监听数据第三位".$y['number']);
-				$p = json_encode($post);
-				echo json_encode(array('msg'=>'该单共打印过'.$y['printnumber'].'次,请注意核对当前发货单是否是最新发货单!','outnumber'=>$y['id'],'post'=>$p,'fullorder_name'=>$fullorder_name,'success'=>false));exit;
-			}
-			$this->logic_ding->sendToDing("u9小单队列监听数据第二位".$y['number']);
-			$this->$fullorder_name->save($post,$y['id']);
 			//开始录入执行u9队列的数据
-			
+			$this->logic_ding->sendToDing("u9小单队列监听数据".json_encode($queue_u9_list,JSON_UNESCAPED_UNICODE));
 			$queue_u9_list = [];
 			$queue_u9_list[] = [
 				'platform'=>$fullorder_name,
@@ -918,7 +909,28 @@ class Systemfout extends Start_Controller {
 				'create_time'=>time(),
 				'update_time'=>time(),
 			];
-			$this->logic_ding->sendToDing("u9小单队列监听数据".json_encode($queue_u9_list,JSON_UNESCAPED_UNICODE));
+			//将要执行的队列数据添加进去
+			foreach($queue_u9_list as $item){
+				if($item['platform'] != 'fullorderxw'){
+				    // if(($item['warehouse'] != 5) || ($item['warehouse'] != 7) || ($item['warehouse'] != 8) || ($item['warehouse'] != 9) ){
+				    //     $this->zzquque_u9->insert($item);
+				    // }
+					if( !in_array($item['warehouse'],[5,7,8,9]) ){
+				        $this->zzquque_u9->insert($item);
+				    }
+				}
+				
+			}
+			if($outtype == 2 && $y['printnumber'] > 1)
+			{
+				//$this->logic_ding->sendToDing("u9小单队列监听数据第三位".$y['number']);
+				$p = json_encode($post);
+				echo json_encode(array('msg'=>'该单共打印过'.$y['printnumber'].'次,请注意核对当前发货单是否是最新发货单!','outnumber'=>$y['id'],'post'=>$p,'fullorder_name'=>$fullorder_name,'success'=>false));exit;
+			}
+			//$this->logic_ding->sendToDing("u9小单队列监听数据第二位".$y['number']);
+			$this->$fullorder_name->save($post,$y['id']);
+			
+			
 			//合并订单自动发货
 			$hb = $this->$fullorder_name->find_all("merge = '".$y['id']."' and id != '".$y['id']."'");
 			$post['waybill'] = $y['waybill'];
@@ -972,17 +984,17 @@ class Systemfout extends Start_Controller {
 			}
 			
 			//将要执行的队列数据添加进去
-			foreach($queue_u9_list as $item){
-				if($item['platform'] != 'fullorderxw'){
-				    // if(($item['warehouse'] != 5) || ($item['warehouse'] != 7) || ($item['warehouse'] != 8) || ($item['warehouse'] != 9) ){
-				    //     $this->zzquque_u9->insert($item);
-				    // }
-					if( !in_array($item['warehouse'],[5,7,8,9]) ){
-				        $this->zzquque_u9->insert($item);
-				    }
-				}
+			// foreach($queue_u9_list as $item){
+			// 	if($item['platform'] != 'fullorderxw'){
+			// 	    // if(($item['warehouse'] != 5) || ($item['warehouse'] != 7) || ($item['warehouse'] != 8) || ($item['warehouse'] != 9) ){
+			// 	    //     $this->zzquque_u9->insert($item);
+			// 	    // }
+			// 		if( !in_array($item['warehouse'],[5,7,8,9]) ){
+			// 	        $this->zzquque_u9->insert($item);
+			// 	    }
+			// 	}
 				
-			}
+			// }
 			
 			if ($this->db->trans_status() === TRUE)
         	{