This commit is contained in:
2025-03-09 20:15:50 +08:00
parent 6cfa7d7528
commit dfb195255b
9 changed files with 74 additions and 39 deletions

View File

@@ -45,18 +45,13 @@
AND YEAR(osi.sign_time) = YEAR(#{payTime})
AND MONTH(osi.sign_time) = MONTH(#{payTime})
LEFT JOIN sys_user su ON os.user_id = su.user_id
<!-- 这里使用 <where> 标签统一管理条件 -->
<where>
YEAR(os.pay_time) = YEAR(#{payTime})
AND MONTH(os.pay_time) = MONTH(#{payTime})
<!-- 如果 ew 中带了自定义条件,就在这里追加 -->
<if test="ew != null and ew.customSqlSegment != null and ew.customSqlSegment != ''">
AND ${ew.customSqlSegment}
</if>
</where>
GROUP BY
os.salary_id,
os.user_id,