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
aa0e3662
authored
May 31, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
再次修改yunxin统计
parent
20422f3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
aa0e3662
...
...
@@ -1244,14 +1244,17 @@ class DataService
$dataManagerSupplierCodeList
=
DataManageModel
::
where
(
'is_type'
,
0
)
->
where
(
'canal'
,
'!='
,
''
)
->
pluck
(
'canal'
)
->
toArray
();
//sku上架总数含api接口
$skuNum1
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
sum
(
'sku_num'
);
$skuNumYunxin
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'stockup_type'
,
'like'
,
'%5%'
)
->
sum
(
'sku_num'
);
//sku上架总数,不含api接口
$skuNum2
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
whereNotIn
(
'supplier_code'
,
$dataManagerSupplierCodeList
)
->
sum
(
'sku_num'
);
//有上架sku的供应商
$supplierCount
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
where
(
'sku_num'
,
'>'
,
0
)
->
count
();
$supplierYunxinCount
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'stockup_type'
,
'like'
,
'%5%'
)
->
where
(
'sku_num'
,
'>'
,
0
)
->
count
();
$yunxinSupplierCodes
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'stockup_type'
,
'like'
,
'%5%'
)
->
where
(
'sku_num'
,
'>'
,
0
)
->
pluck
(
'supplier_code'
);
//找出哪些是云芯上传的
$yunxinUploadSupplierCodes
=
SkuUploadLogModel
::
whereIn
(
'supplier_code'
,
$yunxinSupplierCodes
)
->
pluck
(
'supplier_code'
)
->
groupBy
(
'supplier_code'
)
->
where
(
'source'
,
2
)
->
toArray
();
$skuNumYunxin
=
SupplierChannelModel
::
whereIn
(
'supplier_code'
,
$yunxinUploadSupplierCodes
)
->
sum
(
'sku_num'
);
dump
(
"上架供应商数(不含代购,原厂):"
.
$supplierCount
);
dump
(
"上架云芯供应商数:"
.
$supplierYunxinCount
);
dump
(
"上架云芯供应商数:"
.
count
(
$yunxinUploadSupplierCodes
)
);
dump
(
"SKU 上架总条数(含API接口):"
.
$skuNum1
);
dump
(
"SKU上架总条数(只含云芯):"
.
$skuNumYunxin
);
dump
(
"SKU 上架条数(不含API接口):"
.
$skuNum2
);
...
...
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