Bläddra i källkod

查找ALIP-50707-067异常

lvhao 1 månad sedan
förälder
incheckning
78615d265f
1 ändrade filer med 10 tillägg och 0 borttagningar
  1. 10 0
      core/CoreApp/controllers/Systemfout.php

+ 10 - 0
core/CoreApp/controllers/Systemfout.php

@@ -784,6 +784,7 @@ class Systemfout extends Start_Controller {
 			{
 				if($warehouse['bdck'] == '')
 				{
+					$this->db->trans_rollback();
 					echo json_encode(array('msg'=>'仓库设置错误!','success'=>false));exit;
 				}
 				$wh = $this->_fout_db($y,$warehouse,$bdck);
@@ -803,6 +804,7 @@ class Systemfout extends Start_Controller {
 					$wh = $this->_fout_db($y,$warehouse,$bdck);
 					if($wh['fh'] == 2)
 					{
+						$this->db->trans_rollback();
 						echo json_encode(array('msg'=>'库存占用量与实际出库量不符!','success'=>false));exit;
 					}
 				}
@@ -895,6 +897,7 @@ class Systemfout extends Start_Controller {
 				$d = $this->dhl->get_data_9610($y);
 				if($d != 1)
 				{
+					$this->db->trans_rollback();
 					$this->allocation->insert(array('order'=>1,'title'=>$y['number'],'content'=>$d));
 					echo json_encode(array('msg'=>'9610失败,'.$d,'success'=>false));exit;
 				}
@@ -1004,6 +1007,7 @@ class Systemfout extends Start_Controller {
 			if($outtype == 2 && $y['printnumber'] > 1)
 			{
 				$p = json_encode($post);
+				$this->db->trans_rollback();
 				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']);
@@ -1115,11 +1119,13 @@ class Systemfout extends Start_Controller {
 						}
 					}
 					echo json_encode(array('success'=>true));
+					die;
 				}
 				else
 				{
 					$this->db->trans_rollback();
 					echo json_encode(array('msg'=>'出库失败,请重试','success'=>false));
+					die;
 				}
 
 
@@ -1146,12 +1152,16 @@ class Systemfout extends Start_Controller {
 					}
 				}
 				echo json_encode(array('success'=>true));
+				die;
 				
 			}
 			
 			
 			
 			
+		}else{
+			echo json_encode(array('msg'=>'传参异常,请重试','success'=>false));
+			die;
 		}
 	}
 	public function _fout_db($y,$warehouse,$bdck)//对比占单是否正确