✨ 新增应收账单按角色和客户归属的行级数据权限

This commit is contained in:
caojia
2026-10-29 16:42:28 +08:00
parent b091d47f64
commit 02c49e3efe
30 changed files with 587 additions and 72 deletions
@@ -77,22 +77,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where writeoff_id = #{writeoffId} and status = #{effectiveStatus}
</update>
<select id="selectWriteoffList" parameterType="ArBalanceWriteoff" resultMap="ArBalanceWriteoffResult">
<select id="selectWriteoffList" resultMap="ArBalanceWriteoffResult">
<include refid="selectColumns"/>
<where>
<if test="customerId != null">and w.customer_id = #{customerId}</if>
<if test="arBillId != null">and w.ar_bill_id = #{arBillId}</if>
<if test="status != null and status != ''">and w.status = #{status}</if>
<if test="currency != null and currency != ''">and w.currency = #{currency}</if>
<if test="writeoffNo != null and writeoffNo != ''">and w.writeoff_no like concat('%', #{writeoffNo}, '%')</if>
<if test="billNo != null and billNo != ''">and w.bill_no like concat('%', #{billNo}, '%')</if>
<if test="receiptId != null">and w.receipt_id = #{receiptId}</if>
<if test="params != null and params.beginTime != null and params.beginTime != ''">
and date_format(w.writeoff_date,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
<if test="query.customerId != null">and w.customer_id = #{query.customerId}</if>
<if test="query.arBillId != null">and w.ar_bill_id = #{query.arBillId}</if>
<if test="query.status != null and query.status != ''">and w.status = #{query.status}</if>
<if test="query.currency != null and query.currency != ''">and w.currency = #{query.currency}</if>
<if test="query.writeoffNo != null and query.writeoffNo != ''">and w.writeoff_no like concat('%', #{query.writeoffNo}, '%')</if>
<if test="query.billNo != null and query.billNo != ''">and w.bill_no like concat('%', #{query.billNo}, '%')</if>
<if test="query.receiptId != null">and w.receipt_id = #{query.receiptId}</if>
<if test="query.params != null and query.params.beginTime != null and query.params.beginTime != ''">
and date_format(w.writeoff_date,'%y%m%d') &gt;= date_format(#{query.params.beginTime},'%y%m%d')
</if>
<if test="params != null and params.endTime != null and params.endTime != ''">
and date_format(w.writeoff_date,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
<if test="query.params != null and query.params.endTime != null and query.params.endTime != ''">
and date_format(w.writeoff_date,'%y%m%d') &lt;= date_format(#{query.params.endTime},'%y%m%d')
</if>
<include refid="com.bms.ar.mapper.ArBillScopeMapper.billScope"/>
</where>
order by w.create_time desc, w.writeoff_id desc
</select>