应收账单功能实现

This commit is contained in:
caojia
2026-09-16 11:02:18 +08:00
parent 58d13904ec
commit 7172621fd3
64 changed files with 4103 additions and 4 deletions
@@ -0,0 +1,52 @@
<?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.ar.mapper.ArBillExportMapper">
<resultMap id="ArBillExportResult" type="ArBillExport">
<id property="exportId" column="export_id"/>
<result property="arBillId" column="ar_bill_id"/>
<result property="fileName" column="file_name"/>
<result property="fileType" column="file_type"/>
<result property="templateCode" column="template_code"/>
<result property="templateVersion" column="template_version"/>
<result property="storageKey" column="storage_key"/>
<result property="fileSize" column="file_size"/>
<result property="fileHash" column="file_hash"/>
<result property="rowCount" column="row_count"/>
<result property="exportStatus" column="export_status"/>
<result property="exportBy" column="export_by"/>
<result property="exportTime" column="export_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectExportColumns">
select export_id, ar_bill_id, file_name, file_type, template_code, template_version,
storage_key, file_size, file_hash, row_count, export_status, export_by, export_time, remark
from ar_bill_export
</sql>
<select id="selectByBillId" parameterType="long" resultMap="ArBillExportResult">
<include refid="selectExportColumns"/> where ar_bill_id = #{arBillId} order by export_time desc
</select>
<select id="selectById" parameterType="long" resultMap="ArBillExportResult">
<include refid="selectExportColumns"/> where export_id = #{exportId}
</select>
<select id="selectLatestSuccessByBillId" parameterType="long" resultMap="ArBillExportResult">
<include refid="selectExportColumns"/>
where ar_bill_id = #{arBillId} and export_status = 'SUCCESS'
order by export_time desc limit 1
</select>
<insert id="insert" parameterType="ArBillExport" useGeneratedKeys="true" keyProperty="exportId">
insert into ar_bill_export (
ar_bill_id, file_name, file_type, template_code, template_version, storage_key,
file_size, file_hash, row_count, export_status, export_by, export_time, remark
) values (
#{arBillId}, #{fileName}, #{fileType}, #{templateCode}, #{templateVersion}, #{storageKey},
#{fileSize}, #{fileHash}, #{rowCount}, #{exportStatus}, #{exportBy}, sysdate(), #{remark}
)
</insert>
</mapper>