varorders=_connection.Query<dc_base_oms_sku>(" select * from dc_base_oms_sku where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku and bailun_order_status not in ('Canceled') and bailun_interception_status in ('None', 'Failed') and paid_time<=@etime ",new
varorders30=_connection.Query<dc_base_oms_sku>(" select * from dc_base_oms_sku where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku and bailun_order_status not in ('Canceled') and bailun_interception_status in ('None', 'Failed') and paid_time<=@etime and paid_time>=@btime ",new
order_days=_connection.QueryFirstOrDefault<decimal?>(" select count(DISTINCT DATE_FORMAT(paid_time,'%Y-%m-%d')) from dc_base_oms_sku where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku and bailun_order_status not in ('Canceled') and bailun_interception_status in ('None', 'Failed') and paid_time<=@etime ",new
ana.first_order_date=_connection.QueryFirstOrDefault<DateTime?>(" select min(paid_time) from dc_base_oms_sku where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku and bailun_order_status not in ('Canceled') and bailun_interception_status in ('None', 'Failed') and paid_time<=@etime ",new
ana.last_order_date=_connection.QueryFirstOrDefault<DateTime?>(" select max(paid_time) from dc_base_oms_sku where warehouse_code=@warehouse_code and bailun_sku=@bailun_sku and bailun_order_status not in ('Canceled') and bailun_interception_status in ('None', 'Failed') and paid_time<=@etime ",new