|
|
@@ -35,8 +35,11 @@ class ProcurementConfirmInform implements ShouldQueue
|
|
|
public function handle()
|
|
|
{
|
|
|
$pro=$this->procurement->loadMissing(['ownerMaterial.material.supplier.user.userDetail','ownerMaterial.owner.customer']);
|
|
|
- if (empty($pro->ownerMaterial->material->supplier))return;
|
|
|
- $suppliers=$pro->ownerMaterial->material->supplier;
|
|
|
+ $suppliers=$pro->ownerMaterial->material->supplier ?? false;
|
|
|
+ if(!$suppliers){
|
|
|
+ LogService::log(__METHOD__,"suppliers not find ",json_encode($this->procurement['id']));
|
|
|
+ return ;
|
|
|
+ }
|
|
|
LogService::log(__METHOD__,"采购单耗材关联供应商1",json_encode($suppliers));
|
|
|
$open_ids=[];
|
|
|
foreach ($suppliers as $supplier) {
|