Commit e44e71c5 authored by liudong1993's avatar liudong1993

1

parent 88ce278e
...@@ -125,7 +125,19 @@ namespace REBORN.Repository.DataStatistics ...@@ -125,7 +125,19 @@ namespace REBORN.Repository.DataStatistics
} }
if (model.TravelStatus > 0) if (model.TravelStatus > 0)
{ {
where += " AND p.Status =" + model.TravelStatus; //where += " AND p.Status =" + model.TravelStatus;
if (model.TravelStatus == 1)
{
where += " AND !(p.Status =2 or djp.OrderStatus in(5,6) or ho.IsFinish=1 or to.IsFinish=1 or co.IsFinish=1 or vo.IsFinish=1)";
}
else if (model.TravelStatus == 2)
{
where += " AND (p.Status =2 or djp.OrderStatus in(5,6) or ho.IsFinish=1 or to.IsFinish=1 or co.IsFinish=1 or vo.IsFinish=1)";
}
else
{
where += " AND p.Status =" + model.TravelStatus;
}
} }
if (model.TeamType > 0)//2023-12-02 add by:W 团队类型筛选条件; 需兼容导出; 类型: 0不限、 1常规团 、 2小包团、 3当地游 if (model.TeamType > 0)//2023-12-02 add by:W 团队类型筛选条件; 需兼容导出; 类型: 0不限、 1常规团 、 2小包团、 3当地游
{ {
...@@ -156,6 +168,11 @@ namespace REBORN.Repository.DataStatistics ...@@ -156,6 +168,11 @@ namespace REBORN.Repository.DataStatistics
//{where}"; //{where}";
string sql = $@" select r.* from {nameof(RB_RevenueReport)} r string sql = $@" select r.* from {nameof(RB_RevenueReport)} r
{((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.rb_travel_price p on r.TCID =p.TCID and r.DataType =1" : "")} {((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.rb_travel_price p on r.TCID =p.TCID and r.DataType =1" : "")}
{((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_sell" : "reborn_sell")}.RB_Ticket_Order djp on djp.OrderId =p.TCID and r.DataType =16" : "")}
{((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.RB_Customer_HotelOrder ho on ho.OrderId =p.TCID and r.DataType =17" : "")}
{((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.RB_Customer_TicketOrder to on to.OrderId =p.TCID and r.DataType =19" : "")}
{((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.RB_Customer_CarOrder co on co.OrderId =p.TCID and r.DataType =18" : "")}
{((model.TravelStatus > 0 ) ? $" left join {(REBORN.Common.Config.IsOnline ? "uat_reborn_dmc" : "reborn_dmc")}.RB_Sell_VisaOrder vo on vo.Id =p.TCID and r.DataType =3" : "")}
{where}"; {where}";
sql += $@" order by r.{nameof(RB_RevenueReport.StartDate)} asc"; sql += $@" order by r.{nameof(RB_RevenueReport.StartDate)} asc";
return GetPage<RB_RevenueReport_Extend>(pageIndex, pageSize, out count, sql).ToList(); return GetPage<RB_RevenueReport_Extend>(pageIndex, pageSize, out count, sql).ToList();
......
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