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
e6777273
authored
May 29, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
修复冲突
parents
c8df72e5
111b4b5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
app/Http/Services/DataService.php
app/Http/Services/SyncSupplierService.php
app/Http/routes.php
app/Http/Services/DataService.php
View file @
e6777273
...
...
@@ -1262,7 +1262,7 @@ class DataService
$first
=
$stockInItem
[
'stock_in_item_id'
];
dd
(
$first
,
$stockInItem
[
'stock_in_id'
]);
StockInItemModel
::
where
(
'stock_in_item_id'
,
$first
)
->
update
([
'item_status'
=>
1
'item_status'
=>
1
``
]);
StockInModel
::
where
(
'stock_in_id'
,
$stockInItem
[
'stock_in_id'
])
->
update
([
'erp_stock_in_sn'
=>
''
,
...
...
@@ -1271,4 +1271,9 @@ class DataService
}
dd
(
count
((
array_column
(
$stockInItems
,
'stock_in_item_id'
))));
}
public
function
deleteSupplierAccount
()
{
SupplierAccountModel
::
where
(
'id'
,
54
)
->
delete
();
}
}
\ No newline at end of file
app/Http/Services/SyncSupplierService.php
View file @
e6777273
...
...
@@ -49,7 +49,7 @@ class SyncSupplierService
}
$contactModel
=
new
SupplierContactModel
();
$contact
=
$contactModel
->
where
(
'supplier_id'
,
$supplier
[
'supplier_id'
])
->
orderBy
(
'contact_id'
,
'asc'
)
->
first
();
$purchases
=
$this
->
get
Purchases
(
$supplier
[
'channel_uid'
]);
$purchases
=
$this
->
get
UserCodeSn
(
$supplier
[
'channel_uid'
]);
$message
=
[
'name'
=>
$supplier
[
'supplier_name'
],
'PTID'
=>
$supplier
[
'supplier_code'
],
...
...
@@ -92,14 +92,14 @@ class SyncSupplierService
}
//获取采购人员列表
private
function
get
Purchases
(
$purchaseUid
)
private
function
get
UserCodeSn
(
$purchaseUid
)
{
$purchaseUid
=
explode
(
','
,
$purchaseUid
);
if
(
empty
(
$purchaseUid
))
{
return
[];
}
$adminIds
=
DB
::
connection
()
->
table
(
'lie_intracode'
)
->
whereIn
(
'code_id'
,
$purchaseUid
)
->
pluck
(
'admin_id'
);
return
DB
::
connection
()
->
table
(
'user_info'
)
->
whereIn
(
'userId'
,
$adminIds
)
->
pluck
(
'
name
'
);
return
DB
::
connection
()
->
table
(
'user_info'
)
->
whereIn
(
'userId'
,
$adminIds
)
->
pluck
(
'
code_sn
'
);
}
/**
...
...
app/Http/routes.php
View file @
e6777273
...
...
@@ -67,7 +67,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
// (new \App\Http\Services\DataService())->initialMainBrandsLimi
t();
(
new
\App\Http\Services\DataService
())
->
deleteSupplierAccoun
t
();
// \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([
// 'status' => 2,
// 'update_time' => time(),
...
...
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