Commit 2839ca42 by guanzhenshan

调整退款明细发货状态判断

parent b62f85a6
......@@ -170,7 +170,7 @@ namespace Bailun.DC.MonthSaleProfit
m.pt_platform_ad_subscribe_fee += (obj ?? 0);
//退款
sql = $@"select sum(t1.amount_refund_rmb) from dc_base_crm_refund t1 where t1.shipping_status='TotalShipping' and t1.is_deleted=0 and is_freeze=0 and t1.company_id=1 and t1.refund_time>='{day.ToString("yyyy-MM-dd")}' and t1.refund_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}' and t1.shipping_status!='UnShipping'";
sql = $@"select sum(t1.amount_refund_rmb) from dc_base_crm_refund t1 where t1.shipping_status in ('TotalShipping','PartShipping') and t1.is_deleted=0 and is_freeze=0 and t1.company_id=1 and t1.refund_time>='{day.ToString("yyyy-MM-dd")}' and t1.refund_time<'{day.AddMonths(1).ToString("yyyy-MM-dd")}' and t1.shipping_status!='UnShipping'";
obj = cn.QueryFirstOrDefault<decimal?>(sql, null, null, 2 * 60);
m.pt_refund_amount = obj ?? 0;
......@@ -317,7 +317,7 @@ namespace Bailun.DC.MonthSaleProfit
m.pt_platform_ad_subscribe_fee += m.pt_platform_ad_subscribe_fee_;
//退款
sql = $@"select sum(t1.amount_refund_rmb) from dc_base_crm_refund t1 where t1.shipping_status='TotalShipping' and t1.is_deleted=0 and is_freeze=0 and t1.company_id=1 and t1.refund_time>='{start.ToString("yyyy-MM-dd")}' and t1.refund_time<'{start.AddMonths(1).ToString("yyyy-MM-dd")}' and t1.shipping_status!='UnShipping'";
sql = $@"select sum(t1.amount_refund_rmb) from dc_base_crm_refund t1 where t1.shipping_status in ('TotalShipping','PartShipping') and t1.is_deleted=0 and is_freeze=0 and t1.company_id=1 and t1.refund_time>='{start.ToString("yyyy-MM-dd")}' and t1.refund_time<'{start.AddMonths(1).ToString("yyyy-MM-dd")}' and t1.shipping_status!='UnShipping'";
obj = cn.QueryFirstOrDefault<decimal?>(sql, null, null, 2 * 60);
m.pt_refund_amount = obj ?? 0;
......
......@@ -5185,11 +5185,11 @@ namespace Bailun.DC.Services
{
if (shippingstatus.Value == 1)
{
sql += " and t1.shipping_status!='UnShipping'";
sql += " and t1.shipping_status in ('TotalShipping','PartShipping')";
}
else
{
sql += " and t1.shipping_status='UnShipping'";
sql += " and t1.shipping_status in ('UnShipping','') ";
}
}
......@@ -5353,11 +5353,11 @@ namespace Bailun.DC.Services
{
if (shippingstatus.Value == 1)
{
sql += " and t1.shipping_status!='UnShipping'";
sql += " and t1.shipping_status in ('TotalShipping','PartShipping')";
}
else
{
sql += " and t1.shipping_status='UnShipping'";
sql += " and t1.shipping_status in ('UnShipping','') ";
}
}
......@@ -5510,11 +5510,11 @@ namespace Bailun.DC.Services
{
if (shippingstatus.Value == 1)
{
sql += " and t1.shipping_status!='UnShipping'";
sql += " and t1.shipping_status in ('TotalShipping','PartShipping')";
}
else
{
sql += " and t1.shipping_status='UnShipping'";
sql += " and t1.shipping_status in ('UnShipping','') ";
}
}
......@@ -5622,7 +5622,7 @@ namespace Bailun.DC.Services
sql += " and t10.source in (1,2,3,6,7,11) ";
}
sql += " where t1.shipping_status='TotalShipping' and t1.is_deleted=0 and is_freeze=0 ";
sql += " where t1.is_deleted=0 and is_freeze=0 ";
if (companyid.HasValue && companyid.Value != 0)
{
......@@ -5655,7 +5655,7 @@ namespace Bailun.DC.Services
if (!containNotShipping)
{
sql += " and t1.shipping_status!='UnShipping'";
sql += " and t1.shipping_status in ('TotalShipping','PartShipping') ";
}
......
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