feat: OCR 服务 + 会议材料模块
ry-ocr/ (新)
本地发票识别微服务 (PaddleOCR 3.x + FastAPI, 8801)
- QR 优先: 扫到二维码即取开票时间/发票号/金额; 没扫到/格式不合法直接判非发票, 不跑 OCR
- 配置 QR_FULL_OCR 控制快路径(false, 0.2s)还是全字段(true, 4.5s)
- /recognize/invoice (multipart) + /recognize/invoice/by-path (本地路径, 白名单) + /recognize/text
- is_invoice / from_qr / qr_raw / qr_error / error_code 字段
- 12 字段发票抽取 (regex + 启发式, 左右主体识别)
- 超时保护 (15s 单页 / 60s 总流程) + PaddleOCR 单例 + ThreadPoolExecutor
ry-api/ruoyi-business/
- pom.xml: 加 hutool-http/json/core 5.8.27, lombok 1.18.30 (OcrClient @Slf4j 所需)
- ocr/: OcrClient + InvoiceResult/Fields/Line + ZipExtractor + InvoiceOcrScheduler
- oss/: OssUploader + OssConfMeta (OCR 识别后重传 OSS)
- config/: OcrConfig + OcrExecutorConfig (后台线程池)
- service/impl/InvoiceOcrService: 后台提交 OCR, ZIP 路径解压识别, 替换场景先清旧
- 会议材料 CRUD 全套 (BizMeetingAuditLog/Executor/Invoice/Material/Supervisor):
controller + service + mapper + domain + xml
ry-vue3/
- MeetingDetail.vue (新建): 会议详情页 (含评分维度章节, 改只读)
- Meetings.vue / OssFileUploader.vue / router / Login.vue: 适配新字段
ry-api/ruoyi-admin/
- RuoYiApplication.java + application.yml: 启用 @Async 异步支持
_self/
- manager_meetings.md / manager_meeting_detail.md: 文档
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<?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.business.mapper.BizMeetingMaterialMapper">
|
||||
|
||||
<resultMap type="BizMeetingMaterial" id="BizMeetingMaterialResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="meetingId" column="meeting_id" />
|
||||
<result property="materialType" column="material_type" />
|
||||
<result property="subType" column="sub_type" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="ossUrl" column="oss_url" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectFields">
|
||||
select id, meeting_id, material_type, sub_type, file_name, oss_url, amount, creator_id, create_time
|
||||
from biz_meeting_material
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" resultMap="BizMeetingMaterialResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByMeetingId" resultMap="BizMeetingMaterialResult" parameterType="Long">
|
||||
<include refid="selectFields"/>
|
||||
where meeting_id = #{meetingId}
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="BizMeetingMaterial" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into biz_meeting_material
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="meetingId != null">meeting_id,</if>
|
||||
<if test="materialType != null and materialType != ''">material_type,</if>
|
||||
<if test="subType != null and subType != ''">sub_type,</if>
|
||||
<if test="fileName != null and fileName != ''">file_name,</if>
|
||||
<if test="ossUrl != null and ossUrl != ''">oss_url,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="meetingId != null">#{meetingId},</if>
|
||||
<if test="materialType != null and materialType != ''">#{materialType},</if>
|
||||
<if test="subType != null and subType != ''">#{subType},</if>
|
||||
<if test="fileName != null and fileName != ''">#{fileName},</if>
|
||||
<if test="ossUrl != null and ossUrl != ''">#{ossUrl},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" parameterType="java.util.List">
|
||||
insert into biz_meeting_material (meeting_id, material_type, sub_type, file_name, oss_url, amount, creator_id, create_time)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.meetingId}, #{item.materialType}, #{item.subType}, #{item.fileName}, #{item.ossUrl},
|
||||
#{item.amount}, #{item.creatorId}, #{item.createTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="BizMeetingMaterial">
|
||||
update biz_meeting_material
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="materialType != null and materialType != ''">material_type = #{materialType},</if>
|
||||
<if test="subType != null and subType != ''">sub_type = #{subType},</if>
|
||||
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
|
||||
<if test="ossUrl != null and ossUrl != ''">oss_url = #{ossUrl},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateAmount">
|
||||
update biz_meeting_material set amount = #{amount} where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="Long">
|
||||
delete from biz_meeting_material where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMeetingId" parameterType="Long">
|
||||
delete from biz_meeting_material where meeting_id = #{meetingId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user