@@ -53,13 +53,10 @@ where t1.`update_time`>=@c_time
{
// 初始化数据才会进啦
sql+=" and t2.hq_type!='国内仓' ";
sql+=" and not EXISTS ( select * from dc_average_warehouse as ta where t1.warehouse_code =ta.warehouse_code and t1.bailun_sku =ta.bailun_sku and (ta.update_time>'2021-03-12' ) ) ";
//sql += " and not EXISTS ( select * from dc_average_warehouse as ta where t1.warehouse_code =ta.warehouse_code and t1.bailun_sku =ta.bailun_sku and (ta.update_time>'2021-03-12' ) ) ";
sql+=" and EXISTS ( select * from dc_report_profit_analysis as ta where t1.warehouse_code =ta.warehouse_code and t1.bailun_sku =ta.bailun_sku ) ";
}
sql+=" group by t1.bailun_sku,t1.warehouse_code ";