|
@@ -170,9 +170,9 @@ class RejectedBillItemController extends Controller
|
|
|
&& !($rejectedBill['is_loaded']==1||$rejectedBill['is_loaded']===null)//并且不是已入库或无需入库
|
|
&& !($rejectedBill['is_loaded']==1||$rejectedBill['is_loaded']===null)//并且不是已入库或无需入库
|
|
|
&&config('api.api_switch_receive_to_wms')){ //并且配置开
|
|
&&config('api.api_switch_receive_to_wms')){ //并且配置开
|
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,'满足条件,准备从网页主动请求富勒入库:'.$rejectedBill['logistic_number_return'],Auth::user()['id']);
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,'满足条件,准备从网页主动请求富勒入库:'.$rejectedBill['logistic_number_return'],Auth::user()['id']);
|
|
|
- $result_transferToWms=(new InformWMSReceivedEvent($rejectedBill))->directRun(); //!!!!
|
|
|
|
|
- if($result_transferToWms=='fail')return ['success'=>'false','fail_info'=>'提交至WMS错误,请重试并通知相关人员'];
|
|
|
|
|
- if($result_transferToWms=='exception')return ['success'=>'exception','fail_info'=>'提交至WMS部分成功,存在异常情况,请留意校对'];
|
|
|
|
|
|
|
+ $result_transferToWms=(new InformWMSReceivedEvent($rejectedBill))->directRun();
|
|
|
|
|
+ if($result_transferToWms=='fail')return ['success'=>'false','fail_info'=>'提交至WMS错误,请手动校验、操作WMS并通知相关人员'];
|
|
|
|
|
+ if($result_transferToWms=='exception')return ['success'=>'exception','fail_info'=>'提交至WMS部分成功,存在异常情况,请校对WMS'];
|
|
|
$isLoaded=false;
|
|
$isLoaded=false;
|
|
|
if($isJianshang){
|
|
if($isJianshang){
|
|
|
$isLoaded=true;
|
|
$isLoaded=true;
|
|
@@ -222,7 +222,7 @@ class RejectedBillItemController extends Controller
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function sendRejectedToThirdPart2(Collection $items,$rejectedBill):bool {
|
|
|
|
|
|
|
+ public function sendRejectedToThirdPart2(Collection $items,$rejectedBill) {
|
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"进入发送方法,发送给笕尚处理,退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"进入发送方法,发送给笕尚处理,退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
|
if($rejectedBill['is_loaded']!=0){
|
|
if($rejectedBill['is_loaded']!=0){
|
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"进入发送方法,但退单已入库,跳出!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"进入发送方法,但退单已入库,跳出!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
@@ -257,12 +257,12 @@ class RejectedBillItemController extends Controller
|
|
|
|
|
|
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"标记退单和商品为待推单!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"标记退单和商品为待推单!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
|
//标记WMS所有该退单下的作废(为已上传) 。应检查这里是否正确!
|
|
//标记WMS所有该退单下的作废(为已上传) 。应检查这里是否正确!
|
|
|
- $receives=WMSReflectReceive::where('ASNREFERENCE3',$rejectedBill['logistic_number_return'])->where('is_uploaded',0)->get();
|
|
|
|
|
- $receives->each(function ($receive){
|
|
|
|
|
- $receive['is_uploaded']=1;
|
|
|
|
|
- $receive->save();
|
|
|
|
|
- });
|
|
|
|
|
- if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"标记退单在WMS映身表为已上传!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
|
|
|
|
|
+// $receives=WMSReflectReceive::where('ASNREFERENCE3',$rejectedBill['logistic_number_return'])->where('is_uploaded',0)->get();
|
|
|
|
|
+// $receives->each(function ($receive){
|
|
|
|
|
+// $receive['is_uploaded']=1;
|
|
|
|
|
+// $receive->save();
|
|
|
|
|
+// });
|
|
|
|
|
+// if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"标记退单在WMS映射表为已上传!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
|
}
|
|
}
|
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"处理完成,返回前端入库状态,标记笕尚取得结果是:{$resultStr}!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
if(config('api.jianshang_rejecteds_log_switch'))Controller::logS(__METHOD__,__FUNCTION__,"处理完成,返回前端入库状态,标记笕尚取得结果是:{$resultStr}!退单号:{$rejectedBill['logistic_number_return']}",Auth::user()['id']);
|
|
|
return $resultStr;
|
|
return $resultStr;
|