BMS计费管理列表查询数据隔离

This commit is contained in:
秦鸿展
2026-02-25 11:45:09 +08:00
parent 1426aa9d11
commit bcc777539a
7 changed files with 147 additions and 13 deletions
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SUM( IF(account_expense_type=1,billing_amount,0)) receivable,
SUM( IF(account_expense_type=2,billing_amount,0)) feesPayable,
WM_CONCAT(billing_state) AS billingStateCount,
settlement_entity,settlement_customers_code,SUM(billing_amount) bill_amount_sum,account_expense_type,COUNT(settlement_customers_code) count_fee,MIN(business_date) business_start_date ,MAX(business_date) business_end_date,organization_name,top_organization_id,billing_state,update_by_name,update_by,update_time,create_by_name,create_by,create_time
settlement_entity,settlement_customers_code,SUM(billing_amount) bill_amount_sum,account_expense_type,COUNT(settlement_customers_code) count_fee,MIN(business_date) business_start_date ,MAX(business_date) business_end_date,MAX(organization_id) organization_id,organization_name,top_organization_id,billing_state,update_by_name,update_by,update_time,create_by_name,create_by,create_time
from billing_statement
where del_flag = 1
<include refid="collect_where"/>
@@ -102,6 +102,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="billingStatementDO.createByName != null and billingStatementDO.createByName != ''">
AND create_by_name like concat('%', #{billingStatementDO.createByName}, '%')
</if>
<if test="billingStatementDO.organizationId != null">
AND organization_id = #{billingStatementDO.organizationId}
</if>
<if test="billingStatementDO.topOrganizationId != null and billingStatementDO.topOrganizationId != ''">
AND top_organization_id = #{billingStatementDO.topOrganizationId}
</if>
@@ -234,6 +237,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="billingStatementCollectDO.billingState == null or billingStatementCollectDO.billingState == ''">
and billing_state <![CDATA[<]]> 4
</if>
<if test="billingStatementCollectDO.organizationId != null">
and organization_id = #{billingStatementCollectDO.organizationId}
</if>
<if test="billingStatementCollectDO.topOrganizationId != null and billingStatementCollectDO.topOrganizationId != ''">
and top_organization_id = #{billingStatementCollectDO.topOrganizationId}
</if>
<if test="billingStatementCollectDO.organizationName != null and billingStatementCollectDO.organizationName != ''">
and organization_name = #{billingStatementCollectDO.organizationName}
</if>