varodlData=_connection.QueryFirstOrDefault<sales_day_config>(" select * from sales_day_config where bailun_sku_warehouse_code=@bailun_sku_warehouse_code and date_str=@date_str ",new
vardc_auto_turnover_data=_connection.QuerySingleOrDefault<Models.dc_auto_turnover>(" select * from dc_auto_turnover where id=@id ",new{id});
vardc_auto_turnover_data=_connection.QuerySingleOrDefault<Models.dc_auto_turnover>(" select * from dc_auto_turnover where id=@id ",new{id});
// 查询是否已经有数据
vardc_base_head_transport_config_old_data=_connection.QuerySingleOrDefault<dc_base_head_transport_config>(" select * from dc_base_head_transport_config where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code and is_delete=0 limit 1 ",new
@@ -517,6 +517,20 @@ and not exists ( select * from dc_auto_shortage_push_not_config where dc_auto_sh
{
sql+=$" and not exists ( select * from dc_auto_shortage_push where dc_auto_shortage_push.warehouse_code = t1.warehouse_code and dc_auto_shortage_push.bailun_sku = t1.bailun_sku and dc_auto_shortage_push.`type`=1 and dc_auto_shortage_push.platform='{platform}' and dc_auto_shortage_push.has_return_goods=0 ) ";
}
// ebay 的 10月新品 +普货全量推
if(platform=="ebay")
{
if(is_all)
{
// 全量推 只推普货
sql+=" and t2.develop_time>='2020-10-01' and t2.buyer_name not in ('张莹霞','赵美聪','张莹霞') and t1.warehouse_code in ('GZBLWH') ";
}
else
{
// 增量推,那部分数据要剔除
sql+=" and !(t2.develop_time>='2020-10-01' and t2.buyer_name not in ('张莹霞','赵美聪','张莹霞') and t1.warehouse_code in ('GZBLWH') ) ";
@@ -566,6 +580,20 @@ and not exists ( select * from dc_auto_shortage_push_not_config where dc_auto_sh
{
no_library_sql+=$" and not exists ( select * from dc_auto_shortage_push where dc_auto_shortage_push.warehouse_code = t1.warehouse_code and dc_auto_shortage_push.bailun_sku = t1.bailun_sku and dc_auto_shortage_push.`type`=2 and dc_auto_shortage_push.platform='{platform}' and dc_auto_shortage_push.has_return_goods=0 ) ";
}
// ebay 的 10月新品 +普货全量推
if(platform=="ebay")
{
if(is_all)
{
// 全量推 只推普货
no_library_sql+=" and t3.develop_time>='2020-10-01' and t3.buyer_name not in ('张莹霞','赵美聪','张莹霞') and t1.warehouse_code in ('GZBLWH') ";
}
else
{
// 增量推,那部分数据要剔除
no_library_sql+=" and !(t3.develop_time>='2020-10-01' and t3.buyer_name not in ('张莹霞','赵美聪','张莹霞') and t1.warehouse_code in ('GZBLWH') ) ";
(MyMySqlConnection._connection_read_only.QueryFirstOrDefault<int?>(" select * from dc_auto_turnover where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code ",new{
vardc_base_week_coefficient_datas=MyMySqlConnection._connection_read_only.Query<dc_base_week_coefficient>(" select * from dc_base_week_coefficient where bailun_sku_warehouse_code=@bailun_sku_warehouse_code ",new
{
bailun_sku_warehouse_code=$"{sku}{warehousecode}"
});
// 提前查询销量配置
varsales_day_config_datas=MyMySqlConnection._connection_read_only.Query<sales_day_config>(" select * from sales_day_config where bailun_sku_warehouse_code=@bailun_sku_warehouse_code ",new