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
237c0daf
authored
Dec 18, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
数据处理和对应关系变更
parent
1d1157cf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
11 deletions
app/Console/Commands/SetSupplierFollowUp.php
app/Http/Services/DataService.php
app/Http/Services/SupplierService.php
app/Http/routes.php
config/fixed.php
vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeries.php
app/Console/Commands/SetSupplierFollowUp.php
View file @
237c0daf
...
...
@@ -17,7 +17,7 @@ class SetSupplierFollowUp extends Command
*
* @var string
*/
protected
$signature
=
'
set_supplier_follow_up
'
;
protected
$signature
=
'
data_handle
'
;
/**
* The console command description.
...
...
@@ -36,6 +36,6 @@ class SetSupplierFollowUp extends Command
//DealImageService::dealNewsImage();
//DealImageService::dealNewsImage();
//DealImageService::dealSkuDetailAndImage();
SupplierAccountService
::
initYunxinAccountNa
me
();
DataService
::
reInitSupplierCpTi
me
();
}
}
app/Http/Services/DataService.php
View file @
237c0daf
...
...
@@ -898,4 +898,21 @@ class DataService
{
SupplierChannelModel
::
where
(
'supplier_code'
,
'L0005670'
)
->
update
([
'group_code'
=>
'G003815'
]);
}
//重新初始化供应商的有效时间
public
static
function
reInitSupplierCpTime
()
{
$supplierList
=
SupplierChannelModel
::
select
([
'supplier_id'
,
'supplier_code'
])
->
get
();
foreach
(
$supplierList
as
$supplier
)
{
$supplierId
=
$supplier
->
supplier_id
;
$supplierCode
=
$supplier
->
supplier_code
;
//重新初始化供应商的有效时间
(
new
SupplierService
())
->
initialCpTimeDays
(
$supplierId
,
$supplierCode
);
\dump
(
'重新初始化供应商有效时间:'
.
$supplierId
.
' '
.
$supplierCode
);
}
}
}
app/Http/Services/SupplierService.php
View file @
237c0daf
...
...
@@ -502,15 +502,22 @@ class SupplierService
//初始化过期天数限制
public
function
initialCpTimeDays
(
$supplierId
,
$supplierGroup
)
{
$cpTimeDay
=
7
;
$futuresCpTimeDay
=
365
;
// 根据供应商性质设置商品有效期
// 原厂:现货180天,期货180天
// 非原厂:现货7天,期货30天
if
(
$supplierGroup
==
SupplierChannelModel
::
SUPPLIER_GROUP_ORIGINAL
)
{
$futuresCpTimeDay
=
$cpTimeDay
=
-
1
;
$cpTimeDay
=
180
;
$futuresCpTimeDay
=
180
;
}
else
{
$cpTimeDay
=
7
;
$futuresCpTimeDay
=
30
;
}
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'cp_time_day'
=>
$cpTimeDay
,
'futures_cp_time_day'
=>
$futuresCpTimeDay
,
]);
$redis
=
new
RedisModel
();
$ruler
=
$redis
->
hget
(
'supplier_sku_upload_ruler_v2'
,
$supplierId
);
if
(
$ruler
)
{
...
...
app/Http/routes.php
View file @
237c0daf
...
...
@@ -96,7 +96,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
DataService
::
updateGroupCod
e
();
DataService
::
reInitSupplierCpTim
e
();
// DataService::initSupplierReceiptNationId();
// SupplierAccountService::initYunxinAccountName();
// DataService::syncSupplierToErp();
...
...
config/fixed.php
View file @
237c0daf
...
...
@@ -49,12 +49,12 @@ return [
//所在区域对应的默认签约公司id
'RegionSignComMap'
=>
[
2
=>
1
,
3
=>
1
,
6
=>
1
,
4
=>
116
,
1
=>
105
,
2
=>
105
,
3
=>
105
,
4
=>
2
,
6
=>
105
,
5
=>
105
,
5
=>
''
,
],
//1 是否接口对接
...
...
vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeries.php
View file @
237c0daf
...
...
@@ -25,6 +25,8 @@
* @version ##VERSION##, ##DATE##
*/
use
App\Http\Services\SupplierService
;
use
App\Model\SupplierChannelModel
;
/**
* PHPExcel_Chart_DataSeries
...
...
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