| | |
| | | fromSouce += " Inner Join Pay_TradingSingle as ts On(ob.Keyid = ts.OrderId) "; |
| | | fromSouce += " Inner Join OA_CorporateClients as oc On(ob.BuyerId = oc.Keyid) "; |
| | | fromSouce += " left join EC_AwbInfo ea on ob.Keyid = ea.Keyid where DATEDIFF(DAY,ob.CreateTime,'" + chaxuntimestart + "') <=0 and DATEDIFF(DAY,ob.CreateTime,'" + chaxuntimeend + "') >=0 and ob.PayState = -1 "; |
| | | fromSouce += " group by oc.BusinessManagerId ) obhuikuan on os.Keyid = ob.BusinessManagerId "; |
| | | fromSouce += " group by oc.BusinessManagerId ) obhuikuan on os.Keyid = obhuikuan.BusinessManagerId "; |
| | | |
| | | |
| | | fromSouce += " left join ( select oc.BusinessManagerId ,COUNT( distinct ob.BuyerId ) as weihuikuankehu "; |
| | |
| | | fromSouce += " Inner Join Pay_TradingSingle as ts On(ob.Keyid = ts.OrderId) "; |
| | | fromSouce += " Inner Join OA_CorporateClients as oc On(ob.BuyerId = oc.Keyid) "; |
| | | fromSouce += " left join EC_AwbInfo ea on ob.Keyid = ea.Keyid where DATEDIFF(DAY,ob.CreateTime,'" + chaxuntimestart + "') <=0 and DATEDIFF(DAY,ob.CreateTime,'" + chaxuntimeend + "') >=0 and ob.PayState != -1 "; |
| | | fromSouce += " group by oc.BusinessManagerId ) obweihuikuan on os.Keyid = ob.BusinessManagerId "; |
| | | fromSouce += " group by oc.BusinessManagerId ) obweihuikuan on os.Keyid = obweihuikuan.BusinessManagerId "; |
| | | |
| | | |
| | | fromSouce += " left join ( select oc.BusinessManagerId,sum(ob.SumPrice) kaipiaojine "; |