数据权限的bug修改260113
This commit is contained in:
@@ -715,17 +715,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="batchAddVerification" parameterType="java.util.List">
|
||||
insert into verification
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
branch_id,
|
||||
mail_branch,
|
||||
arrive_branch,
|
||||
verification_status,
|
||||
business_document_detali_id,
|
||||
business_document_detali_number,
|
||||
business_document_id,
|
||||
business_document_number,
|
||||
business_type,
|
||||
inner_number,
|
||||
enter_account_time,
|
||||
expense_item,
|
||||
first_subject,
|
||||
second_subject,
|
||||
first_subject_name,
|
||||
second_subject_name,
|
||||
verification_money,
|
||||
audit_remark,
|
||||
pay_id,
|
||||
pay_person,
|
||||
pay_channel,
|
||||
@@ -734,26 +738,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
pay_way_name,
|
||||
bank_number,
|
||||
receipt_number,
|
||||
collection_remark,
|
||||
cancel_collection_remark,
|
||||
pay_remark,
|
||||
waybill_id,
|
||||
waybill_number,
|
||||
waybill_remark,
|
||||
waybill_source,
|
||||
waybill_source_name,
|
||||
revenue_expenses_number,
|
||||
enter_account_id,
|
||||
enter_account_name,
|
||||
cancel_after_verification_id,
|
||||
cancel_after_verification_name,
|
||||
cancel_after_verification_time,
|
||||
cancel_after_verification_type,
|
||||
verification_type,
|
||||
vehicle_id,
|
||||
vehicle_license_plate_number,
|
||||
driver_name,
|
||||
images,
|
||||
account_holder_bank,
|
||||
organization_id,
|
||||
top_organization_id,
|
||||
organization_name,
|
||||
department_id,
|
||||
department_name,
|
||||
payee,
|
||||
pay_name,
|
||||
pay_type,
|
||||
license_number,
|
||||
bill_remarks,
|
||||
payment_method,
|
||||
fuel_card_number,
|
||||
create_time,
|
||||
create_by,
|
||||
create_by_name,
|
||||
@@ -765,17 +763,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{item.branchId},
|
||||
#{item.mailBranch},
|
||||
#{item.arriveBranch},
|
||||
#{item.verificationStatus},
|
||||
#{item.businessDocumentDetaliId},
|
||||
#{item.businessDocumentDetaliNumber},
|
||||
#{item.businessDocumentId},
|
||||
#{item.businessDocumentNumber},
|
||||
#{item.businessType},
|
||||
#{item.innerNumber},
|
||||
#{item.enterAccountTime},
|
||||
#{item.expenseItem},
|
||||
#{item.firstSubject},
|
||||
#{item.secondSubject},
|
||||
#{item.firstSubjectName},
|
||||
#{item.secondSubjectName},
|
||||
#{item.verificationMoney},
|
||||
#{item.auditRemark},
|
||||
#{item.payId},
|
||||
#{item.payPerson},
|
||||
#{item.payChannel},
|
||||
@@ -784,26 +786,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.payWayName},
|
||||
#{item.bankNumber},
|
||||
#{item.receiptNumber},
|
||||
#{item.collectionRemark},
|
||||
#{item.cancelCollectionRemark},
|
||||
#{item.payRemark},
|
||||
#{item.waybillId},
|
||||
#{item.waybillNumber},
|
||||
#{item.waybillRemark},
|
||||
#{item.waybillSource},
|
||||
#{item.waybillSourceName},
|
||||
#{item.revenueExpensesNumber},
|
||||
#{item.enterAccountId},
|
||||
#{item.enterAccountName},
|
||||
#{item.cancelAfterVerificationId},
|
||||
#{item.cancelAfterVerificationName},
|
||||
#{item.cancelAfterVerificationTime},
|
||||
#{item.cancelAfterVerificationType},
|
||||
#{item.verificationType},
|
||||
#{item.vehicleId},
|
||||
#{item.vehicleLicensePlateNumber},
|
||||
#{item.driverName},
|
||||
#{item.images},
|
||||
#{item.accountHolderBank},
|
||||
#{item.organizationId},
|
||||
#{item.topOrganizationId},
|
||||
#{item.organizationName},
|
||||
#{item.departmentId},
|
||||
#{item.departmentName},
|
||||
#{item.payee},
|
||||
#{item.payName},
|
||||
#{item.payType},
|
||||
#{item.licenseNumber},
|
||||
#{item.billRemarks},
|
||||
#{item.paymentMethod},
|
||||
#{item.fuelCardNumber},
|
||||
#{item.createTime},
|
||||
#{item.createBy},
|
||||
#{item.createByName},
|
||||
@@ -1015,19 +1011,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectVerificationVo"/>
|
||||
<where>
|
||||
and v.del_flag = 1
|
||||
<!-- 组织查询条件:南光组织查所有,其他组织查自己 -->
|
||||
<!-- 组织查询条件:南光组织(organizationId=2827)查所有,其他组织查自己 -->
|
||||
<if test="organizationId != null">
|
||||
<choose>
|
||||
<!-- 南光组织判断:如果topOrganizationId为null,则为顶级组织(南光组织),查所有 -->
|
||||
<when test="topOrganizationId == null">
|
||||
<!-- 南光组织查所有数据,不添加组织过滤条件 -->
|
||||
<!-- 南光组织查询所有数据:topOrganizationId为null且organizationId=2827(这种情况不应该出现,因为查询所有时organizationId为null) -->
|
||||
<!-- 但为了兼容性,保留此判断 -->
|
||||
<when test="topOrganizationId == null and organizationId == 2827">
|
||||
<!-- 南光组织查询所有数据,不添加组织过滤条件 -->
|
||||
<!-- 如果organizationName为null,根据组织ID查询时不显示organizationName为null的数据 -->
|
||||
<if test="organizationName == null or organizationName == ''">
|
||||
AND v.organization_name IS NOT NULL
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<!-- 其他组织只查自己组织的数据 -->
|
||||
<!-- 其他情况:查询指定组织的数据(包括南光组织查询指定组织的情况,此时topOrganizationId=-1) -->
|
||||
AND v.organization_id = #{organizationId}
|
||||
<!-- organizationName为null时,根据组织ID查询时不显示organizationName为null的数据 -->
|
||||
<if test="organizationName == null or organizationName == ''">
|
||||
@@ -1036,6 +1033,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<!-- 如果 organizationId 为 null,表示查询所有组织的数据(南光组织查询全部) -->
|
||||
<if test="organizationId == null">
|
||||
<!-- 查询所有组织的数据,只过滤 organization_name 不为 null 的数据 -->
|
||||
AND v.organization_name IS NOT NULL
|
||||
</if>
|
||||
<if test="businessDocumentNumberList != null and businessDocumentNumberList.size() != 0">
|
||||
AND v.business_document_number in
|
||||
<foreach item="waybill" collection="businessDocumentNumberList" open="(" separator="," close=")">
|
||||
|
||||
Reference in New Issue
Block a user