feat:设备后端接口-使用记录、设备申请等

This commit is contained in:
FCL
2026-01-04 08:58:27 +08:00
parent cc2812c458
commit 3c4b951c7b
21 changed files with 758 additions and 84 deletions

View File

@@ -0,0 +1,12 @@
<?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.zt.plat.module.qms.resource.device.dal.mapper.DeviceConfigFlowMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@@ -9,4 +9,42 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="getListNeedByRule" resultType="com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfoWithBizConfigVO">
select
d.*,
r.id as rule_id,
r.business_domain,
r.need_flag,
r.sub_domain_type,
r.frequency_type,
r.frequency,
r.frequency_remark,
r.report_template_key,
r.form_component,
r.process_method,
r.process_user,
r.standard,
r.calibration_check_type
from T_DEV_INF d
left join T_DEV_PDT p on d.PDT_ID = p.ID
left join T_DEV_CFG_BSN_RUL r on p.ID = r.PDT_ID
<where>
and d.DELETED = 0
and p.DELETED = 0
and r.DELETED = 0
<if test="param.id != null and param.id != ''">
and d.ID = #{param.id}
</if>
<if test="param.deptCodeList!=null and param.deptCodeList.size>0">
and d.DEPT_ID in
<foreach collection="param.deptCodeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
and r.BSN_DMN = #{param.businessType}
and r.REQR_FLG = 1
</where>
</select>
</mapper>