Commit 0a59fc67 by 杨树贤

完善逻辑

parent 73ffd048
Showing with 15 additions and 7 deletions
...@@ -6,19 +6,20 @@ namespace App\Http\Services; ...@@ -6,19 +6,20 @@ namespace App\Http\Services;
//后台用户相关信息服务 //后台用户相关信息服务
use App\Model\LogModel; use App\Model\LogModel;
use App\Model\RedisModel; use App\Model\RedisModel;
use App\Model\NationModel;
use Illuminate\Support\Arr;
use App\Model\UserInfoModel;
use App\Model\SupplierSyncModel;
use Illuminate\Support\Facades\DB;
use App\Model\SupplierAccountModel; use App\Model\SupplierAccountModel;
use App\Model\SupplierAttachmentsModel;
use App\Model\SupplierChannelModel; use App\Model\SupplierChannelModel;
use App\Model\SupplierContactModel; use App\Model\SupplierContactModel;
use App\Model\SupplierReceiptModel; use App\Model\SupplierReceiptModel;
use App\Model\SupplierSyncModel;
use App\Model\UserInfoModel;
use http\Exception\InvalidArgumentException;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage; use PhpAmqpLib\Message\AMQPMessage;
use App\Model\SupplierAttachmentsModel;
use http\Exception\InvalidArgumentException;
use PhpAmqpLib\Connection\AMQPStreamConnection;
class SyncSupplierService class SyncSupplierService
{ {
...@@ -84,6 +85,12 @@ class SyncSupplierService ...@@ -84,6 +85,12 @@ class SyncSupplierService
if (!empty($supplier['currency'])) { if (!empty($supplier['currency'])) {
$message['currencyNumber'] = array_get(config('sync.SyncCurrencyType'), $supplier['currency']); $message['currencyNumber'] = array_get(config('sync.SyncCurrencyType'), $supplier['currency']);
} }
if (!empty($supplier['nation_id'])) {
$countryIsocode = NationModel::where('nation_id', $supplier['nation_id'])->value('international_code');
$message['country_isocode'] = $countryIsocode;
}
$supplierIds = SupplierChannelModel::where('supplier_name', $supplier['supplier_name']) $supplierIds = SupplierChannelModel::where('supplier_name', $supplier['supplier_name'])
->where('is_type', 0)->where('group_code', '!=', '') ->where('is_type', 0)->where('group_code', '!=', '')
->pluck('supplier_id')->toArray(); ->pluck('supplier_id')->toArray();
...@@ -105,6 +112,7 @@ class SyncSupplierService ...@@ -105,6 +112,7 @@ class SyncSupplierService
'recid' => $receipt['receipt_id'], 'recid' => $receipt['receipt_id'],
'intermediaryBank' => $receipt['intermediary_bank'], 'intermediaryBank' => $receipt['intermediary_bank'],
'remark' => $receipt['remark'], 'remark' => $receipt['remark'],
'country_isocode' => $receipt['nation']['international_code'],
]; ];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment