From dbd8a0de4b94f846a6beeccfaca3ed5cc08b0b9e Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 28 二月 2025 13:33:57 +0800 Subject: [PATCH] 计算点增加单位转换 --- iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml b/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml index 344c0f9..2b625f4 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml +++ b/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml @@ -71,6 +71,12 @@ <if test="params.collectQuality != null and params.collectQuality != ''"> and t6.collect_quality = #{params.collectQuality} </if> + <if test="params.pointNos != null"> + AND t1.point_no in + <foreach collection="params.pointNos" item="item" index="item" open="(" close=")" separator=","> + #{item} + </foreach> + </if> </where> order by t1.create_time desc, t1.point_no desc </select> @@ -98,9 +104,13 @@ t3.source_name, t2.tag_no, t2.dimension, - t2.value_type + t2.value_type, + t6.collect_value, + t6.collect_quality, + t6.collect_time from t_da_point t1 left join t_da_measure_point t2 on t2.point_id = t1.id + left join t_da_point_collect_status t6 on t6.point_no = t1.point_no left join ( select id source_id,server_name source_name from t_channel_opcua_device @@ -135,6 +145,9 @@ </if> <if test="isEnable != null "> and t1.is_enable = #{isEnable} + </if> + <if test="collectQuality != null and collectQuality != ''"> + and t6.collect_quality = #{collectQuality} </if> </where> order by t1.create_time desc, t1.point_no desc @@ -225,6 +238,7 @@ t1.point_no, t1.point_name, t1.default_value, + t1.unittransfactor, t1.point_type, t1.data_type, t1.store_type, @@ -239,6 +253,12 @@ </if> <if test="minfreqid != null and minfreqid != ''"> AND t1.minfreqid = #{minfreqid} + </if> + <if test="pointNos != null"> + AND t1.point_no in + <foreach collection="pointNos" item="item" index="item" open="(" close=")" separator=","> + #{item} + </foreach> </if> </where> </select> @@ -265,6 +285,21 @@ <if test="minfreqid != null and minfreqid != ''"> AND t1.minfreqid = #{minfreqid} </if> + <if test="pointNos != null"> + AND t1.point_no in + <foreach collection="pointNos" item="item" index="item" open="(" close=")" separator=","> + #{item} + </foreach> + </if> + </where> + </select> + <select id="getPointPage" parameterType="map" resultType="com.iailab.module.data.api.point.dto.ApiPointDTO"> + select point_no pointNo,point_name pointName from t_da_point + <where> + point_no in + <foreach item="value" collection="paramsMap.values" separator="," open="(" close=")"> + '${value}' + </foreach> </where> </select> -- Gitblit v1.9.3