From e6e5a67f94513e90da40cc28f21d0d2c6d9cbe7d Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期二, 15 四月 2025 17:34:01 +0800 Subject: [PATCH] 修改ifs对接方法 --- cnas-device/src/main/resources/mapper/DataConfigMapper.xml | 33 ++++++++------------------------- 1 files changed, 8 insertions(+), 25 deletions(-) diff --git a/cnas-device/src/main/resources/mapper/DataConfigMapper.xml b/cnas-device/src/main/resources/mapper/DataConfigMapper.xml index d5782b9..b5dac74 100644 --- a/cnas-device/src/main/resources/mapper/DataConfigMapper.xml +++ b/cnas-device/src/main/resources/mapper/DataConfigMapper.xml @@ -13,32 +13,14 @@ </resultMap> <select id="selectDataConfigList" resultType="com.ruoyi.device.dto.DeviceConfigDtoPage"> - SELECT d.device_name, - d.file_type, - d.collect_url, - d.storage_url, - d.ip, - d.entrust_code, - d.sample_code, - d.db_file_name, - ip.inspection_item, - ip.inspection_item_class, - if(ip.inspection_item_subclass is not null and ip.inspection_item_subclass != '', - ip.inspection_item_subclass, ip.inspection_item) inspection_item_subclass, - ip.sample, - ddc.formula, - ddc.referx, - ddc.refery, - ddc.x, - ddc.y, - ddc.another_name, - ddc.matching_name, - ddc.id, - ip.id structureItemParameterId - FROM device d - left join structure_item_parameter ip on FIND_IN_SET(ip.id, d.ins_product_ids) - left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id + SELECT ddc.*, + d.device_name, + sip.sample + FROM device_data_config ddc + left join device d on ddc.device_id = d.id + left join structure_item_parameter sip on sip.id = ddc.structure_item_parameter_id where d.id = #{deviceId} + order by ddc.id desc </select> <select id="deleteDataConfig" resultType="integer"> @@ -60,5 +42,6 @@ left join device_data_config ddc on ddc.device_id = d.id and ddc.structure_item_parameter_id = ip.id where d.id = #{deviceId} and ddc.id is null + order by ip.sample </select> </mapper> -- Gitblit v1.9.3