From 8b3e911b0c52db5888a7ac414f4e6f5064031fd5 Mon Sep 17 00:00:00 2001 From: zangch Date: Tue, 3 Sep 2024 18:17:57 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20hw=5Felectronic=5Ffence=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E7=94=B1maxw=E5=8A=A0=E4=B8=8Adevice=5Fmode?= =?UTF-8?q?=5Fid=E5=92=8Cdevice=5Fid=EF=BC=8C=E8=BF=9E=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=9B=B8=E5=BA=94mapper?= =?UTF-8?q?=E5=92=8Cdo=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/domain/HwElectronicFence.java | 42 +++++++ .../business/HwElectronicFenceMapper.xml | 109 +++++++++++++++--- 2 files changed, 132 insertions(+), 19 deletions(-) diff --git a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/HwElectronicFence.java b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/HwElectronicFence.java index 19435a0..9599359 100644 --- a/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/HwElectronicFence.java +++ b/ruoyi-modules/hw-business/src/main/java/com/ruoyi/business/domain/HwElectronicFence.java @@ -79,6 +79,12 @@ public class HwElectronicFence extends BaseEntity //电子围栏区域信息 private List hwFenceAreaList; + private String deviceModeName; + private String deviceName; + private Long deviceModeId; + private Long deviceId; + + public List getHwFenceAreaList() { return hwFenceAreaList; } @@ -247,6 +253,38 @@ public class HwElectronicFence extends BaseEntity this.alarmInfoFlag = alarmInfoFlag; } + public String getDeviceModeName() { + return deviceModeName; + } + + public void setDeviceModeName(String deviceModeName) { + this.deviceModeName = deviceModeName; + } + + public String getDeviceName() { + return deviceName; + } + + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + public Long getDeviceModeId() { + return deviceModeId; + } + + public void setDeviceModeId(Long deviceModeId) { + this.deviceModeId = deviceModeId; + } + + public Long getDeviceId() { + return deviceId; + } + + public void setDeviceId(Long deviceId) { + this.deviceId = deviceId; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -269,6 +307,10 @@ public class HwElectronicFence extends BaseEntity .append("updateTime", getUpdateTime()) .append("fenceField", getFenceField()) .append("hwFenceTargetList", getHwFenceTargetList()) + .append("deviceModeName", getDeviceModeName()) + .append("deviceName", getDeviceName()) + .append("deviceModeId", getDeviceModeId()) + .append("deviceId", getDeviceId()) .toString(); } } diff --git a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwElectronicFenceMapper.xml b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwElectronicFenceMapper.xml index 40bdada..e693955 100644 --- a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwElectronicFenceMapper.xml +++ b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwElectronicFenceMapper.xml @@ -24,6 +24,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + @@ -37,34 +41,91 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select electronic_fence_id, electronic_fence_name, tenant_id, scene_id, fence_type, effective_time_flag, time_zone, effective_time, trigger_status, fence_push_flag, fence_push_content, fence_recover_content, remark, create_by, create_time, update_by, update_time, fence_field from hw_electronic_fence + select hef.electronic_fence_id, + hef.electronic_fence_name, + hef.tenant_id, + hef.scene_id, + hef.fence_type, + hef.effective_time_flag, + hef.time_zone, + hef.effective_time, + hef.trigger_status, + hef.fence_push_flag, + hef.fence_push_content, + hef.fence_recover_content, + hef.remark, + hef.create_by, + hef.create_time, + hef.update_by, + hef.update_time, + hef.fence_field, + hdm.device_mode_name, + hd.device_name, + hef.device_mode_id, + hef.device_id, + hs.scene_name + from hw_electronic_fence hef + left join hw_device_mode hdm on hdm.device_mode_id = hef.device_mode_id + left join hw_device hd on hd.device_id = hef.device_id + left join hw_scene hs on hs.scene_id = hef.scene_id - @@ -87,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, update_time, fence_field, + device_mode_id, + device_id, #{electronicFenceName}, @@ -106,6 +169,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateBy}, #{updateTime}, #{fenceField}, + device_mode_id, + device_id, @@ -129,6 +194,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = #{updateTime}, fence_field = #{fenceField}, + device_mode_id = #{deviceModeId}, + device_id = #{deviceId}, where electronic_fence_id = #{electronicFenceId} @@ -207,6 +274,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and hef.fence_push_content = #{fencePushContent} and hef.fence_recover_content = #{fenceRecoverContent} and hef.fence_field = #{fenceField} + and hdm.device_model_name like concat('%', #{deviceModeName}, '%') + and hd.device_name like concat('%', #{deviceName}, '%') + and hef.device_id = #{deviceId} + and hef.device_mode_id = #{deviceModeId} ${params.tenantDataScope}