varsql=$"select code,detail_name,type_name,companymain_name_from,paymoney_rmb,cashier_paymoneyrmb,cashier_time from dc_base_finance_cashier where cashier_type=1 and cashier_status=1 and sourcecode in ('newCost','oldbuy') and type_name='销售费用/物流费' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'";;
varsql=$"select code,detail_name,type_name,companymain_name_from,if(cashier_type=2,-paymoney_rmb,paymoney_rmb) paymoney_rmb,if(cashier_type=2,-cashier_paymoneyrmb,cashier_paymoneyrmb) cashier_paymoneyrmb,cashier_time from dc_base_finance_cashier where cashier_type in (1,2) and cashier_status=1 and sourcecode in ('newCost','oldbuy') and type_name='销售费用/物流费' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'";;
varsql=$"select sum(paymoney_rmb) paymoney_rmb,sum(cashier_paymoneyrmb) cashier_paymoneyrmb from dc_base_finance_cashier where cashier_type=1 and cashier_status=1 and sourcecode in ('newCost','oldbuy') and type_name='销售费用/物流费' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'";;
varsql=$"select sum(if(cashier_type=2,-paymoney_rmb,paymoney_rmb)) paymoney_rmb,sum(if(cashier_type=2,-cashier_paymoneyrmb,cashier_paymoneyrmb)) cashier_paymoneyrmb from dc_base_finance_cashier where cashier_type in (1,2) and cashier_status=1 and sourcecode in ('newCost','oldbuy') and type_name='销售费用/物流费' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'";;
varsql=$"select code,detail_name,type_name,companymain_name_from,paymoney_rmb,cashier_paymoneyrmb,cashier_time from dc_base_finance_cashier where cashier_type=1 and cashier_status=1 and sourcecode in ('newCost','oldbuy') and type_name='销售费用/物流费' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'";;
varsql=$"select code,detail_name,type_name,companymain_name_from,if(cashier_type=2,-paymoney_rmb,paymoney_rmb) paymoney_rmb,if(cashier_type=2,-cashier_paymoneyrmb,cashier_paymoneyrmb) cashier_paymoneyrmb,cashier_time from dc_base_finance_cashier where cashier_type in (1,2) and cashier_status=1 and sourcecode in ('newCost','oldbuy') and type_name='销售费用/物流费' and cashier_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and cashier_time<'{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}'";;