Commit 2b3168e9 authored by liudong1993's avatar liudong1993

1

parent 947b46bd
......@@ -661,7 +661,7 @@ LEFT JOIN rb_travel_price p on o.TCID =p.TCID
left join
(SELECT r.TCID,SUM(case when r.TCID in(16381,17415,17606,17879) then case when r.TCID =16381 then 33285 else case when r.TCID =17415 then 37815 else case when r.TCID =17606 then 35820 else 32715 end end end else IFNULL(r.ShiJiLiRun,0) + IFNULL(r.TiCheng,0) - IFNULL(r.YongJinShouRu,0) end) AS ShiJiLiRun,sum(IFNULL(GuestNum,0)) as TGuestNum
FROM {(Config.IsOnline ? "uat_reborn_datastatistics" : "reborn_datastatistics")}.rb_revenuereport r WHERE r.Rb_Group_Id ={demodel.GroupId} and r.DataType =1 and r.Type =1 and r.StartDate >='2023-01-01' GROUP BY r.TCID) r on r.TCID =o.TCID
{(demodel.LineId > 0 || demodel.CommissionType > 0 ? "LEFT JOIN rb_travel_config c on p.ConfigID = c.ID" : "")}
{(demodel.LineId > 0 || !string.IsNullOrEmpty(demodel.ProductName) || demodel.CommissionType > 0 ? "LEFT JOIN rb_travel_config c on p.ConfigID = c.ID" : "")}
{(!string.IsNullOrEmpty(demodel.CustomerName) ? "LEFT JOIN rb_travel_guest g on o.CRMGuestId = g.Id" : "")}
{(demodel.BranchId > 0 ? $"LEFT JOIN {(Config.IsOnline ? "uat_reborn_user" : "reborn_user")}.rb_employee e on o.EnterID = e.EmployeeId" : "")}
{(demodel.BranchId > 0 ? $"LEFT JOIN {(Config.IsOnline ? "uat_reborn_user" : "reborn_user")}.rb_employee e1 on o.LureEmpId = e1.EmployeeId" : "")}
......
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