Просмотр исходного кода

提交修改出库的多次打印未同步合并订单的信息 bug

lvhao 1 день назад
Родитель
Сommit
217dacb6d1
1 измененных файлов с 49 добавлено и 0 удалено
  1. 49 0
      core/CoreApp/controllers/Systemfout.php

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

@@ -1115,6 +1115,31 @@ class Systemfout extends Start_Controller {
 					$this->$bdck->save(array('state'=>1,'cktype'=>1,'orderinfo'=>$y['orderinfo'],'waybill'=>$y['waybill'],'outk'=>$post['librarytime'],'time'=>$post['librarytime']),$v['id']);
 				}
 				$this->$fullorder_name->save($post,$y['id']);
+	
+				//需要添加上合并订单的订单信息更新
+				$hb = $this->$fullorder_name->find_all("merge = '".$y['id']."' and id != '".$y['id']."'");
+
+				$save_arr = [];
+				$save_arr['waybill'] = $y['waybill'];
+				$save_arr['express'] = $y['express'];
+				$save_arr['printtype'] = $y['printtype'];
+				$save_arr['ioss'] = $y['ioss'];
+				$save_arr['review'] = 6;
+				$save_arr['bx'] = $y['bx'];
+				$save_arr['qm'] = $y['qm'];
+				$save_arr['js'] = $y['js'];
+				$post['state'] = $y['state'];
+				$save_arr['print'] = $y['print'];
+				$save_arr['printtime'] = $y['printtime'];
+				$save_arr['library'] = 2;
+				$save_arr['librarytime'] = $post['librarytime'];
+				$save_arr['libraryconfirm'] = 2;
+				$save_arr['librarynot'] = '';
+
+				foreach($hb as $v){
+					$this->$fullorder_name->save($save_arr,$v['id']);
+				}
+
 				if ($this->db->trans_status() === TRUE)
 				{
 					$this->db->trans_commit();
@@ -1150,6 +1175,30 @@ class Systemfout extends Start_Controller {
 
 			}else{
 				$this->$fullorder_name->save($post,$y['id']);
+
+				//需要添加上合并订单的订单信息更新
+				$hb = $this->$fullorder_name->find_all("merge = '".$y['id']."' and id != '".$y['id']."'");
+
+				$save_arr = [];
+				$save_arr['waybill'] = $y['waybill'];
+				$save_arr['express'] = $y['express'];
+				$save_arr['printtype'] = $y['printtype'];
+				$save_arr['ioss'] = $y['ioss'];
+				$save_arr['review'] = 6;
+				$save_arr['bx'] = $y['bx'];
+				$save_arr['qm'] = $y['qm'];
+				$save_arr['js'] = $y['js'];
+				$post['state'] = $y['state'];
+				$save_arr['print'] = $y['print'];
+				$save_arr['printtime'] = $y['printtime'];
+				$save_arr['library'] = 2;
+				$save_arr['librarytime'] = $post['librarytime'];
+				$save_arr['libraryconfirm'] = 2;
+				$save_arr['librarynot'] = '';
+
+				foreach($hb as $v){
+					$this->$fullorder_name->save($save_arr,$v['id']);
+				}
 				
 				if($fullorder_name != 'fullorderxw'){
 					// if(($item['warehouse'] != 5) || ($item['warehouse'] != 7) || ($item['warehouse'] != 8) || ($item['warehouse'] != 9) ){