Commit 798f9978 by zhangxingmin

薪资拆分-相关接口

parent d2a0364c
...@@ -64,7 +64,7 @@ public class ApiSalarySplitSummaryPageDto { ...@@ -64,7 +64,7 @@ public class ApiSalarySplitSummaryPageDto {
private Date fortuneAccountDate; private Date fortuneAccountDate;
/** /**
* 出账月(出账日期+2个月 * 出账月(出账日期格式化:2026-03-30 变成 202603
*/ */
private String fortuneAccountMonth; private String fortuneAccountMonth;
......
...@@ -26,9 +26,12 @@ ...@@ -26,9 +26,12 @@
ss.bill_org, ss.bill_org,
fa.status, fa.status,
fa.amount, fa.amount,
fa.currency fa.currency,
DATE_FORMAT(fa.fortune_account_date, '%Y%m') as fortune_account_month
from salary_split ss from salary_split ss
inner join fortune_account fa on ss.fortune_account_biz_id = fa.fortune_account_biz_id and fa.is_deleted = 0 inner join fortune_account fa
on ss.fortune_account_biz_id = fa.fortune_account_biz_id
and fa.is_deleted = 0
<where> <where>
<if test="request.brokerName != null and request.brokerName != ''"> <if test="request.brokerName != null and request.brokerName != ''">
and ss.broker_name like concat('%', #{request.brokerName}, '%') and ss.broker_name like concat('%', #{request.brokerName}, '%')
...@@ -37,6 +40,15 @@ ...@@ -37,6 +40,15 @@
and fa.status = #{request.status} and fa.status = #{request.status}
</if> </if>
<!-- 开始月份:大于等于该月第一天 -->
<if test="request.startMonth != null">
and fa.fortune_account_date >= STR_TO_DATE(CONCAT(#{request.startMonth}, '01'), '%Y%m%d')
</if>
<!-- 结束月份:小于下月第一天(包含该月全部日期) -->
<if test="request.endMonth != null">
and fa.fortune_account_date &lt; DATE_ADD(STR_TO_DATE(CONCAT(#{request.endMonth}, '01'), '%Y%m%d'), INTERVAL 1 MONTH)
</if>
and ss.is_deleted = 0 and ss.is_deleted = 0
</where> </where>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment