Commit 98fd447a by 泽锋 李

fix

parent dc22f81e
...@@ -380,7 +380,8 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code ...@@ -380,7 +380,8 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
} }
if (start_date != null && end_date != null) if (start_date != null && end_date != null)
{ {
sql += " and EXISTS (select * from dc_base_stock_record as t_re where t1.warehouse_code=t_re.warehouse_code and t1.bailun_sku = t_re.bailun_sku and t_re.stock_time>=@start_date and t_re.stock_time<=@end_date ) "; sql += " and t1.bailun_sku in (select t_re.bailun_sku from dc_base_stock_record as t_re where t_re.stock_time >=@start_date and t_re.stock_time <=@end_date ) ";
countSql += " and t1.bailun_sku in (select t_re.bailun_sku from dc_base_stock_record as t_re where t_re.stock_time >=@start_date and t_re.stock_time <=@end_date ) ";
parameters.Add("start_date", start_date.Value.ToString("yyyy-MM-dd 00:00:00")); parameters.Add("start_date", start_date.Value.ToString("yyyy-MM-dd 00:00:00"));
parameters.Add("end_date", end_date.Value.ToString("yyyy-MM-dd 23:59:59")); parameters.Add("end_date", end_date.Value.ToString("yyyy-MM-dd 23:59:59"));
} }
......
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