Browse Source

修改tt的退货回调信息处理的问题

lvhao 1 tuần trước cách đây
mục cha
commit
74c31bca3c
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      core/CoreApp/controllers/Apitt.php

+ 7 - 2
core/CoreApp/controllers/Apitt.php

@@ -1229,7 +1229,7 @@ $j = json_decode($j, true);
 				{
 
 					//reverse_event_type
-					if(isset($j['data'])){
+					if(isset($j['data']) && $d['state'] != 214){
 						if($j['data']['reverse_event_type'] == 'ORDER_RETURN'){
 							if($d['library'] == 1){
 								$whlabel = $this->whlabel->find_all("zd = '".$d['number']."'");
@@ -1237,8 +1237,13 @@ $j = json_decode($j, true);
 								   {
 									$this->whlabel->save(array('zd'=>''),$v['id']);
 								}
+								$this->fullordertt->save(array('state'=>214,'whlabel'=>$d['whlabel'],'fpdata'=>$d['fpdata']),$d['id']);
+							}else if($d['library'] == 2){ //如果是已出库的 按晶晶的意思就先只执行24出库时间为24小时内的 添加进入异常列表
+								if($d['librarytime'] > time()-24*3600){
+									$this->fullordertt->save(array('state'=>214,'whlabel'=>$d['whlabel'],'fpdata'=>$d['fpdata']),$d['id']);
+								}
 							}
-							$this->fullordertt->save(array('state'=>214,'whlabel'=>$d['whlabel'],'fpdata'=>$d['fpdata']),$d['id']);
+							
 						}
 
 					}