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
d4aa445f
authored
May 23, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
重新统计
parent
878ddf0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
d4aa445f
...
@@ -1144,7 +1144,7 @@ class DataService
...
@@ -1144,7 +1144,7 @@ class DataService
//获取非原厂,非api对接的,有sku的正式供应商列表
//获取非原厂,非api对接的,有sku的正式供应商列表
public
function
getOffShelfSupplierList
()
public
function
getOffShelfSupplierList
()
{
{
$suppliers
=
SupplierChannelModel
::
where
(
'sku_num'
,
'>'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
$suppliers
=
SupplierChannelModel
::
where
(
'sku_num'
,
'>'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
where
(
'is_type'
,
0
)
->
get
()
->
toArray
();
->
where
(
'is_type'
,
0
)
->
get
()
->
toArray
();
$supplierList
=
[];
$supplierList
=
[];
foreach
(
$suppliers
as
$supplier
)
{
foreach
(
$suppliers
as
$supplier
)
{
...
@@ -1157,7 +1157,7 @@ class DataService
...
@@ -1157,7 +1157,7 @@ class DataService
echo
json_encode
(
$supplierList
);
echo
json_encode
(
$supplierList
);
}
}
//获取上传了平台合作协议的供应商
//获取上传了平台合作协议的供应商
public
function
exportHasCooperationAgreementSupplierList
()
public
function
exportHasCooperationAgreementSupplierList
()
{
{
...
@@ -1197,11 +1197,15 @@ class DataService
...
@@ -1197,11 +1197,15 @@ class DataService
public
function
statisticsSkuNumber
()
public
function
statisticsSkuNumber
()
{
{
$dataManagerSupplierCodeList
=
DataManageModel
::
where
(
'is_type'
,
0
)
->
where
(
'canal'
,
'!='
,
''
)
->
pluck
(
'canal'
)
->
toArray
();
$dataManagerSupplierCodeList
=
DataManageModel
::
where
(
'is_type'
,
0
)
->
where
(
'canal'
,
'!='
,
''
)
->
pluck
(
'canal'
)
->
toArray
();
//sku上架总数含api接口
//sku上架总数含api接口
$skuNum1
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
sum
(
'sku_num'
);
$skuNum1
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
)
)
->
sum
(
'sku_num'
);
//sku上架总数,不含api接口
//sku上架总数,不含api接口
$skuNum2
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
whereNotIn
(
'supplier_code'
,
$dataManagerSupplierCodeList
)
->
sum
(
'sku_num'
);
$skuNum2
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
whereNotIn
(
'supplier_code'
,
$dataManagerSupplierCodeList
)
->
sum
(
'sku_num'
);
dd
(
$skuNum1
,
$skuNum2
);
//有上架sku的供应商
$supplierCount
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
where
(
'sku_num'
,
'>'
,
0
)
->
count
();
dump
(
"上架供应商数(不含代购,原厂):"
.
$supplierCount
);
dump
(
"SKU 上架总条数(含API接口):"
.
$skuNum1
);
dump
(
"SKU 上架条数(不含API接口):"
.
$skuNum2
);
}
}
}
}
\ No newline at end of file
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