修改查询

This commit is contained in:
yangjun 2023-09-04 21:41:28 +08:00
parent 29cbb8ee5c
commit 33d75d47ad
1 changed files with 6 additions and 3 deletions

View File

@ -897,11 +897,14 @@
<select id="getUserTingkeInfo" resultType="org.jeecg.modules.kc.tktj.entity.KcTingke">
select xb.gh as userid,xb.xm as username,tkyq.yskcs as tkyq,count(tk.id) as sjtksl
select xb.gh as userid,xb.xm as username,tkyq.yskcs as tkyq,tk.sjtksl AS sjtksl
from xxhbuser xb
LEFT JOIN (select gh,max(ytkcs) yskcs from kc_export_config_tpkwcqkjzglx where gh = #{userid} and xqxn = #{xnxq}) tkyq on xb.gh = tkyq.gh
LEFT JOIN kc_evaluation tk on xb.gh = tk.upuserid
where tk.up_date >= #{startTime} and tk.up_date &lt;= concat(#{endTime},' 23:59:59') and tk.upuserid = #{userid}
LEFT JOIN (
select count(*) as sjtksl,upuserid from kc_evaluation where up_timestamp >= #{startTime} AND up_timestamp &lt;= concat(#{endTime},' 23:59:59')
GROUP BY upuserid
) tk on xb.gh = tk.upuserid
AND xb.gh =#{userid}
ORDER BY tkyq.yskcs desc
</select>