2026-09-15 15:50:24 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "com.ruoyi.warehouse.mapper.PurchaseRequestMapper" >
<resultMap type= "PurchaseRequest" id= "PurchaseRequestResult" >
<id property= "id" column= "id" />
2026-11-09 09:12:26 +08:00
<result property= "creatorName" column= "creator_name" />
<result property= "batchCreateBy" column= "batch_create_by" />
<result property= "batchCreatorName" column= "batch_creator_name" />
2026-09-15 15:50:24 +08:00
<result property= "requestNo" column= "request_no" />
<result property= "productId" column= "product_id" />
2026-10-12 16:41:42 +08:00
<result property= "productionTaskId" column= "production_task_id" />
2026-10-13 09:41:46 +08:00
<result property= "productionTaskNo" column= "production_task_no" />
2026-10-12 16:41:42 +08:00
<result property= "historical" column= "historical" /> <result property= "originalDate" column= "original_date" />
<result property= "supplierId" column= "supplier_id" /> <result property= "supplierName" column= "supplier_name" />
<result property= "purchasePurpose" column= "purchase_purpose" /> <result property= "loanId" column= "loan_id" />
2026-09-15 15:50:24 +08:00
<result property= "purchaseBatchId" column= "purchase_batch_id" />
2026-09-28 10:55:48 +08:00
<result property= "projectId" column= "project_id" />
<result property= "projectCode" column= "project_code" />
<result property= "projectName" column= "project_name" />
<result property= "expenseCategoryId" column= "expense_category_id" />
<result property= "expenseCategoryCode" column= "expense_category_code" />
<result property= "expenseCategoryName" column= "expense_category_name" />
2026-09-15 15:50:24 +08:00
<result property= "materialName" column= "material_name" />
<result property= "materialBrand" column= "material_brand" />
<result property= "category" column= "category" />
<result property= "materialParams" column= "material_params" />
<result property= "purchaseLink" column= "purchase_link" />
<result property= "quantity" column= "quantity" />
2026-09-28 10:55:48 +08:00
<result property= "estimatedUnitPrice" column= "estimated_unit_price" />
<result property= "estimatedAmount" column= "estimated_amount" />
2026-10-12 16:41:42 +08:00
<result property= "finalUnitPrice" column= "final_unit_price" />
2026-10-20 10:04:17 +08:00
<result property= "actualUnitPrice" column= "actual_unit_price" />
2026-10-12 16:41:42 +08:00
<result property= "priceLocked" column= "price_locked" />
<result property= "lockedAmount" column= "locked_amount" />
<result property= "lockRevision" column= "lock_revision" />
2026-09-15 15:50:24 +08:00
<result property= "unit" column= "unit" />
<result property= "applicantId" column= "applicant_id" />
<result property= "applicantName" column= "applicant_name" />
<result property= "purchaseStatus" column= "purchase_status" />
<result property= "purchaseBatchNo" column= "purchase_batch_no" />
2026-10-09 17:32:04 +08:00
<result property= "purchaseBatchName" column= "purchase_batch_name" />
2026-09-15 15:50:24 +08:00
<result property= "progressRemark" column= "progress_remark" />
<result property= "productRemark" column= "product_remark" />
<result property= "requestRemark" column= "remark" />
<result property= "remark" column= "remark" />
<result property= "createBy" column= "create_by" />
<result property= "createTime" column= "create_time" />
<result property= "updateBy" column= "update_by" />
<result property= "updateTime" column= "update_time" />
<result property= "productCode" column= "product_code" />
<result property= "productName" column= "product_name" />
<result property= "productBrand" column= "product_brand" />
<result property= "productCategory" column= "product_category" />
<result property= "productSpec" column= "product_spec" />
<result property= "acceptedQuantity" column= "accepted_quantity" />
<result property= "pendingArrivalQuantity" column= "pending_arrival_quantity" />
2026-10-12 16:41:42 +08:00
<result property= "receivedQuantity" column= "received_quantity" />
2026-09-15 15:50:24 +08:00
<result property= "remainingQuantity" column= "remaining_quantity" />
</resultMap>
2026-10-09 17:32:04 +08:00
<resultMap type= "com.ruoyi.warehouse.domain.PurchaseTaskSummary" id= "PurchaseTaskSummaryResult" >
<result property= "totalCount" column= "total_count" />
<result property= "pendingCount" column= "pending_count" />
<result property= "orderedCount" column= "ordered_count" />
<result property= "purchasingCount" column= "purchasing_count" />
<result property= "partialCount" column= "partial_count" />
<result property= "completedCount" column= "completed_count" />
<result property= "cancelledCount" column= "cancelled_count" />
<result property= "pendingAcceptanceCount" column= "pending_acceptance_count" />
</resultMap>
2026-09-15 15:50:24 +08:00
<sql id= "selectPurchaseRequestVo" >
2026-11-09 09:12:26 +08:00
select pr.id, pr.request_no, pr.product_id, pr.purchase_batch_id,pb.create_by batch_create_by,
(select u.nick_name from sys_user u where convert(u.user_name using utf8mb4) collate utf8mb4_unicode_ci=convert(pr.create_by using utf8mb4) collate utf8mb4_unicode_ci limit 1) creator_name,
(select u.nick_name from sys_user u where convert(u.user_name using utf8mb4) collate utf8mb4_unicode_ci=convert(pb.create_by using utf8mb4) collate utf8mb4_unicode_ci limit 1) batch_creator_name,
pb.supplier_id,(select s.name from supplier_info s where s.id=pb.supplier_id) supplier_name,(select task_no from production_task where id=pr.production_task_id) production_task_no,
2026-10-12 16:41:42 +08:00
pr.purchase_purpose,pr.loan_id,pr.production_task_id,pr.historical,pr.original_date,
2026-09-28 10:55:48 +08:00
pr.project_id, project.project_code, project.project_name,
pr.expense_category_id, ec.category_code as expense_category_code,
ec.category_name as expense_category_name,
pr.material_name, pr.material_brand, pr.category, pr.material_params,
pr.purchase_link, pr.quantity, pr.estimated_unit_price, pr.estimated_amount,
2026-10-20 10:04:17 +08:00
pr.final_unit_price, pr.actual_unit_price, pr.price_locked, pr.locked_amount, pr.lock_revision,
2026-10-12 16:41:42 +08:00
pr.unit, pr.applicant_id,
2026-09-15 16:41:53 +08:00
coalesce(applicant_user.nick_name, pr.applicant_name) as applicant_name,
2026-10-09 17:32:04 +08:00
pr.purchase_status, pr.purchase_batch_no, pb.batch_name as purchase_batch_name,
pr.progress_remark, pr.remark,
2026-09-15 15:50:24 +08:00
pr.create_by, pr.create_time, pr.update_by, pr.update_time,
pi.product_code, pi.product_name, pi.brand as product_brand,
pi.category as product_category, pi.spec as product_spec, pi.remark as product_remark,
2026-10-12 16:41:42 +08:00
case when pr.historical=1 then pr.quantity else coalesce(pa.accepted_quantity, 0) end as accepted_quantity,
2026-09-15 15:50:24 +08:00
coalesce(pa.pending_quantity, 0) as pending_arrival_quantity,
2026-10-12 16:41:42 +08:00
coalesce((select sum(ir.in_num) from in_record ir where ir.purchase_request_id=pr.id and ir.in_status=1 and ir.receipt_root=0),0) as received_quantity,
case when pr.historical=1 then 0 else greatest(pr.quantity - coalesce(pa.accepted_quantity, 0) - coalesce(pa.pending_quantity, 0), 0) end as remaining_quantity
2026-09-15 15:50:24 +08:00
from purchase_request pr
left join product_info pi on pi.id = pr.product_id
2026-09-28 10:55:48 +08:00
left join project_info project on project.id = pr.project_id
left join expense_category ec on ec.id = pr.expense_category_id
2026-10-09 17:32:04 +08:00
left join purchase_batch pb on pb.id = pr.purchase_batch_id
2026-09-15 16:41:53 +08:00
left join sys_user applicant_user on applicant_user.user_id = pr.applicant_id
2026-09-15 15:50:24 +08:00
left join (
select purchase_request_id,
2026-10-12 16:41:42 +08:00
sum(case when acceptance_status = 1 then arrival_quantity-defective_quantity-returned_quantity else 0 end) as accepted_quantity,
2026-11-09 11:32:46 +08:00
sum(case when acceptance_status = 0 then arrival_quantity else 0 end) as pending_quantity,
min(case when acceptance_status = 0 then coalesce(arrival_date,create_time) end) as first_pending_time,
min(case when acceptance_status = 0 then create_time end) as first_pending_created_time
2026-09-15 15:50:24 +08:00
from purchase_arrival
2026-09-28 10:55:48 +08:00
where acceptance_status in (0, 1)
2026-09-15 15:50:24 +08:00
group by purchase_request_id
) pa on pa.purchase_request_id = pr.id
</sql>
2026-10-12 16:41:42 +08:00
<select id= "selectPurchaseSheetRows" resultMap= "PurchaseRequestResult" flushCache= "true" useCache= "false" >
<include refid= "selectPurchaseRequestVo" /> where pr.purchase_batch_id=#{batchId} and pr.del_flag='0' order by pr.id
</select>
2026-11-07 20:58:52 +08:00
<select id= "selectPurchaseRequestIdsByBatchForUpdate" resultType= "java.lang.Long" flushCache= "true" useCache= "false" >
select id from purchase_request where purchase_batch_id=#{batchId} and del_flag='0' order by id for update
</select>
2026-09-15 15:50:24 +08:00
<select id= "selectPurchaseRequestList" parameterType= "PurchaseRequest" resultMap= "PurchaseRequestResult" >
<include refid= "selectPurchaseRequestVo" />
<where >
2026-10-12 16:41:42 +08:00
pr.del_flag = '0'
2026-10-29 17:27:46 +08:00
<if test= "onlyMine == true" > and pr.create_by = #{createBy}</if>
2026-10-20 10:04:17 +08:00
<if test= "params.amountDisplay == true" > and (not exists(select 1 from sys_config adc where adc.config_key='wms.display.compactAmounts' and adc.config_value='true') or pr.final_unit_price is null or pr.final_unit_price< > 0)</if>
2026-09-15 15:50:24 +08:00
<if test= "requestNo != null and requestNo != ''" > and pr.request_no like concat('%', #{requestNo}, '%')</if>
<if test= "productId != null" > and pr.product_id = #{productId}</if>
2026-10-09 17:32:04 +08:00
<if test= "purchaseBatchId != null" > and pr.purchase_batch_id = #{purchaseBatchId}</if>
2026-10-12 16:41:42 +08:00
<if test= "unbatched != null and unbatched" > and pr.purchase_batch_id is null</if>
2026-09-28 10:55:48 +08:00
<if test= "projectId != null" > and pr.project_id = #{projectId}</if>
2026-10-12 16:41:42 +08:00
<if test= "supplierId != null" > and pb.supplier_id=#{supplierId}</if>
<if test= "productionTaskId != null" > and pr.production_task_id=#{productionTaskId}</if>
<if test= "notArrived != null and notArrived" > and pr.historical=0 and pr.purchase_status< > 5 and pr.quantity> coalesce(pa.accepted_quantity,0)</if>
2026-10-21 15:13:39 +08:00
<if test= "pendingRegistration != null and pendingRegistration" >
and pr.historical=0 and pr.purchase_status< > 5
and pr.price_locked=1 and pr.final_unit_price> =0 and pb.supplier_id is not null
and pr.quantity> coalesce(pa.accepted_quantity,0)+coalesce(pa.pending_quantity,0)
</if>
2026-10-12 16:41:42 +08:00
<if test= "notReceived != null and notReceived" > and pr.historical=0 and pr.purchase_status< > 5 and pr.quantity> coalesce((select sum(ir.in_num) from in_record ir where ir.purchase_request_id=pr.id and ir.in_status=1 and ir.receipt_root=0),0)</if>
2026-09-28 10:55:48 +08:00
<if test= "expenseCategoryId != null" > and pr.expense_category_id = #{expenseCategoryId}</if>
2026-09-15 15:50:24 +08:00
<if test= "materialName != null and materialName != ''" >
2026-09-28 10:55:48 +08:00
and convert(lower(concat_ws(' ', pr.material_name, pr.material_brand, pr.category, pr.material_params, pi.product_name, pi.product_code)) using utf8mb4) collate utf8mb4_bin
like concat('%', convert(lower(#{materialName}) using utf8mb4) collate utf8mb4_bin, '%')
2026-09-15 15:50:24 +08:00
</if>
<if test= "category != null and category != ''" > and pr.category like concat('%', #{category}, '%')</if>
<if test= "applicantId != null" > and pr.applicant_id = #{applicantId}</if>
2026-09-15 16:41:53 +08:00
<if test= "applicantName != null and applicantName != ''" >
and (pr.applicant_name like concat('%', #{applicantName}, '%')
or applicant_user.nick_name like concat('%', #{applicantName}, '%'))
</if>
2026-09-15 15:50:24 +08:00
<if test= "purchaseStatus != null" > and pr.purchase_status = #{purchaseStatus}</if>
2026-10-13 09:41:46 +08:00
<if test= "arrivalReady != null and arrivalReady" > and pr.price_locked=1 and pb.supplier_id is not null and pr.historical=0 and pr.purchase_status< > 5</if>
2026-10-12 16:41:42 +08:00
<if test= "priceLocked != null" > and pr.price_locked = #{priceLocked}</if>
2026-10-09 17:32:04 +08:00
<if test= "pendingAcceptance != null and pendingAcceptance" > and coalesce(pa.pending_quantity, 0) > 0</if>
2026-09-15 15:50:24 +08:00
<if test= "purchaseBatchNo != null and purchaseBatchNo != ''" > and pr.purchase_batch_no like concat('%', #{purchaseBatchNo}, '%')</if>
</where>
2026-11-09 11:32:46 +08:00
<choose >
<when test= "pendingAcceptance == true" >
order by coalesce(pa.first_pending_time,pr.create_time) asc,
coalesce(pa.first_pending_created_time,pr.create_time) asc, pr.id asc
</when>
<when test= "pendingRegistration == true or arrivalReady == true or notArrived == true or notReceived == true" >
order by pr.create_time asc, pr.id asc
</when>
<otherwise >
order by case when pr.purchase_status in (4,5) then 1 else 0 end,
pr.create_time desc, pr.id desc
</otherwise>
</choose>
2026-09-15 15:50:24 +08:00
</select>
2026-10-09 17:32:04 +08:00
<select id= "selectPurchaseTaskSummary" resultMap= "PurchaseTaskSummaryResult" >
select count(*) as total_count,
coalesce(sum(case when pr.purchase_status = 0 then 1 else 0 end), 0) as pending_count,
coalesce(sum(case when pr.purchase_status = 1 then 1 else 0 end), 0) as ordered_count,
coalesce(sum(case when pr.purchase_status = 2 then 1 else 0 end), 0) as purchasing_count,
coalesce(sum(case when pr.purchase_status = 3 then 1 else 0 end), 0) as partial_count,
coalesce(sum(case when pr.purchase_status = 4 then 1 else 0 end), 0) as completed_count,
coalesce(sum(case when pr.purchase_status = 5 then 1 else 0 end), 0) as cancelled_count,
coalesce(sum(case when coalesce(pa.pending_quantity, 0) > 0 then 1 else 0 end), 0) as pending_acceptance_count
from purchase_request pr
left join (
select purchase_request_id,
sum(case when acceptance_status = 0 then arrival_quantity else 0 end) as pending_quantity
from purchase_arrival
where acceptance_status = 0
group by purchase_request_id
) pa on pa.purchase_request_id = pr.id
2026-10-12 16:41:42 +08:00
where pr.del_flag = '0'
2026-10-20 10:04:17 +08:00
and (not exists(select 1 from sys_config adc where adc.config_key='wms.display.compactAmounts' and adc.config_value='true') or pr.final_unit_price is null or pr.final_unit_price< > 0)
2026-10-09 17:32:04 +08:00
</select>
2026-09-15 15:50:24 +08:00
<select id= "selectPurchaseRequestById" resultMap= "PurchaseRequestResult" >
<include refid= "selectPurchaseRequestVo" />
2026-10-12 16:41:42 +08:00
where pr.id = #{id} and pr.del_flag = '0'
2026-09-15 15:50:24 +08:00
<if test= "applicantId != null" > and pr.applicant_id = #{applicantId}</if>
</select>
2026-10-12 16:41:42 +08:00
<select id= "selectPurchaseRequestByIdForUpdate" parameterType= "Long" resultMap= "PurchaseRequestResult" flushCache= "true" useCache= "false" >
2026-09-28 10:55:48 +08:00
select pr.id, pr.request_no, pr.product_id, pr.purchase_batch_id, pr.project_id,
2026-11-09 09:12:26 +08:00
(select b.create_by from purchase_batch b where b.id=pr.purchase_batch_id) batch_create_by,
2026-10-12 16:41:42 +08:00
pr.purchase_purpose,pr.loan_id,pr.production_task_id,pr.historical,pr.original_date,
2026-09-28 10:55:48 +08:00
pr.expense_category_id, pr.material_name,
2026-09-15 15:50:24 +08:00
pr.material_brand, pr.category, pr.material_params, pr.purchase_link, pr.quantity,
2026-10-20 10:04:17 +08:00
pr.estimated_unit_price, pr.estimated_amount, pr.final_unit_price, pr.actual_unit_price,
2026-10-12 16:41:42 +08:00
pr.price_locked, pr.locked_amount, pr.lock_revision, pr.unit,
2026-09-28 10:55:48 +08:00
pr.applicant_id, pr.applicant_name, pr.purchase_status,
2026-09-15 15:50:24 +08:00
pr.purchase_batch_no, pr.progress_remark, pr.remark, pr.create_by, pr.create_time,
pr.update_by, pr.update_time
2026-10-12 16:41:42 +08:00
from purchase_request pr where pr.id = #{id} and pr.del_flag = '0' for update
2026-09-15 15:50:24 +08:00
</select>
<select id= "checkRequestNoUnique" parameterType= "String" resultMap= "PurchaseRequestResult" >
<include refid= "selectPurchaseRequestVo" /> where pr.request_no = #{requestNo} limit 1
</select>
<insert id= "insertPurchaseRequest" parameterType= "PurchaseRequest" useGeneratedKeys= "true" keyProperty= "id" >
insert into purchase_request(
2026-10-12 16:41:42 +08:00
request_no, product_id, project_id, expense_category_id,production_task_id,
2026-09-28 10:55:48 +08:00
material_name, material_brand, category, material_params, purchase_link,
2026-10-20 10:04:17 +08:00
quantity, estimated_unit_price, estimated_amount, final_unit_price, actual_unit_price, unit,
2026-09-28 10:55:48 +08:00
applicant_id, applicant_name, purchase_status, purchase_batch_no,
2026-10-12 16:41:42 +08:00
progress_remark, remark, create_by, create_time,purchase_purpose,loan_id
2026-09-15 15:50:24 +08:00
) values (
2026-10-12 16:41:42 +08:00
#{requestNo}, #{productId}, #{projectId}, #{expenseCategoryId},#{productionTaskId},
2026-09-28 10:55:48 +08:00
#{materialName}, #{materialBrand}, #{category}, #{materialParams}, #{purchaseLink},
2026-10-20 10:04:17 +08:00
#{quantity}, #{estimatedUnitPrice}, #{estimatedAmount}, #{finalUnitPrice}, #{actualUnitPrice}, #{unit},
2026-09-28 10:55:48 +08:00
#{applicantId}, #{applicantName}, #{purchaseStatus}, #{purchaseBatchNo},
2026-10-12 16:41:42 +08:00
#{progressRemark}, #{remark}, #{createBy}, sysdate(),coalesce(#{purchasePurpose},'SELF'),#{loanId}
2026-09-15 15:50:24 +08:00
)
</insert>
<update id= "updatePurchaseRequest" >
update purchase_request
<set >
<if test= "purchaseRequest.requestNo != null and purchaseRequest.requestNo != ''" > request_no = #{purchaseRequest.requestNo},</if>
product_id = #{purchaseRequest.productId},
2026-10-12 16:41:42 +08:00
production_task_id=#{purchaseRequest.productionTaskId},
purchase_purpose=coalesce(#{purchaseRequest.purchasePurpose},'SELF'),loan_id=#{purchaseRequest.loanId},
2026-09-28 10:55:48 +08:00
project_id = #{purchaseRequest.projectId},
expense_category_id = #{purchaseRequest.expenseCategoryId},
2026-09-15 15:50:24 +08:00
<if test= "purchaseRequest.materialName != null and purchaseRequest.materialName != ''" > material_name = #{purchaseRequest.materialName},</if>
<if test= "purchaseRequest.materialBrand != null" > material_brand = #{purchaseRequest.materialBrand},</if>
<if test= "purchaseRequest.category != null" > category = #{purchaseRequest.category},</if>
<if test= "purchaseRequest.materialParams != null" > material_params = #{purchaseRequest.materialParams},</if>
<if test= "purchaseRequest.purchaseLink != null" > purchase_link = #{purchaseRequest.purchaseLink},</if>
<if test= "purchaseRequest.quantity != null" > quantity = #{purchaseRequest.quantity},</if>
2026-09-28 10:55:48 +08:00
estimated_unit_price = #{purchaseRequest.estimatedUnitPrice},
estimated_amount = #{purchaseRequest.estimatedAmount},
2026-10-12 16:41:42 +08:00
final_unit_price = #{purchaseRequest.finalUnitPrice},
2026-10-20 10:04:17 +08:00
actual_unit_price = #{purchaseRequest.actualUnitPrice},
2026-09-15 15:50:24 +08:00
<if test= "purchaseRequest.unit != null" > unit = #{purchaseRequest.unit},</if>
<if test= "purchaseRequest.applicantId != null" > applicant_id = #{purchaseRequest.applicantId},</if>
<if test= "purchaseRequest.applicantName != null and purchaseRequest.applicantName != ''" > applicant_name = #{purchaseRequest.applicantName},</if>
<if test= "purchaseRequest.purchaseStatus != null" > purchase_status = #{purchaseRequest.purchaseStatus},</if>
<if test= "purchaseRequest.purchaseBatchNo != null" > purchase_batch_no = #{purchaseRequest.purchaseBatchNo},</if>
<if test= "purchaseRequest.progressRemark != null" > progress_remark = #{purchaseRequest.progressRemark},</if>
<if test= "purchaseRequest.remark != null" > remark = #{purchaseRequest.remark},</if>
<if test= "purchaseRequest.updateBy != null" > update_by = #{purchaseRequest.updateBy},</if>
update_time = sysdate()
</set>
where id = #{purchaseRequest.id}
<if test= "applicantId != null" > and applicant_id = #{applicantId}</if>
</update>
2026-10-20 10:04:17 +08:00
<update id= "updateActualUnitPrice" >
update purchase_request set actual_unit_price=#{actualUnitPrice},update_by=#{updateBy},update_time=sysdate() where id=#{id} and del_flag='0'
</update>
2026-09-15 15:50:24 +08:00
<delete id= "deletePurchaseRequestByIds" >
2026-10-12 16:41:42 +08:00
update purchase_request set del_flag = '2', update_time = sysdate() where id in
2026-09-15 15:50:24 +08:00
<foreach collection= "ids" item= "id" open= "(" separator= "," close= ")" > #{id}</foreach>
<if test= "applicantId != null" > and applicant_id = #{applicantId}</if>
</delete>
<update id= "updatePurchaseStatus" >
update purchase_request
set purchase_status = #{purchaseStatus},
progress_remark = #{progressRemark},
update_by = #{updateBy}, update_time = sysdate()
where id = #{id}
</update>
2026-10-12 16:41:42 +08:00
<select id= "countConfirmedInbound" parameterType= "Long" resultType= "int" >
select count(*) from in_record where purchase_request_id = #{id} and in_status = 1 and receipt_root=0
</select>
<update id= "updatePriceState" parameterType= "PurchaseRequest" >
update purchase_request set final_unit_price = #{finalUnitPrice},
price_locked = #{priceLocked}, locked_amount = #{lockedAmount}, lock_revision = #{lockRevision},
update_by = #{updateBy}, update_time = sysdate()
where id = #{id} and del_flag = '0' and lock_revision = #{lockRevision} - 1
</update>
<insert id= "insertPriceLedger" >
insert into purchase_price_ledger(purchase_request_id, revision, old_project_id, old_category_id,
new_project_id, new_category_id, old_amount, new_amount, operation, operator, new_ledger_no, old_ledger_no)
values(#{updated.id}, #{updated.lockRevision}, #{existing.projectId}, #{existing.expenseCategoryId},
#{updated.projectId}, #{updated.expenseCategoryId}, #{existing.lockedAmount},
#{updated.lockedAmount}, #{operation}, #{updated.updateBy}, #{newLedgerNo}, #{oldLedgerNo})
</insert>
2026-09-15 15:50:24 +08:00
</mapper>