Commit 2b91c69c by 泽锋 李

缺货改零推送修改

parent d1ed8e91
......@@ -578,15 +578,20 @@ left join (
select t1.bailun_sku,t2.area_id,sum(t1.usable_stock) as 'usable_stock' from dc_base_stock as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
where t1.warehouse_code in @warehouse_codes
and t1.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
GROUP BY t1.bailun_sku,t2.area_id
) as t6 on t1.bailun_sku = t6.bailun_sku and t_db.area_id = t6.area_id
left join (
select t1.bailun_sku,t2.area_id,sum(t1.quantity_unshipped) as 'quantity_unshipped' from dc_mid_transit as t1 left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
select t1.bailun_sku,t2.area_id,sum(t1.quantity_unshipped) as 'quantity_unshipped' from dc_mid_transit as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
left join dc_base_stock as t3 on t1.warehouse_code = t3.warehouse_code and t1.bailun_sku = t3.bailun_sku
where t1.quantity_unshipped>0 and t1.warehouse_code in @warehouse_codes
and t3.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
GROUP BY t1.bailun_sku,t2.area_id
) as t7 on t1.bailun_sku = t7.bailun_sku and t_db.area_id = t7.area_id
where
t1.warehouse_code in @warehouse_codes
and t5.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
and ( ifnull(t6.usable_stock,0)<ifnull(t7.quantity_unshipped,0) ) -- 有缺货
";
......@@ -614,9 +619,11 @@ left join (
select t1.bailun_sku,t2.area_id,sum(t1.usable_stock) as 'usable_stock' from dc_base_stock as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
where t1.warehouse_code in @warehouse_codes
and t1.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
GROUP BY t1.bailun_sku,t2.area_id
) as t6 on t1.bailun_sku = t6.bailun_sku and t_db.area_id = t6.area_id
where t1.warehouse_code in @warehouse_codes
and t1.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
and ifnull(t6.usable_stock,0)<2 -- (case when t2.buyer_name in ('张莹霞','张莹霞1') and @platform='ebay' then 2 else 0 end )
and not exists ( select * from dc_auto_shortage_push_not_config where dc_auto_shortage_push_not_config.warehouse_code=t1.warehouse_code and dc_auto_shortage_push_not_config.bailun_sku=t1.bailun_sku )
";
......@@ -949,17 +956,22 @@ left join (
where t1.warehouse_code in (
'GBYKD', 'JZHYBLGC', 'MDBLWYT', 'MXBLWYT', 'BLUSGDC', 'GBBMHBL', 'GB4PXBL', 'DEBLDG', 'USGCBL', 'USHWBL', 'US4PXBL', 'AUWYTBL', 'AU4PXBL', 'GBWYTUK', 'GBLQST'
)
and t1.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
GROUP BY t1.bailun_sku,t2.area_id
) as tnc1 on t1.bailun_sku = tnc1.bailun_sku and t_db.area_id = tnc1.area_id
left join (
select t1.bailun_sku,t2.area_id,sum(t1.quantity_unshipped) as 'quantity_unshipped' from dc_mid_transit as t1 left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
select t1.bailun_sku,t2.area_id,sum(t1.quantity_unshipped) as 'quantity_unshipped' from dc_mid_transit as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
left join dc_base_stock as t3 on t1.warehouse_code = t3.warehouse_code and t1.bailun_sku = t3.bailun_sku
where t1.quantity_unshipped>0 and t1.warehouse_code in (
'GBYKD', 'JZHYBLGC', 'MDBLWYT', 'MXBLWYT', 'BLUSGDC', 'GBBMHBL', 'GB4PXBL', 'DEBLDG', 'USGCBL', 'USHWBL', 'US4PXBL', 'AUWYTBL', 'AU4PXBL', 'GBWYTUK', 'GBLQST'
)
and t3.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
GROUP BY t1.bailun_sku,t2.area_id
) as tnc2 on t1.bailun_sku = tnc2.bailun_sku and t_db.area_id = tnc2.area_id
where t1.platform=@platform and t1.has_return_goods=0
where t_stock.bailun_sku_warehouse_code not in ( select bailun_sku_warehouse_code from dc_auto_shortage_push_ignore )
and t1.platform=@platform and t1.has_return_goods=0
and
(
case
......
......@@ -786,11 +786,11 @@ namespace AutoTurnOver.Services
{
throw new Exception($" 第 {item.index} 阶段的 第 1 个时间段范围 的 3个加权值相加不等与1 ");
}
if (item.two_n2 + item.two_n4 + item.two_n6 != 1)
if (item.two_n2 + item.two_n4 + item.two_n6 != 1 && item.two_ratio > 0)
{
throw new Exception($" 第 {item.index} 阶段的 第 2 个时间段范围 的 3个加权值相加不等与1 ");
}
if (item.three_n2 + item.three_n4 + item.three_n6 != 1)
if (item.three_n2 + item.three_n4 + item.three_n6 != 1 && item.three_ratio>0)
{
throw new Exception($" 第 {item.index} 阶段的 第 3 个时间段范围 的 3个加权值相加不等与1 ");
}
......
......@@ -758,6 +758,7 @@ namespace AutoTurnOver.Controllers
});
}
[NoLogin]
[HttpPost]
public JsonResult SaveSalesForecastConfig([FromBody]dc_auto_sales_forecast_config_dto m)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment