varsql=$@"select t1.warehouse_code,t3.warehouse_name,t1.bailun_sku,t1.count count,(t1.count*t1.price) amount,t1.price,t1.purchase_id,t1.create_time from dc_base_purchase t1
left join dc_base_warehouse t3 on t1.warehouse_code = t3.warehouse_code
where t1.has_delete=0 and t1.status!=-1 and t1.create_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.create_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'
varsql=$@"select t1.warehouse_code,t3.warehouse_name,t1.bailun_sku,sum(t1.count) count,sum(t1.count*t2.unit_price) amount from dc_base_purchase t1
left join dc_base_sku t2 on t1.bailun_sku=t2.bailun_sku
varsql=$@"select t1.warehouse_code,t3.warehouse_name,t1.bailun_sku,sum(t1.count) count,sum(t1.count*t1.price) amount from dc_base_purchase t1
left join dc_base_warehouse t3 on t1.warehouse_code = t3.warehouse_code
where t1.has_delete=0 and t1.status!=-1 and t1.create_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.create_time<'{end.ToString("yyyy-MM-dd HH:mm:ss")}'