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
47a9a88e
authored
Sep 22, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
同步供应商银行信息
parent
67ece528
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
app/Http/Services/SyncSupplierService.php
app/Http/routes.php
app/Http/Services/SyncSupplierService.php
View file @
47a9a88e
...
...
@@ -8,6 +8,7 @@ use App\Model\RedisModel;
use
App\Model\SupplierAttachmentsModel
;
use
App\Model\SupplierChannelModel
;
use
App\Model\SupplierContactModel
;
use
App\Model\SupplierReceiptModel
;
use
App\Model\SupplierSyncModel
;
use
Illuminate\Support\Arr
;
use
Illuminate\Support\Facades\DB
;
...
...
@@ -78,6 +79,21 @@ class SyncSupplierService
if
(
!
empty
(
$supplier
[
'currency'
]))
{
$message
[
'currencyNumber'
]
=
array_get
(
config
(
'sync.SyncCurrencyType'
),
$supplier
[
'currency'
]);
}
//银行信息
$receipts
=
SupplierReceiptModel
::
where
(
'supplier_id'
,
$supplierId
)
->
where
(
'bank_name'
,
'!='
,
''
)
->
where
(
'account_no'
,
'!='
,
''
)
->
get
()
->
toArray
();
if
(
!
empty
(
$receipts
))
{
$message
[
'bankinfo'
]
=
[];
foreach
(
$receipts
as
$receipt
)
{
$message
[
'bankinfo'
][]
=
[
"bank"
=>
$receipt
[
'bank_adderss'
],
'bankaccount'
=>
$receipt
[
'account_no'
],
];
}
}
//dd($message);
$conn
=
new
AMQPStreamConnection
(
config
(
'database.connections.rabbitmq.host'
),
config
(
'database.connections.rabbitmq.port'
),
config
(
'database.connections.rabbitmq.login'
),
...
...
@@ -194,4 +210,4 @@ class SyncSupplierService
}
}
}
\ No newline at end of file
}
app/Http/routes.php
View file @
47a9a88e
...
...
@@ -82,7 +82,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\
DataService
())
->
initCouponTime
(
);
(
new
\App\Http\Services\
SyncSupplierService
())
->
syncSupplierToErp
(
12405
);
// $data = [
// 'supplier_code' => 'L0015420',
// 'brand_id' => 0,
...
...
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