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
d28c0603
authored
Jun 15, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改统计
parent
7f2699d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
d28c0603
...
...
@@ -145,7 +145,7 @@ class DataService
echo
"-------------------------"
.
PHP_EOL
;
//然后随机取出
云芯
的供应商(1139)
//然后随机取出
芯链
的供应商(1139)
//先剔除api对接的供应商
$ycYunxinTypeCount
=
113
;
$dlsYunxinTypeCount
=
302
;
...
...
@@ -223,7 +223,7 @@ class DataService
]);
}
//处理
云芯
接入的不同类型的数据
//处理
芯链
接入的不同类型的数据
public
function
dealYunxinSupplier
(
$supplierGroup
,
$totalYunxinCount
)
{
...
...
@@ -241,7 +241,7 @@ class DataService
array_flip
(
is_array
(
$rand
)
?
$rand
:
[
$rand
]));
$yunxinSupplierIds
=
array_column
(
$yunxinSuppliers
,
'supplier_id'
);
echo
"供应商性质为 :
$supplierGroup
的供应商修改
云芯
上传类型数量 : "
.
count
(
array_unique
(
$yunxinSupplierIds
))
.
PHP_EOL
;
echo
"供应商性质为 :
$supplierGroup
的供应商修改
芯链
上传类型数量 : "
.
count
(
array_unique
(
$yunxinSupplierIds
))
.
PHP_EOL
;
// foreach ($yunxinSupplierIds as $supplierId) {
// SupplierChannelModel::where('supplier_id', $supplierId)->update([
...
...
@@ -352,7 +352,7 @@ class DataService
}
}
//生成
云芯
账号
//生成
芯链
账号
public
function
generateYunxinAccount
(
$isUpdate
=
false
)
{
ini_set
(
'memory_limit'
,
-
1
);
...
...
@@ -380,7 +380,7 @@ class DataService
}
}
//处理
云芯
账号的创建时间
//处理
芯链
账号的创建时间
public
function
dealYunxinAccountCreateTime
()
{
$preYearTimestamp
=
time
()
-
24
*
3600
*
252
*
1
;
...
...
@@ -482,7 +482,7 @@ class DataService
'等级'
,
'品质协议是否签署'
,
'是否平台供应商'
,
'是否
云芯
商家'
,
'是否
芯链
商家'
,
'是否SKU上架中'
,
'现有SKU采购员或者意向分配采购员'
,
'采购所在采购部门'
,
...
...
@@ -503,7 +503,7 @@ class DataService
$isYunxin
=
'否'
;
if
(
$supplier
[
'stockup_type'
])
{
if
(
strpos
(
$supplier
[
'stockup_type'
],
"5"
)
!==
false
)
{
dump
(
"是
云芯
"
);
dump
(
"是
芯链
"
);
$isYunxin
=
'是'
;
}
}
...
...
@@ -1243,22 +1243,37 @@ class DataService
public
function
statisticsSkuNumber
()
{
$excludeSupplierCodeList
=
[
'L0004938'
,
'L0007913'
,
'L0011546'
,
'L0001175'
,
'L0007243'
,
'L0015040'
,
];
$dataManagerSupplierCodeList
=
DataManageModel
::
where
(
'is_type'
,
0
)
->
where
(
'canal'
,
'!='
,
''
)
->
pluck
(
'canal'
)
->
toArray
();
$excludeSupplierCodeList
=
array_merge
(
$excludeSupplierCodeList
,
$dataManagerSupplierCodeList
);
//sku上架总数含api接口
$skuNum1
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
sum
(
'sku_num'
);
$skuNum1
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
whereNotIn
(
'supplier_code'
,
$excludeSupplierCodeList
)
->
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'
);
$skuNum2
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
whereNotIn
(
'supplier_code'
,
$excludeSupplierCodeList
)
->
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
();
$yunxinSupplierCodes
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'stockup_type'
,
'like'
,
'%5%'
)
->
where
(
'sku_num'
,
'>'
,
0
)
->
pluck
(
'supplier_code'
);
//找出哪些是云芯上传的
$supplierCount
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'supplier_group'
,
'!='
,
4
)
->
whereNotIn
(
'supplier_name'
,
config
(
'field.SkipChangeSupplierTypeNames'
))
->
whereNotIn
(
'supplier_code'
,
$excludeSupplierCodeList
)
->
where
(
'sku_num'
,
'>'
,
0
)
->
count
();
//云芯供应商编码
$yunxinSupplierCodes
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
where
(
'stockup_type'
,
'like'
,
'%5%'
)
->
where
(
'sku_num'
,
'>'
,
0
)
->
pluck
(
'supplier_code'
)
->
toArray
();
//找出哪些是芯链上传的
$yunxinUploadSupplierCodes
=
SkuUploadLogModel
::
whereIn
(
'supplier_code'
,
$yunxinSupplierCodes
)
->
where
(
'source'
,
2
)
->
pluck
(
'supplier_code'
)
->
unique
()
->
toArray
();
$skuNumYunxin
=
SupplierChannelModel
::
whereIn
(
'supplier_code'
,
$yunxinUploadSupplierCodes
)
->
sum
(
'sku_num'
);
echo
(
"<p>上架供应商数(不含代购,原厂):"
.
$supplierCount
.
'</p>'
);
echo
(
"<p>上架
云芯
供应商数:"
.
count
(
$yunxinUploadSupplierCodes
)
.
'</p>'
);
echo
(
"<p>上架
芯链
供应商数:"
.
count
(
$yunxinUploadSupplierCodes
)
.
'</p>'
);
echo
(
"<p>SKU 上架总条数(含API接口):"
.
$skuNum1
.
'</p>'
);
echo
(
"<p>SKU上架总条数(只含
云芯
):"
.
$skuNumYunxin
.
'</p>'
);
echo
(
"<p>SKU上架总条数(只含
芯链
):"
.
$skuNumYunxin
.
'</p>'
);
echo
(
"<p>SKU 上架条数(不含API接口):"
.
$skuNum2
.
'</p>'
);
}
...
...
@@ -1294,7 +1309,7 @@ class DataService
'供应商性质'
,
'供应商编码'
,
'供应商名称'
,
'是否开通
云芯
'
,
'是否开通
芯链
'
,
'接入方式'
,
'sku上架数量'
,
'末次更新时间'
...
...
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