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
84658090
Commit
84658090
authored
Dec 12, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化周转表,实时库存表查询速度
parent
bcf56693
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
16 deletions
+5
-16
daily.cs
AutoTurnOver.DB/daily.cs
+2
-2
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+3
-14
No files found.
AutoTurnOver.DB/daily.cs
View file @
84658090
...
...
@@ -336,7 +336,7 @@ t6.history_sevenday_sales_amazon,t6.history_fourteenday_sales_amazon,t6.history_
dbw.area_name,
dbw.hq_type,
ifnull(t15.count,0) as 'not_trans_count',
--
ifnull(t15.count,0) as 'not_trans_count',
t4.quantity_purchase * t3.unit_price as 'realtime_amount_purchase',
t4.quantity_transfer * t3.unit_price as 'realtime_amount_transfer',
...
...
@@ -372,7 +372,7 @@ left join dc_auto_config_sku_warehouse as t7 on t1.bailun_sku = t7.bailun_sku an
left join dc_auto_sales as t8 on t1.bailun_sku=t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
left join dc_base_lastweek_data as t9 on t1.bailun_sku=t9.bailun_sku and t1.warehouse_code = t9.warehouse_code
left join dc_base_stock_extend as t10 on t1.bailun_sku=t10.bailun_sku and t1.warehouse_code = t10.warehouse_code
left join not_trans_view as t15 on t1.bailun_sku=t15.bailun_sku and t1.warehouse_code = t15.warehouse_code
--
left join not_trans_view as t15 on t1.bailun_sku=t15.bailun_sku and t1.warehouse_code = t15.warehouse_code
"
;
...
...
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
84658090
...
...
@@ -67,7 +67,7 @@ t4.brand as 'brand',
t7.first_inbound_date,
t3.area_name,
ifnull(t15.count,0) as 'not_trans_count',
--
ifnull(t15.count,0) as 'not_trans_count',
t13.quantity_land_purchase as 'quantity_land_purchase',
t13.quantity_ocean_purchase as 'quantity_ocean_purchase',
...
...
@@ -96,7 +96,7 @@ left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
left join dc_return_goods_not_push as t12 on dat.bailun_sku = t12.bailun_sku and dat.warehouse_code = t12.warehouse_code
left join dc_mid_transit as t13 on dat.bailun_sku = t13.bailun_sku and dat.warehouse_code = t13.warehouse_code
-- left join dc_auto_sales_forecast_config as t14 on dat.dc_auto_sales_forecast_config_id = t14.id
left join not_trans_view as t15 on dat.bailun_sku = t15.bailun_sku and dat.warehouse_code = t15.warehouse_code
--
left join not_trans_view as t15 on dat.bailun_sku = t15.bailun_sku and dat.warehouse_code = t15.warehouse_code
where 1=1 "
;
}
...
...
@@ -302,18 +302,7 @@ from dc_auto_turnover as dat
sqlCount
+=
" and t15.count>=@not_trans_count_min "
;
parameters
.
Add
(
"not_trans_count_min"
,
m
.
not_trans_count_min
);
}
if
(
m
.
not_trans_count_max
!=
null
)
{
sql
+=
" and t15.count<=@not_trans_count_max "
;
sqlCount
+=
" and t15.count<=@not_trans_count_max "
;
parameters
.
Add
(
"not_trans_count_max"
,
m
.
not_trans_count_max
);
}
if
(
m
.
quantity_out_stock_min
!=
null
)
{
sql
+=
" and dat.quantity_out_stock>=@quantity_out_stock_min "
;
sqlCount
+=
" and dat.quantity_out_stock>=@quantity_out_stock_min "
;
parameters
.
Add
(
"quantity_out_stock_min"
,
m
.
quantity_out_stock_min
);
}
if
(
m
.
quantity_out_stock_max
!=
null
)
{
sql
+=
" and dat.quantity_out_stock>=@quantity_out_stock_max "
;
...
...
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