@@ -316,7 +316,7 @@ or (t.OrderStatus =6 and t.LossFinishTime <='{demodel.FinishETime} 23:59:59'))";
stringsql=$@"
SELECT t.*,cd.Commission
FROM RB_Ticket_Order t
left JOIN {(Config.IsOnline?"uat_reborn_dmc":"reborn_dmc")}.rb_appoint_op aop on aop.OrderId=o.OrderId and aop.ResourceType=8
left JOIN {(Config.IsOnline?"uat_reborn_dmc":"reborn_dmc")}.rb_appoint_op aop on aop.OrderId=t.OrderId and aop.ResourceType=8
left join (select d.OrderId,sum(d.Commission) as Commission from rb_ticket_commission_details d where d.Status =0 group by d.OrderId) cd on t.OrderId = cd.OrderId
WHERE {where}
group by t.OrderId
...
...
@@ -445,7 +445,7 @@ SELECT sum(case when t2.OrderStatus <>2 then t2.Money else 0 end) as Money
,sum(case when t2.OrderStatus =2 then t2.GuestCount else 0 end) as CancelNum
select t.* from(
FROM RB_Ticket_Order t
left JOIN {(Config.IsOnline?"uat_reborn_dmc":"reborn_dmc")}.rb_appoint_op aop on aop.OrderId=o.OrderId and aop.ResourceType=8
left JOIN {(Config.IsOnline?"uat_reborn_dmc":"reborn_dmc")}.rb_appoint_op aop on aop.OrderId=t.OrderId and aop.ResourceType=8