lvhao пре 14 часа
родитељ
комит
9e8f2a1e90

+ 5 - 0
core/CoreApp/controllers/Fullorder.php

@@ -52,6 +52,7 @@ class Fullorder extends Start_Controller {
 		$this->load->_model("Model_logic_ding","logic_ding");
 		$this->load->_model("Model_fullordererrors","fullordererrors");
 		$this->load->_model("Model_logic_whlabel","logic_whlabel");
+		$this->load->_model("Model_retreatlogs","retreatlogs");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -4628,6 +4629,10 @@ class Fullorder extends Start_Controller {
 			
 			if($this->fullorder->save(array('library'=>1,'librarytime'=>0,'libraryconfirm'=>2,'print'=>1,'printtime'=>0,'printnumber'=>0,'retreattime'=>0,'librarynot'=>'订单未打印,未审核或未通过','review'=>$review,'reviewtime'=>0,'state'=>207,'waybill'=>'','waybill2'=>'','waybillid'=>'','oldwaybill'=>$teset['oldwaybill'],'oldprinttime'=>$teset['oldprinttime'],'dlzemail'=>0,'yhs'=>0,'failed'=>''),$id))
         	{
+				$th_info = $this->retreatlogs->getInfoByNumber($fullorder['number']);
+				if(!empty($th_info)){
+					$this->retreatlogs->save(array('cz_time'=>time()),$th_info['id']);
+				}
          		echo json_encode(array('msg'=>'重置成功!如需再次提交,请先保存、再提交','success'=>true));exit;
        	 	}
        		else

+ 5 - 0
core/CoreApp/controllers/Fullordersmt.php

@@ -42,6 +42,7 @@ class Fullordersmt extends Start_Controller {
 		$this->load->_model('Model_returngoods','returngoods');
 		$this->load->_model("Model_logic_order","logic_order");
 		$this->load->_model("Model_fullordererrors","fullordererrors");
+		$this->load->_model("Model_retreatlogs","retreatlogs");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -3494,6 +3495,10 @@ class Fullordersmt extends Start_Controller {
 			if ($this->db->trans_status() === TRUE)
             {
 				$this->db->trans_commit();
+				$th_info = $this->retreatlogs->getInfoByNumber($fullorder['number']);
+				if(!empty($th_info)){
+					$this->retreatlogs->save(array('cz_time'=>time()),$th_info['id']);
+				}
 			    echo json_encode(array('msg'=>'重置成功','success'=>true));exit;
 			}
 			else

+ 5 - 0
core/CoreApp/controllers/Fullordertt.php

@@ -46,6 +46,7 @@ class Fullordertt extends Start_Controller {
 		$this->load->_model("Model_excelnew",'excelnew');
 		$this->load->_model("Model_fullordererrors","fullordererrors");
 		$this->load->_model("Model_express_tt","express_tt");
+		$this->load->_model("Model_retreatlogs","retreatlogs");
 	}
 	//定义方法的调用规则 获取URI第二段值
     public function _remap($arg,$arg_array)
@@ -4350,6 +4351,10 @@ class Fullordertt extends Start_Controller {
 			
 			if($this->fullordertt->save(array('library'=>1,'librarytime'=>0,'libraryconfirm'=>2,'print'=>1,'printtime'=>0,'printnumber'=>0,'retreattime'=>0,'librarynot'=>'订单未打印,未审核或未通过','review'=>$review,'reviewtime'=>0,'state'=>207,'waybill'=>'','waybill2'=>'','waybillid'=>'','oldwaybill'=>$teset['oldwaybill'],'oldprinttime'=>$teset['oldprinttime'],'dlzemail'=>0,'yhs'=>0,'failed'=>''),$id))
         	{
+				$th_info = $this->retreatlogs->getInfoByNumber($fullordertt['number']);
+				if(!empty($th_info)){
+					$this->retreatlogs->save(array('cz_time'=>time()),$th_info['id']);
+				}
          		echo json_encode(array('msg'=>'重置成功!如需再次提交,请先保存、再提交','success'=>true));exit;
        	 	}
        		else

+ 14 - 0
core/CoreApp/controllers/Systemretreat.php

@@ -28,6 +28,7 @@ class Systemretreat extends Start_Controller {
 		$this->load->_model('Model_whlabel','whlabel');
 		$this->load->_model('Model_specialstock','specialstock');
 		$this->load->_model('Model_fullorderxw','fullorderxw');
+		$this->load->_model('Model_retreatlogs','retreatlogs');
 		$this->load->helper('url');
 	}
 	//定义方法的调用规则 获取URI第二段值
@@ -147,6 +148,19 @@ class Systemretreat extends Start_Controller {
 			$this->$fullorder_name->save(array('whlabel'=>'|'.implode("|",$hbw).'|','fpdata'=>implode(";",$hbf).';'),$y['id']);
 			$user = $this->user->get_api($_SESSION['api']);
 			$this->$fullorder_name->save(array('library'=>3,'retreattime'=>$time,'retreatdata'=>$y['retreatdata'].'['.$user['userid'].':'.date('Y-m-d H:i:s',time()).':'.$this->input->ip_address().']-'),$y['id']);
+
+			$this->retreatlogs->insert([
+				'plat'=>$fullorder_name,
+				'fid'=>$y['id'],
+				'number'=>$y['number'],
+				'ck_goods'=>json_encode([
+					'whlabel'=>$y['whlabel'],
+					'fpdata'=>$y['fpdata'],
+				],JSON_UNESCAPED_UNICODE),
+				'ck_time'=>$y['librarytime'],
+				'tk_time'=>$time,
+			]);
+
 			if ($this->db->trans_status() === FALSE)
             {
 				$this->db->trans_commit();