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
5bbca2ed
Commit
5bbca2ed
authored
Mar 22, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出新增可用库容字段
parent
5a2043cc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+7
-5
dc_auto_turnover.cs
AutoTurnOver.Models/dc_auto_turnover.cs
+5
-3
SkuAutoTurnServices.cs
AutoTurnOver.Services/SkuAutoTurnServices.cs
+2
-1
No files found.
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
5bbca2ed
...
...
@@ -77,7 +77,8 @@ t13.quantity_transfer_temp_schedule as 'quantity_transfer_temp_schedule',
t13.quantity_transfer_temporary_storage as 'quantity_transfer_temporary_storage',
(case when t3.hq_type='国内仓' then t4.supplier_delivery else t4.transfer_delivery end ) as 'supplier_delivery_config',
dat.quantity_final_advise - t17.stock as 'storage_capacity_lack_quantity',
dat.quantity_final_advise - t17.stock - ifnull(t13.quantity_purchase,0) - ifnull(t13.quantity_transfer_temp_schedule,0) - ifnull(t13.quantity_transfer_temporary_storage,0) as 'storage_capacity_lack_quantity',
t17.stock as 'storage_capacity',
t13.quantity_land_purchase as 'quantity_land_purchase',
t13.quantity_ocean_purchase as 'quantity_ocean_purchase',
...
...
@@ -159,6 +160,7 @@ from dc_auto_turnover as dat
}
if
(
m
.
storage_capacity_lack_quantity_max
>
0
||
m
.
storage_capacity_lack_quantity_min
>
0
)
{
sqlCount
+=
" left join dc_mid_transit as t13 on dat.bailun_sku = t13.bailun_sku and dat.warehouse_code = t13.warehouse_code "
;
sqlCount
+=
" inner join dc_base_storage_capacity as t17 on dat.bailun_sku_warehouse_code = t17.bailun_sku_warehouse_code "
;
}
sqlCount
+=
" where 1=1 "
;
...
...
@@ -384,14 +386,14 @@ from dc_auto_turnover as dat
}
if
(
m
.
storage_capacity_lack_quantity_min
!=
null
)
{
whereSql
+=
" and (dat.quantity_final_advise
- t17.stock
)>=@storage_capacity_lack_quantity_min "
;
sqlCount
+=
" and (dat.quantity_final_advise
- t17.stock
)>=@storage_capacity_lack_quantity_min "
;
whereSql
+=
" and (dat.quantity_final_advise
- t17.stock - ifnull(t13.quantity_purchase,0) - ifnull(t13.quantity_transfer_temp_schedule,0) - ifnull(t13.quantity_transfer_temporary_storage,0)
)>=@storage_capacity_lack_quantity_min "
;
sqlCount
+=
" and (dat.quantity_final_advise
- t17.stock - ifnull(t13.quantity_purchase,0) - ifnull(t13.quantity_transfer_temp_schedule,0) - ifnull(t13.quantity_transfer_temporary_storage,0)
)>=@storage_capacity_lack_quantity_min "
;
parameters
.
Add
(
"storage_capacity_lack_quantity_min"
,
m
.
storage_capacity_lack_quantity_min
);
}
if
(
m
.
storage_capacity_lack_quantity_max
!=
null
)
{
whereSql
+=
" and (dat.quantity_final_advise
- t17.stock
)<=@storage_capacity_lack_quantity_max "
;
sqlCount
+=
" and (dat.quantity_final_advise
- t17.stock
)<=@storage_capacity_lack_quantity_max "
;
whereSql
+=
" and (dat.quantity_final_advise
- t17.stock - ifnull(t13.quantity_purchase,0) - ifnull(t13.quantity_transfer_temp_schedule,0) - ifnull(t13.quantity_transfer_temporary_storage,0)
)<=@storage_capacity_lack_quantity_max "
;
sqlCount
+=
" and (dat.quantity_final_advise
- t17.stock - ifnull(t13.quantity_purchase,0) - ifnull(t13.quantity_transfer_temp_schedule,0) - ifnull(t13.quantity_transfer_temporary_storage,0)
)<=@storage_capacity_lack_quantity_max "
;
parameters
.
Add
(
"storage_capacity_lack_quantity_max"
,
m
.
storage_capacity_lack_quantity_max
);
}
if
(
m
.
avg_type
>
0
)
...
...
AutoTurnOver.Models/dc_auto_turnover.cs
View file @
5bbca2ed
...
...
@@ -797,12 +797,14 @@ namespace AutoTurnOver.Models
public
class
dc_auto_turnover_list_dto
{
private
decimal
_storage_capacity_lack_quantity
;
private
decimal
?
_storage_capacity_lack_quantity
;
public
decimal
?
storage_capacity
{
get
;
set
;
}
/// <summary>
/// 库容缺少值
/// </summary>
public
decimal
storage_capacity_lack_quantity
{
get
{
return
Math
.
Max
(
0
,
_storage_capacity_lack_quantity
);
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
;
}
}
/// <summary>
/// Walmart 过去7日销量(日均)
...
...
AutoTurnOver.Services/SkuAutoTurnServices.cs
View file @
5bbca2ed
...
...
@@ -320,7 +320,7 @@ namespace AutoTurnOver.Services
,
"调拨陆运在途数量"
,
"调拨海运在途数量"
,
"调拨空运在途数量"
,
"调拨铁路在途数量"
,
"首次入库时间"
,
"供应链累计销量"
,
"销量预测规则"
,
"默认头程运输方式"
,
"默认头程渠道"
,
"计算时间"
,
"日均出单次数"
,
"首次出单日期"
,
"首次出单订单号"
,
"备货数量"
,
"产品类型"
,
"头程平均值取值来源"
,
"Walmart最近7天日均销量"
,
"Walmart最近14天日均销量"
,
"Walmart最近30天日均销量"
,
"平均交期"
,
"配置交期"
,
"库容缺少值"
"平均交期"
,
"配置交期"
,
"库容缺少值"
,
"可用库容"
};
foreach
(
var
item
in
cols
)
{
...
...
@@ -330,6 +330,7 @@ namespace AutoTurnOver.Services
foreach
(
var
itemData
in
list
)
{
DataRow
row
=
table
.
NewRow
();
row
[
"可用库容"
]
=
itemData
.
storage_capacity
;
row
[
"库容缺少值"
]
=
itemData
.
storage_capacity_lack_quantity
;
row
[
"平均交期"
]
=
itemData
.
supplier_delivery
;
row
[
"配置交期"
]
=
itemData
.
supplier_delivery_config
;
...
...
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