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
115018c1
Commit
115018c1
authored
Apr 25, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改无库仓算法
parent
952a4669
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
report.cs
AutoTurnOver.DB/report.cs
+5
-5
NotStockController.cs
AutoTurnOver/Controllers/NotStockController.cs
+2
-2
No files found.
AutoTurnOver.DB/report.cs
View file @
115018c1
...
@@ -396,14 +396,14 @@ Truncate table dc_not_stock_goods_sales_temp;
...
@@ -396,14 +396,14 @@ Truncate table dc_not_stock_goods_sales_temp;
INSERT into dc_not_stock_goods_sales_temp(`product_inner_code`,`warehouse_code`,`test_sales`,`success_sales`) (
INSERT into dc_not_stock_goods_sales_temp(`product_inner_code`,`warehouse_code`,`test_sales`,`success_sales`) (
select
select
t2.product_inner_code,t
1
.warehouse_code,
t2.product_inner_code,t
2
.warehouse_code,
sum(case when TIMESTAMPDIFF(day,t2.push_time,t1.pay_time)<=21 then t1.bailun_sku_quantity_ordered else 0 end) as 'test_sales', -- 推送之后 21 日的销量
sum(case when TIMESTAMPDIFF(day,t2.push_time,t1.pay_time)<=21 then t1.bailun_sku_quantity_ordered else 0 end) as 'test_sales', -- 推送之后 21 日的销量
sum(case when TIMESTAMPDIFF(day,t1.pay_time,now())<=7 then t1.bailun_sku_quantity_ordered else 0 end) as 'success_sales' -- 最近7日销量
sum(case when TIMESTAMPDIFF(day,t1.pay_time,now())<=7 then t1.bailun_sku_quantity_ordered else 0 end) as 'success_sales' -- 最近7日销量
from dc_base_
oms_sku as t1
from dc_base_
sku as t2
left join dc_base_
sku as t2 on t1.bailun_sku = t2.bailun_sku
left join dc_base_
oms_sku as t1 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code
left join dc_auto_config_sku_warehouse as t3 on t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
left join dc_auto_config_sku_warehouse as t3 on t1.bailun_sku = t3.bailun_sku and t1.warehouse_code = t3.warehouse_code
where t
1.warehouse_code='BLGZ03' and t1.bailun_order_status!='Canceled'
and (t3.`status`=0 or t3.`status` is null)
where t
2.warehouse_code='BLGZ03' and (t1.id is null or t1.bailun_order_status!='Canceled')
and (t3.`status`=0 or t3.`status` is null)
GROUP BY t2.product_inner_code,t
1
.warehouse_code
GROUP BY t2.product_inner_code,t
2
.warehouse_code
);
);
alter table dc_not_stock_goods_sales rename dc_not_stock_goods_salesTemp;
alter table dc_not_stock_goods_sales rename dc_not_stock_goods_salesTemp;
...
...
AutoTurnOver/Controllers/NotStockController.cs
View file @
115018c1
...
@@ -42,7 +42,7 @@ namespace AutoTurnOver.Controllers
...
@@ -42,7 +42,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
JsonResult
Eliminate
(
string
product_inner_codes
)
public
JsonResult
Eliminate
(
[
FromBody
]
string
product_inner_codes
)
{
{
try
try
{
{
...
@@ -64,7 +64,7 @@ namespace AutoTurnOver.Controllers
...
@@ -64,7 +64,7 @@ namespace AutoTurnOver.Controllers
}
}
[
HttpPost
]
[
HttpPost
]
public
JsonResult
TransferWarehouse
(
string
product_inner_codes
)
public
JsonResult
TransferWarehouse
(
[
FromBody
]
string
product_inner_codes
)
{
{
try
try
{
{
...
...
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