|
|
@@ -39,7 +39,7 @@ class RejectedImport implements ToCollection, WithHeadingRow
|
|
|
$amount = trim($row['数量']??$row['amount']??'');
|
|
|
$quality_label_name = trim($row['品质']??$row['quality_label_name']??'');
|
|
|
$remark = trim($row['备注']??$row['remark']??'');
|
|
|
- $id_owner=Session::get('jianshangIdOwner');
|
|
|
+ $owner=trim($row['货主']??$row['owner']??'');
|
|
|
|
|
|
$lastReturnNumber = Session::get('jianshangLastImportedBill');
|
|
|
if(!$logistic_number_return)$logistic_number_return=$lastReturnNumber;
|
|
|
@@ -49,10 +49,7 @@ class RejectedImport implements ToCollection, WithHeadingRow
|
|
|
if(!$logistic_name)$logistic_name=$lastlogistic_name;
|
|
|
|
|
|
|
|
|
- if(!$id_owner){
|
|
|
- $id_owner=Owner::query()->where('name','like','%笕尚%')->first()['id'];
|
|
|
- Session::put('jianshangIdOwner',$id_owner);
|
|
|
- }
|
|
|
+ $owner=Owner::query()->where('name','like',$owner.'%')->first();
|
|
|
$id_logistic_return=Logistic::query()->where('name','like',"%{$logistic_name}%")->first()['id'];
|
|
|
if(!$id_logistic_return){
|
|
|
$id_logistic_return=Logistic::query()->where('name','like',"%其它%")->first()['id'];
|
|
|
@@ -87,7 +84,7 @@ class RejectedImport implements ToCollection, WithHeadingRow
|
|
|
$bill->syncOrderIssue();
|
|
|
}else{
|
|
|
$bill=new RejectedBill([
|
|
|
- 'id_owner'=>$id_owner,
|
|
|
+ 'id_owner'=>$owner['id'],
|
|
|
'mobile_sender'=>$mobile_sender,
|
|
|
'logistic_number_return'=>$logistic_number_return,
|
|
|
'id_logistic_return'=>$id_logistic_return,
|
|
|
@@ -114,7 +111,7 @@ class RejectedImport implements ToCollection, WithHeadingRow
|
|
|
}
|
|
|
|
|
|
$lastBill = Session::get('jianshangLastImportedBill');
|
|
|
- if($lastBill&&$lastBill !=trim($logistic_number_return)){
|
|
|
+ if($owner['name']=='笕尚'&&$lastBill&&$lastBill !=trim($logistic_number_return)){
|
|
|
$this->submitToApi($bill);
|
|
|
}
|
|
|
Session::put('jianshangLastImportedLogisticName',trim($logistic_name));
|