Explorar o código

矫正出库时 u9小单因为2次打印造成的丢单现象

lvhao hai 3 meses
pai
achega
24120af135
Modificáronse 1 ficheiros con 21 adicións e 40 borrados
  1. 21 40
      core/CoreApp/controllers/Systemfout.php

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

@@ -907,15 +907,6 @@ 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队列的数据
 			//开始录入执行u9队列的数据
 			
 			
 			$queue_u9_list = [];
 			$queue_u9_list = [];
@@ -928,7 +919,27 @@ class Systemfout extends Start_Controller {
 				'create_time'=>time(),
 				'create_time'=>time(),
 				'update_time'=>time(),
 				'update_time'=>time(),
 			];
 			];
+
+			//将要执行的队列数据添加进去
+			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);
+				    }
+				}
+				
+			}
 			$this->logic_ding->sendToDing("u9小单队列监听数据".json_encode($queue_u9_list,JSON_UNESCAPED_UNICODE));
 			$this->logic_ding->sendToDing("u9小单队列监听数据".json_encode($queue_u9_list,JSON_UNESCAPED_UNICODE));
+			if($outtype == 2 && $y['printnumber'] > 1)
+			{
+				$p = json_encode($post);
+				echo json_encode(array('msg'=>'该单共打印过'.$y['printnumber'].'次,请注意核对当前发货单是否是最新发货单!','outnumber'=>$y['id'],'post'=>$p,'fullorder_name'=>$fullorder_name,'success'=>false));exit;
+			}
+			$this->$fullorder_name->save($post,$y['id']);
+						
 			//合并订单自动发货
 			//合并订单自动发货
 			$hb = $this->$fullorder_name->find_all("merge = '".$y['id']."' and id != '".$y['id']."'");
 			$hb = $this->$fullorder_name->find_all("merge = '".$y['id']."' and id != '".$y['id']."'");
 			$post['waybill'] = $y['waybill'];
 			$post['waybill'] = $y['waybill'];
@@ -960,39 +971,9 @@ class Systemfout extends Start_Controller {
 						$this->$bdck->save(array('state'=>1,'cktype'=>1,'orderinfo'=>$v['orderinfo'],'waybill'=>$y['waybill'],'outk'=>$time,'time'=>$time),$vv['id']);
 						$this->$bdck->save(array('state'=>1,'cktype'=>1,'orderinfo'=>$v['orderinfo'],'waybill'=>$y['waybill'],'outk'=>$time,'time'=>$time),$vv['id']);
 					}
 					}
 				}
 				}
-				
-
-				//添加队列的录入    合并单没有产品信息和价格不再执行了
-
-				// $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)
-		  //      {
-				// 	$this->$bdck->save(array('state'=>1,'cktype'=>1,'orderinfo'=>$v['orderinfo'],'waybill'=>$y['waybill'],'outk'=>$time,'time'=>$time),$vv['id']);
-				// }
-				//$this->ck->get_kc($post['state'],$vwarehouse,$vshop,$v['number'],$v['whlabel'],$v['fpdata']);
 			}
 			}
 			
 			
-			//将要执行的队列数据添加进去
-			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)
 			if ($this->db->trans_status() === TRUE)
         	{
         	{