Commit bd9f8df0 by 泽锋 李

wish 回货修改

parent f310afe6
......@@ -1002,6 +1002,12 @@ end
/// </summary>
public static List<dc_return_goods_push> ReturnGoodsPush(string platform)
{
List<string> rule1 = new List<string> { "GBYKD", "JZHYBLGC", "MDBLWYT", "MXBLWYT", "BLUSGDC", "GBBMHBL", "GB4PXBL", "DEBLDG", "USGCBL", "USHWBL", "US4PXBL", "AUWYTBL", "AU4PXBL", "GBWYTUK", "GBLQST" };
if (platform == "wish")
{
rule1 = new List<string> { "USGCBL", "BLUSGDC", "US4PXBL", "GB4PXBL" };
}
var conn = _connection;
var shortage_list = new List<dc_return_goods_push>();
// 回货速改推送
......@@ -1036,9 +1042,7 @@ left join (
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 (
'GBYKD', 'JZHYBLGC', 'MDBLWYT', 'MXBLWYT', 'BLUSGDC', 'GBBMHBL', 'GB4PXBL', 'DEBLDG', 'USGCBL', 'USHWBL', 'US4PXBL', 'AUWYTBL', 'AU4PXBL', 'GBWYTUK', 'GBLQST'
)
where t1.warehouse_code in @rule1
-- 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
......@@ -1046,9 +1050,7 @@ 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
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'
)
where t1.quantity_unshipped>0 and t1.warehouse_code in @rule1
-- 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
......@@ -1065,7 +1067,7 @@ end
)
";
shortage_list.AddRange(conn.Query<dc_return_goods_push>(sql, new { platform = platform }, commandTimeout: 0));
shortage_list.AddRange(conn.Query<dc_return_goods_push>(sql, new { platform = platform,rule1 = rule1 }, commandTimeout: 0));
return shortage_list;
......
......@@ -621,7 +621,7 @@ namespace AutoTurnOver.Services
}
public void PlatformReturnGoodsPush(string platform)
{
var datas = report.ReturnGoodsPush(platform);
// 先走一遍过滤条件,把数据过滤一遍
var filter_datas = ReturnGoodsPushFilter(datas);
......
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