|
@@ -105,8 +105,8 @@
|
|
|
IFNULL(cwjs.account_id,f.account_id) as accountId,
|
|
|
IFNULL((SELECT u.auth_name from ctop_user_allocation u where u.account_id = f.account_id),cwjs.account_name) as accountName,
|
|
|
f.del_flag,
|
|
|
- cwjs.create_user_id as saleUserId,
|
|
|
- ( SELECT su.realname FROM sys_user su WHERE su.id = cwjs.create_user_id LIMIT 1 ) saleUserName,
|
|
|
+ IFNULL((SELECT cp.sale_id from ctop_user_allocation ua, ctop_project cp where f.account_id = ua.account_id and ua.project_id = cp.id),cwjs.create_user_id) as saleUserId,
|
|
|
+ IFNULL((SELECT su.realname from ctop_user_allocation ua, ctop_project cp,sys_user su where f.account_id = ua.account_id and ua.project_id = cp.id and cp.sale_id = su.id), (SELECT su.realname FROM sys_user su WHERE su.id = cwjs.create_user_id LIMIT 1 )) as saleUserName,
|
|
|
f.create_user_id as operateUserId,
|
|
|
( SELECT su.realname FROM sys_user su WHERE su.id = f.create_user_id LIMIT 1 ) operateUserName,
|
|
|
cwjs.create_time,
|