Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
data-center-auto
Commits
e798bf9c
Commit
e798bf9c
authored
Mar 23, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增库存可卖天数,库存可卖日期,可用+在途 可卖天数,可用+在途可卖日期
parent
7bf8600c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
5 deletions
+71
-5
dc_auto_turnover.cs
AutoTurnOver.Models/dc_auto_turnover.cs
+64
-4
SkuAutoTurnServices.cs
AutoTurnOver.Services/SkuAutoTurnServices.cs
+7
-1
No files found.
AutoTurnOver.Models/dc_auto_turnover.cs
View file @
e798bf9c
...
...
@@ -587,7 +587,7 @@ namespace AutoTurnOver.Models
public
decimal
history_thirtyday_sales_walmart
{
get
;
set
;
}
}
public
class
ana_search_dto
:
Condition_AutoTurnOver
public
class
ana_search_dto
:
Condition_AutoTurnOver
{
[
Description
(
"页码"
)]
public
int
page
{
get
;
set
;
}
...
...
@@ -804,15 +804,75 @@ namespace AutoTurnOver.Models
public
class
dc_auto_turnover_list_dto
{
/// <summary>
/// 预测日均销量
/// </summary>
public
decimal
forecast_average_day
{
get
{
return
turnover_days
<=
0
?
0
:
Math
.
Round
(
turnover_sales
/
turnover_days
,
2
);
}
}
/// <summary>
/// 库存可卖天数
/// </summary>
public
int
stock_use_days
{
get
{
return
forecast_average_day
<=
0
?
0
:
(
int
)
Math
.
Ceiling
((
usable_stock
??
0
)
/
forecast_average_day
);
}
}
/// <summary>
/// 库存可买日期
/// </summary>
public
DateTime
stock_use_date
{
get
{
return
gmt_modified
.
AddDays
(
stock_use_days
);
}
}
public
int
full_stock
{
get
{
return
(
int
)(
Math
.
Ceiling
((
usable_stock
??
0
)
+
quantity_transfer
+
quantity_purchase
));
}
}
/// <summary>
/// 库存+在途可卖天数
/// </summary>
public
int
full_stock_use_days
{
get
{
return
forecast_average_day
<=
0
?
0
:
(
int
)
Math
.
Ceiling
(
full_stock
/
forecast_average_day
);
}
}
/// <summary>
/// 库存+在途可买日期
/// </summary>
public
DateTime
full_stock_use_date
{
get
{
return
gmt_modified
.
AddDays
(
full_stock_use_days
);
}
}
private
decimal
?
_storage_capacity_lack_quantity
;
public
decimal
?
storage_capacity
{
get
;
set
;
}
/// <summary>
/// 库容缺少值
/// </summary>
public
decimal
?
storage_capacity_lack_quantity
{
get
{
public
decimal
?
storage_capacity_lack_quantity
{
get
{
if
(
_storage_capacity_lack_quantity
==
null
)
return
null
;
return
Math
.
Max
(
0
,
_storage_capacity_lack_quantity
.
Value
);
}
set
{
_storage_capacity_lack_quantity
=
value
;
}
}
}
set
{
_storage_capacity_lack_quantity
=
value
;
}
}
/// <summary>
/// Walmart 过去7日销量(日均)
/// </summary>
...
...
@@ -883,7 +943,7 @@ namespace AutoTurnOver.Models
public
DateTime
?
first_inbound_date
{
get
;
set
;
}
public
int
quantity_ocean_purchase
{
get
;
set
;
}
public
int
quantity_air_purchase
{
get
;
set
;
}
public
int
quantity_railway_purchase
{
get
;
set
;
}
public
int
quantity_railway_purchase
{
get
;
set
;
}
public
int
quantity_land_transfer
{
get
;
set
;
}
public
int
quantity_ocean_transfer
{
get
;
set
;
}
public
int
quantity_air_transfer
{
get
;
set
;
}
...
...
AutoTurnOver.Services/SkuAutoTurnServices.cs
View file @
e798bf9c
...
...
@@ -320,7 +320,8 @@ namespace AutoTurnOver.Services
,
"调拨陆运在途数量"
,
"调拨海运在途数量"
,
"调拨空运在途数量"
,
"调拨铁路在途数量"
,
"首次入库时间"
,
"供应链累计销量"
,
"销量预测规则"
,
"默认头程运输方式"
,
"默认头程渠道"
,
"计算时间"
,
"日均出单次数"
,
"首次出单日期"
,
"首次出单订单号"
,
"备货数量"
,
"产品类型"
,
"头程平均值取值来源"
,
"Walmart最近7天日均销量"
,
"Walmart最近14天日均销量"
,
"Walmart最近30天日均销量"
,
"平均交期"
,
"配置交期"
,
"库容缺少值"
,
"可用库容"
"平均交期"
,
"配置交期"
,
"库容缺少值"
,
"可用库容"
,
"库存可用天数"
,
"库存可用日期"
,
"库存+在途可用天数"
,
"库存+在途可用日期"
,
};
foreach
(
var
item
in
cols
)
{
...
...
@@ -330,6 +331,11 @@ namespace AutoTurnOver.Services
foreach
(
var
itemData
in
list
)
{
DataRow
row
=
table
.
NewRow
();
row
[
"库存可用天数"
]
=
itemData
.
stock_use_days
;
row
[
"库存可用日期"
]
=
itemData
.
stock_use_date
.
ToString
(
"yyyy-MM-dd"
);
row
[
"库存+在途可用天数"
]
=
itemData
.
full_stock_use_days
;
row
[
"库存+在途可用日期"
]
=
itemData
.
full_stock_use_date
.
ToString
(
"yyyy-MM-dd"
);
row
[
"可用库容"
]
=
itemData
.
storage_capacity
;
row
[
"库容缺少值"
]
=
itemData
.
storage_capacity_lack_quantity
;
row
[
"平均交期"
]
=
itemData
.
supplier_delivery
;
...
...
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