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
1d651642
authored
Jun 01, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改限制
parent
37d4da9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
app/Http/Controllers/Api/SkuApiController.php
app/Http/Services/DataService.php
app/Http/Controllers/Api/SkuApiController.php
View file @
1d651642
...
...
@@ -196,9 +196,9 @@ class SkuApiController extends Controller
if
(
!
$setType
)
{
$this
->
response
(
-
1
,
'请选择设置类型'
);
}
if
(
$setType
==
1
&&
empty
(
$supplierGroup
))
{
$this
->
response
(
-
1
,
'批量设置必须选择对应的供应商性质'
);
}
//
if ($setType == 1 && empty($supplierGroup)) {
//
$this->response(-1, '批量设置必须选择对应的供应商性质');
//
}
if
(
$setType
==
2
&&
empty
(
$supplierCode
))
{
$this
->
response
(
-
2
,
'单个设置必须选择对应的供应商编码'
);
}
...
...
app/Http/Services/DataService.php
View file @
1d651642
...
...
@@ -1251,7 +1251,7 @@ class DataService
$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'
);
//找出哪些是云芯上传的
$yunxinUploadSupplierCodes
=
SkuUploadLogModel
::
whereIn
(
'supplier_code'
,
$yunxinSupplierCodes
)
->
where
(
'source'
,
2
)
->
pluck
(
'supplier_code'
)
->
groupBy
(
'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'
);
dump
(
"上架供应商数(不含代购,原厂):"
.
$supplierCount
);
dump
(
"上架云芯供应商数:"
.
count
(
$yunxinUploadSupplierCodes
));
...
...
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