浏览代码

财务-结算单列表修改销售人员名称

yangzian 3 年之前
父节点
当前提交
3c29419478

+ 2 - 2
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/SettlementFileInfoMapper.xml

@@ -105,8 +105,8 @@
         IFNULL(cwjs.account_id,f.account_id) as accountId,
         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,
         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,
         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,
         f.create_user_id as operateUserId,
         ( SELECT su.realname FROM sys_user su WHERE su.id = f.create_user_id LIMIT 1 ) operateUserName,
         ( SELECT su.realname FROM sys_user su WHERE su.id = f.create_user_id LIMIT 1 ) operateUserName,
         cwjs.create_time,
         cwjs.create_time,