Selaa lähdekoodia

提交数据 处理 点击完成 位同步的bug

lvhao 1 päivä sitten
vanhempi
commit
e0082f6aaf
1 muutettua tiedostoa jossa 15 lisäystä ja 2 poistoa
  1. 15 2
      core/CoreApp/controllers/Whlabeltransport.php

+ 15 - 2
core/CoreApp/controllers/Whlabeltransport.php

@@ -487,9 +487,8 @@ class Whlabeltransport extends Start_Controller {
 				if ($this->db->trans_status() === TRUE)
         		{
 					$this->db->trans_commit();
-					usleep(5000);
 					$num = $this->whlabeltransport->find_count("order_no = '".$data['order_no']."' and cz = 0");
-					if(empty($num)){
+					if($num == 0){
 						if(!empty($data['order_no'])){
 							$this->zzquque_u9->insert( [
 								'platform'=>'',
@@ -830,6 +829,20 @@ class Whlabeltransport extends Start_Controller {
 				    $this->whlabeltransport->save(array('time'=>$time,'cz'=>1),$data['id']);
 				    if ($this->db->trans_status() === TRUE)
         		    {
+						$num = $this->whlabeltransport->find_count("order_no = '".$data['order_no']."' and cz = 0");
+						if($num == 0){
+							if(!empty($data['order_no'])){
+								$this->zzquque_u9->insert( [
+									'platform'=>'',
+									'warehouse'=>0,
+									'type'=>2,   //将在途库存调入到美仓
+									'order_no'=>$data['order_no'],
+									'status'=>0,
+									'create_time'=>time(),
+									'update_time'=>time(),
+								]);
+							}
+						}
 					    $this->db->trans_commit();
 						$i++;
 				    }