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
b3db4df6
authored
a year ago
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化统计展示
parent
2e382534
master
…
hcy-2024.6.4-供应商列表问题
ysx-spu的redis拆库-20230705
ysx-一体化广播规则-20231120
ysx-一体化需求-20231206
ysx-专项组需求0711-20230711
ysx-京东采购员需求-20250328
ysx-低价保障-20240827
ysx-供应商入驻字段-20230914
ysx-供应商费用规则配置-20250326
ysx-供应商跟进-20231225
ysx-供应商逻辑优化-20241209
ysx-供应商需求-20230602
ysx-供应商需求-20230619
ysx-供应商需求-20241010
ysx-供应商需求0108-20240108
ysx-供应商需求0614-20230614
ysx-供应商需求0717-20230717
ysx-修改驳回供应商名称-20240129
ysx-华云改造-20240304
ysx-图片地址批量转换-20240829
ysx-备忘录-20230824
ysx-实体名单-20231026
ysx-寄售合同回传需求-20250218
ysx-寄售相关需求-20241226
ysx-履约程度需求-20250317
ysx-新增签约公司-20250214
ysx-期货有效期-20230725
ysx-测试分支
ysx-芯链子母账号-20230802
ysx-财务信息金蝶同步-20240319
ysx-采购员交接-20240417
ysx-银行信息字段修改-20240719
ysx-银行账号优化-20240617
测试pdf打印
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
b3db4df6
...
...
@@ -1217,7 +1217,7 @@ class DataService
}
else
{
$ruler
[
'upload_allow_brands'
]
=
$mainBrands
;
}
dump
(
$supplier
[
'supplier_id'
],
$ruler
);
dump
(
$supplier
[
'supplier_id'
],
$ruler
);
$redis
->
hset
(
'supplier_sku_upload_ruler_v2'
,
$supplier
[
'supplier_id'
],
json_encode
(
$ruler
));
}
}
...
...
@@ -1255,11 +1255,11 @@ class DataService
//找出哪些是云芯上传的
$yunxinUploadSupplierCodes
=
SkuUploadLogModel
::
whereIn
(
'supplier_code'
,
$yunxinSupplierCodes
)
->
where
(
'source'
,
2
)
->
pluck
(
'supplier_code'
)
->
unique
()
->
toArray
();
$skuNumYunxin
=
SupplierChannelModel
::
whereIn
(
'supplier_code'
,
$yunxinUploadSupplierCodes
)
->
sum
(
'sku_num'
);
dump
(
"上架供应商数(不含代购,原厂):"
.
$supplierCount
);
dump
(
"上架云芯供应商数:"
.
count
(
$yunxinUploadSupplierCodes
)
);
dump
(
"SKU 上架总条数(含API接口):"
.
$skuNum1
);
dump
(
"SKU上架总条数(只含云芯):"
.
$skuNumYunxin
);
dump
(
"SKU 上架条数(不含API接口):"
.
$skuNum2
);
echo
(
"<p>上架供应商数(不含代购,原厂):"
.
$supplierCount
.
'</p>'
);
echo
(
"<p>上架云芯供应商数:"
.
count
(
$yunxinUploadSupplierCodes
)
.
'</p>'
);
echo
(
"<p>SKU 上架总条数(含API接口):"
.
$skuNum1
.
'</p>'
);
echo
(
"<p>SKU上架总条数(只含云芯):"
.
$skuNumYunxin
.
'</p>'
);
echo
(
"<p>SKU 上架条数(不含API接口):"
.
$skuNum2
.
'</p>'
);
}
//获取采购系统24号作废的深圳入库明细
...
...
@@ -1359,26 +1359,26 @@ class DataService
}
}
foreach
(
$allBrandsGroupBySupplierCode
as
$supplierCode
=>
$brands
)
{
$supplier
=
SupplierChannelModel
::
select
([
'main_brands'
,
'supplier_id'
,
'supplier_code'
])
->
where
(
'supplier_code'
,
$supplierCode
)
->
first
();
$supplier
=
SupplierChannelModel
::
select
([
'main_brands'
,
'supplier_id'
,
'supplier_code'
])
->
where
(
'supplier_code'
,
$supplierCode
)
->
first
();
if
(
empty
(
$supplier
))
{
continue
;
}
$supplier
=
$supplier
->
toArray
();
$supplier
[
'main_brands'
]
=
trim
(
$supplier
[
'main_brands'
],
','
);
dump
(
'供应商编码 : '
.
$supplierCode
);
dump
(
'供应商编码 : '
.
$supplierCode
);
//找出所有标品的id
$standardBrandIds
=
StandardBrandModel
::
whereIn
(
'brand_name'
,
$brands
)
->
pluck
(
'standard_brand_id'
)
->
toArray
();
dump
(
'excel得出的标品ids : '
.
implode
(
','
,
$standardBrandIds
));
dump
(
'excel得出的标品ids : '
.
implode
(
','
,
$standardBrandIds
));
if
(
$supplier
[
'main_brands'
])
{
dump
(
'原来有标品id :'
.
$supplier
[
'main_brands'
]);
dump
(
'原来有标品id :'
.
$supplier
[
'main_brands'
]);
$supplier
[
'main_brands'
]
=
explode
(
','
,
$supplier
[
'main_brands'
]);
$mainBrands
=
array_merge
(
$supplier
[
'main_brands'
],
$standardBrandIds
);
$mainBrands
=
array_merge
(
$supplier
[
'main_brands'
],
$standardBrandIds
);
}
else
{
$mainBrands
=
$standardBrandIds
;
}
$mainBrands
=
implode
(
','
,
$mainBrands
);
if
(
$isUpdate
)
{
SupplierChannelModel
::
where
(
'supplier_code'
,
$supplierCode
)
->
update
([
SupplierChannelModel
::
where
(
'supplier_code'
,
$supplierCode
)
->
update
([
'main_brands'
=>
$mainBrands
,
]);
}
...
...
This diff is collapsed.
Click to expand it.
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