fix:设备数据接口、使用记录接口调整

This commit is contained in:
FCL
2026-03-04 11:20:18 +08:00
parent d179bd9379
commit 8a9c74b9a9
15 changed files with 240 additions and 168 deletions

View File

@@ -9,7 +9,8 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<resultMap id="deviceMap" type="com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfomationDO">
<resultMap id="deviceMap" type="com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationWithProductVO">
<!--设备字段-->
<id property="id" column="ID" />
<result property="productId" column="PDT_ID" />
<result property="deviceName" column="DEV_NAME" />
@@ -54,12 +55,24 @@
<result property="tenantId" column="TENANT_ID" />
<result property="createTime" column="CREATE_TIME" />
<result property="updateTime" column="UPDATE_TIME" />
<!--大类字段-->
<result property="manufacturer" column="MFR"/>
<result property="specification" column="SPEC"/>
<result property="modelNo" column="MDL_NO"/>
</resultMap>
<select id="selectPage" resultMap="deviceMap">
SELECT d.* from
SELECT d.*,
p.MFR,
p.SPEC,
p.MDL_NO
from
T_DEV_INF d
LEFT JOIN T_DEV_PDT p ON d.PDT_ID = p.ID
<where>
<if test="param.id != null">
and d.ID = #{param.id}
</if>
<if test="param.productId != null">
and d.PDT_ID = #{param.productId}
</if>