统一修改ruoyi->bms

This commit is contained in:
caojia
2026-09-28 10:02:38 +08:00
parent 341afc4111
commit 0408b6c35e
639 changed files with 2776 additions and 2807 deletions
@@ -0,0 +1,94 @@
<?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.bms.ar.mapper.ArBillLogMapper">
<resultMap id="ArBillLogResult" type="ArBillLog">
<id property="logId" column="log_id"/>
<result property="arBillId" column="ar_bill_id"/>
<result property="objectType" column="object_type"/>
<result property="objectId" column="object_id"/>
<result property="objectDisplay" column="object_display"/>
<result property="operationType" column="operation_type"/>
<result property="operationDesc" column="operation_desc"/>
<result property="fromStatus" column="from_status"/>
<result property="toStatus" column="to_status"/>
<result property="beforeData" column="before_data"/>
<result property="afterData" column="after_data"/>
<result property="operatorId" column="operator_id"/>
<result property="operatorName" column="operator_name"/>
<result property="operationSource" column="operation_source"/>
<result property="requestId" column="request_id"/>
<result property="traceId" column="trace_id"/>
<result property="result" column="result"/>
<result property="errorMessage" column="error_message"/>
<result property="clientIp" column="client_ip"/>
<result property="createTime" column="create_time"/>
</resultMap>
<select id="selectList" parameterType="ArBillLog" resultMap="ArBillLogResult">
select l.log_id, l.ar_bill_id, l.object_type, l.object_id, l.operation_type, l.operation_desc,
case l.object_type
when 'BILL' then b.bill_no
when 'EXPORT' then coalesce(e.file_name, b.bill_no)
when 'BALANCE_WRITEOFF' then bw.writeoff_no
else null
end as object_display,
l.from_status, l.to_status, l.before_data, l.after_data, l.operator_id, l.operator_name,
l.operation_source, l.request_id, l.trace_id, l.result, l.error_message, l.client_ip, l.create_time
from ar_bill_log l
left join ar_bill b on b.ar_bill_id = l.ar_bill_id
left join ar_bill_export e on e.export_id = case when l.object_type = 'EXPORT' then cast(l.object_id as
unsigned) end
left join ar_balance_writeoff bw on bw.writeoff_id = case when l.object_type = 'BALANCE_WRITEOFF' then
cast(l.object_id as unsigned) end
<where>
<if test="arBillId != null">and l.ar_bill_id = #{arBillId}</if>
<if test="objectType != null and objectType != ''">and l.object_type = #{objectType}</if>
<if test="objectId != null and objectId != ''">and l.object_id = #{objectId}</if>
<if test="operationType != null and operationType != ''">and l.operation_type = #{operationType}</if>
<if test="operationSource != null and operationSource != ''">and l.operation_source = #{operationSource}
</if>
<if test="requestId != null and requestId != ''">and l.request_id = #{requestId}</if>
<if test="result != null and result != ''">and l.result = #{result}</if>
</where>
order by l.create_time desc, l.log_id desc
</select>
<select id="selectSuccessByRequestId" resultMap="ArBillLogResult">
select log_id,
ar_bill_id,
object_type,
object_id,
operation_type,
operation_desc,
from_status,
to_status,
before_data,
after_data,
operator_id,
operator_name,
operation_source,
request_id,
trace_id,
result,
error_message,
client_ip,
create_time
from ar_bill_log
where request_id = #{requestId}
and object_type = #{objectType}
and result = #{result}
order by log_id limit 1
</select>
<insert id="insert" parameterType="ArBillLog" useGeneratedKeys="true" keyProperty="logId">
insert into ar_bill_log (ar_bill_id, object_type, object_id, operation_type, operation_desc, from_status,
to_status,
before_data, after_data, operator_id, operator_name, operation_source, request_id,
trace_id, result, error_message, client_ip, create_time)
values (#{arBillId}, #{objectType}, #{objectId}, #{operationType}, #{operationDesc}, #{fromStatus}, #{toStatus},
#{beforeData}, #{afterData}, #{operatorId}, #{operatorName}, #{operationSource}, #{requestId},
#{traceId}, #{result}, #{errorMessage}, #{clientIp}, sysdate())
</insert>
</mapper>