Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0a59fc67
authored
Aug 06, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善逻辑
parent
73ffd048
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
app/Http/Services/SyncSupplierService.php
app/Http/Services/SyncSupplierService.php
View file @
0a59fc67
...
...
@@ -6,19 +6,20 @@ namespace App\Http\Services;
//后台用户相关信息服务
use
App\Model\LogModel
;
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\SupplierAttachmentsModel
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierContactModel
;
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
PhpAmqpLib\Connection\AMQPStreamConnection
;
use
PhpAmqpLib\Message\AMQPMessage
;
use
App\Model\SupplierAttachmentsModel
;
use
http\Exception\InvalidArgumentException
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
class
SyncSupplierService
{
...
...
@@ -84,6 +85,12 @@ class SyncSupplierService
if
(
!
empty
(
$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'
])
->
where
(
'is_type'
,
0
)
->
where
(
'group_code'
,
'!='
,
''
)
->
pluck
(
'supplier_id'
)
->
toArray
();
...
...
@@ -105,6 +112,7 @@ class SyncSupplierService
'recid'
=>
$receipt
[
'receipt_id'
],
'intermediaryBank'
=>
$receipt
[
'intermediary_bank'
],
'remark'
=>
$receipt
[
'remark'
],
'country_isocode'
=>
$receipt
[
'nation'
][
'international_code'
],
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment